Discussion:
ruby vs. java?
(too old to reply)
Franz Hartmann
2005-05-11 08:57:10 UTC
Permalink
Hello all,

just call me Franz. I study physic in Berlin, but i am from bavaria (that is
in the south of germany). sorry for my bad english but foreign languages are
not my strong point. i like more mathematic.

I want to do a physical model calculation about the dynamics of
incompressibel liquids. I am not sure which is the best programming language
for this. I think about visual basic, java and ruby. I know java quite good
and vb and ruby a bit. actually i wanted to do it in vb but its to powerful
for me. so i am looking for something easier.

can you tell me the essential differences between java and ruby? what can
you do in ruby that you cannot do in java? and what about jruby? can i
combine java and ruby?

Franz

ps. does ruby run on macintosh tiger?

_________________________________________________________________
MSN Hotmail. Anmelden und gewinnen! http://www.msn.de/email/webbased/ Ihre
Chance, eines von 10 T-Mobile MDA II zu gewinnen!
Michael Ulm
2005-05-11 09:19:01 UTC
Permalink
Franz Hartmann wrote:
> Hello all,
>
--snip--
> I want to do a physical model calculation about the dynamics of
> incompressibel liquids. I am not sure which is the best programming
> language for this. I think about visual basic, java and ruby. I know
> java quite good and vb and ruby a bit. actually i wanted to do it in vb
> but its to powerful for me. so i am looking for something easier.
>
> can you tell me the essential differences between java and ruby? what
> can you do in ruby that you cannot do in java? and what about jruby? can
> i combine java and ruby?
>

Sorry Franz, you are on a completely wrong track there. As much as
I hate to steer people away from Ruby, I don't think any of the
programming languages you mention are a good choice for numeric
simulations (if you would have to do it in one of those languages,
Ruby would be the best of the three for most applications).

I would recommend Octave as the best free choice for getting
solutions for (partial) differential equations. If you have money
to burn, you may want to look at Matlab or, depending on your
specific needs, Maple or Mathematica.

HTH,

Michael

P.S. do yourself a favour and forget that such a beast as vb exists.

--
Michael Ulm
R&D Team
ISIS Information Systems Austria
tel: +43 2236 27551-219, fax: +43 2236 21081
e-mail: ***@isis-papyrus.com
Visit our Website: www.isis-papyrus.com
Franz Hartmann
2005-05-11 10:00:53 UTC
Permalink
Hello Michael and all of you,

>From: Michael Ulm <***@isis-papyrus.com>
>Reply-To: ruby-***@ruby-lang.org
>To: ruby-***@ruby-lang.org (ruby-talk ML)
>Subject: Re: ruby vs. java?
>Date: Wed, 11 May 2005 18:19:01 +0900
>
>Franz Hartmann wrote:
>>Hello all,
>>
>--snip--
>>I want to do a physical model calculation about the dynamics of
>>incompressibel liquids. I am not sure which is the best programming
>>language for this. I think about visual basic, java and ruby. I know java
>>quite good and vb and ruby a bit. actually i wanted to do it in vb but its
>>to powerful for me. so i am looking for something easier.
>>
>>can you tell me the essential differences between java and ruby? what can
>>you do in ruby that you cannot do in java? and what about jruby? can i
>>combine java and ruby?
>>
>
>Sorry Franz, you are on a completely wrong track there. As much as
>I hate to steer people away from Ruby, I don't think any of the
>programming languages you mention are a good choice for numeric
>simulations (if you would have to do it in one of those languages,
>Ruby would be the best of the three for most applications).

Why are the programming languages i need not a good choice? Everyone says
that object oriented programming is much faster than normal. Java has more
object oriented feetures than ruby, or supports ruby interfaces and things
like that too? i have not found any thing about it but documentation is very
poor.

>I would recommend Octave as the best free choice for getting
>solutions for (partial) differential equations. If you have money
>to burn, you may want to look at Matlab or, depending on your
>specific needs, Maple or Mathematica.

i cannot use octave. SGI octave is a unix machine and i need windows
compatible, or best case macintosh, because i need use word & excel & power
point (& counterstrike *g* ). which programming languages run on octave?
thank you for the suggestion, i have already tried matlab but it is not good
to. I want to do object oriented programming because it is faster.

>HTH,

what means HTH?

>Michael
>
>P.S. do yourself a favour and forget that such a beast as vb exists.

Why that? VB is industry standard, a VERY powerful object oriented language.
All programmers i know write in VB, and excel, word etc also use VB. What is
wrong about it? (apart from that it is very difficult)

>
>--
>Michael Ulm
>R&D Team
>ISIS Information Systems Austria
>tel: +43 2236 27551-219, fax: +43 2236 21081
>e-mail: ***@isis-papyrus.com
>Visit our Website: www.isis-papyrus.com

Nice website!

Franz

_________________________________________________________________
Die rote Karte für lästige E-Mails. MSN Hotmail mit Junk-Mail-Filter.
http://www.msn.de/antispam/prevention/junkmailfilter Jetzt kostenlos
anmelden!
Michael Ulm
2005-05-11 10:30:33 UTC
Permalink
Franz Hartmann wrote:

> Hello Michael and all of you,
>
>> From: Michael Ulm <***@isis-papyrus.com>
>> Franz Hartmann wrote:
>>
>>> Hello all,
>>>
>> --snip--
>>
>>> I want to do a physical model calculation about the dynamics of
>>> incompressibel liquids. I am not sure which is the best programming
>>> language for this. I think about visual basic, java and ruby. I know
>>> java quite good and vb and ruby a bit. actually i wanted to do it in
>>> vb but its to powerful for me. so i am looking for something easier.
>>>
>>> can you tell me the essential differences between java and ruby? what
>>> can you do in ruby that you cannot do in java? and what about jruby?
>>> can i combine java and ruby?
>>>
>>
>> Sorry Franz, you are on a completely wrong track there. As much as
>> I hate to steer people away from Ruby, I don't think any of the
>> programming languages you mention are a good choice for numeric
>> simulations (if you would have to do it in one of those languages,
>> Ruby would be the best of the three for most applications).
>
>
> Why are the programming languages i need not a good choice? Everyone
> says that object oriented programming is much faster than normal. Java
> has more object oriented feetures than ruby, or supports ruby interfaces
> and things like that too? i have not found any thing about it but
> documentation is very poor.

I do not say that object oriented programming is much faster than
normal, so not everyone is saying that :-) From my experience, the
advantage of object oriented programming lies in better maintainability
of the code and (especially for Ruby) faster and cleaner design.
Java having more object oriented features than Ruby? Only if you
take Javas (slightly strange) definition of object oriented. However,
Java is a powerful language, with very good documentation - not the
worst choice for many things.

>> I would recommend Octave as the best free choice for getting
>> solutions for (partial) differential equations. If you have money
>> to burn, you may want to look at Matlab or, depending on your
>> specific needs, Maple or Mathematica.
>
>
> i cannot use octave. SGI octave is a unix machine and i need windows
> compatible, or best case macintosh, because i need use word & excel &
> power point (& counterstrike *g* ). which programming languages run on
> octave?
> thank you for the suggestion, i have already tried matlab but it is not
> good to. I want to do object oriented programming because it is faster.

Object oriented programming has nothing to do with execution speed.

Trying to learn object oriented programming is a noble goal. If you
want fast and object oriented, use C++. If you want object oriented
and easy to program, use Ruby (be aware though, that Ruby is slow).
The best of both worlds would be Ruby with C++ extensions, but that
means you would have to learn a lot.

The reason I recommend Octave/Matlab is that there is already a lot
of infrastructure there for numerical computations. You would have
to write a lot of that yourself in most other languages.

>
>> HTH,
>
>
> what means HTH?

Hope That Helps

>> Michael
>>
>> P.S. do yourself a favour and forget that such a beast as vb exists.
>
>
> Why that? VB is industry standard, a VERY powerful object oriented
> language. All programmers i know write in VB, and excel, word etc also
> use VB. What is wrong about it? (apart from that it is very difficult)

vb is only available on one plattform. Microsoft itself wants to get
rid of it (so much for industry standard). The overall design is just
plain awful. It is by far the very worst scripting language I have ever
programed in.

HTH,

Michael


--
Michael Ulm
R&D Team
ISIS Information Systems Austria
tel: +43 2236 27551-219, fax: +43 2236 21081
e-mail: ***@isis-papyrus.com
Visit our Website: www.isis-papyrus.com
Franz Hartmann
2005-05-11 11:01:09 UTC
Permalink
>From: Michael Ulm <***@isis-papyrus.com>
>Reply-To: ruby-***@ruby-lang.org
>To: ruby-***@ruby-lang.org (ruby-talk ML)
>Subject: Re: ruby vs. java?
>Date: Wed, 11 May 2005 19:30:33 +0900
>
>Franz Hartmann wrote:
>
>>Hello Michael and all of you,
>>
>>>From: Michael Ulm <***@isis-papyrus.com>
>>>Franz Hartmann wrote:
>>>
>>>>Hello all,
>>>>
>>>--snip--
>>>
>>>>I want to do a physical model calculation about the dynamics of
>>>>incompressibel liquids. I am not sure which is the best programming
>>>>language for this. I think about visual basic, java and ruby. I know
>>>>java quite good and vb and ruby a bit. actually i wanted to do it in vb
>>>>but its to powerful for me. so i am looking for something easier.
>>>>
>>>>can you tell me the essential differences between java and ruby? what
>>>>can you do in ruby that you cannot do in java? and what about jruby? can
>>>>i combine java and ruby?
>>>>
>>>
>>>Sorry Franz, you are on a completely wrong track there. As much as
>>>I hate to steer people away from Ruby, I don't think any of the
>>>programming languages you mention are a good choice for numeric
>>>simulations (if you would have to do it in one of those languages,
>>>Ruby would be the best of the three for most applications).
>>
>>
>>Why are the programming languages i need not a good choice? Everyone says
>>that object oriented programming is much faster than normal. Java has more
>>object oriented feetures than ruby, or supports ruby interfaces and things
>>like that too? i have not found any thing about it but documentation is
>>very poor.
>
>I do not say that object oriented programming is much faster than
>normal, so not everyone is saying that :-)

Okay, everyone except for you, $\infty - 1$ :-)
but in fact all the commercials are about speed. i remember turbo-pascal 5.5
where they introduced oo: "guilty of speeding" (there was a very funny
picture to of a flying pig) -- it was not so fast then because i had an
atari st running a dos emulator, norton factor ~ 0.1 :-))
okay, commercials are commercials but i think xerox used smalltalk to
implement the first windows system on 1960s hardware. i dont know how fast
processors were than but i think they cannot have been much faster than the
good old apple 2 :-) .
i dont know much about smalltalk but they say it is really similar to ruby?

>From my experience, the
>advantage of object oriented programming lies in better maintainability
>of the code and (especially for Ruby) faster and cleaner design.

yes, now you yourself say it: fast and clean design.

*****
* *
*
*****
*
* *
*****

**

>Java having more object oriented features than Ruby? Only if you
>take Javas (slightly strange) definition of object oriented. However,
>Java is a powerful language, with very good documentation - not the
>worst choice for many things.
>
>>>I would recommend Octave as the best free choice for getting
>>>solutions for (partial) differential equations. If you have money
>>>to burn, you may want to look at Matlab or, depending on your
>>>specific needs, Maple or Mathematica.
>>
>>
>>i cannot use octave. SGI octave is a unix machine and i need windows
>>compatible, or best case macintosh, because i need use word & excel &
>>power point (& counterstrike *g* ). which programming languages run on
>>octave?
>>thank you for the suggestion, i have already tried matlab but it is not
>>good to. I want to do object oriented programming because it is faster.
>
>Object oriented programming has nothing to do with execution speed.

i may be a bavarian wood-head but i just dont understand. do your programs
run faster with oo or do they not? just before you said "fast (...) design".

>Trying to learn object oriented programming is a noble goal. If you
>want fast and object oriented, use C++.

Uuargh! must i?

>If you want object oriented
>and easy to program, use Ruby (be aware though, that Ruby is slow).

but why is it slow, when it is so much like smalltalk?

>The best of both worlds would be Ruby with C++ extensions, but that
>means you would have to learn a lot.

i will have to learn a lot anyway. but cant i rather do ruby with java
extensions? isnt that the idea behind jruby?

>The reason I recommend Octave/Matlab is that there is already a lot
>of infrastructure there for numerical computations. You would have
>to write a lot of that yourself in most other languages.
>
>>
>>>HTH,
>>
>>
>>what means HTH?
>
>Hope That Helps

yes it does!

>>>Michael
>>>
>>>P.S. do yourself a favour and forget that such a beast as vb exists.
>>
>>
>>Why that? VB is industry standard, a VERY powerful object oriented
>>language. All programmers i know write in VB, and excel, word etc also use
>>VB. What is wrong about it? (apart from that it is very difficult)
>
>vb is only available on one plattform. Microsoft itself wants to get
>rid of it (so much for industry standard).

doesnt vb run on mac too? then i will keep my pentium box. because i have so
many vb macros for word & excel.

>The overall design is just
>plain awful. It is by far the very worst scripting language I have ever
>programed in.

well its very difficult to handle all that functionaility (as i admit that
its too difficult for me), but why do you say "the overall design is awful"?

>
>HTH,

what means HTH?
just kidding :-)))))

>Michael
>
>
>--
>Michael Ulm
>R&D Team
>ISIS Information Systems Austria
>tel: +43 2236 27551-219, fax: +43 2236 21081
>e-mail: ***@isis-papyrus.com
>Visit our Website: www.isis-papyrus.com
>

Franz

_________________________________________________________________
Nicht lange suchen – finden! MSN Suche. http://search.msn.de/ Jetzt testen!
Michael Ulm
2005-05-11 11:30:01 UTC
Permalink
Franz Hartmann wrote:

>
>
>> From: Michael Ulm <***@isis-papyrus.com>
--major snip--
>>
>>
>> Object oriented programming has nothing to do with execution speed.
>
>
> i may be a bavarian wood-head but i just dont understand. do your
> programs run faster with oo or do they not? just before you said "fast
> (...) design".

Mia österreicher san oba a Stuaschädl.

You are confusing two concepts here: (i) Design/implementation speed,
the time it takes you to program the thing, and (ii) execution speed,
the time it takes the program to produce the output.

Object oriented programming may help in (i), but not in (ii). So far,
I was assuming you want fast execution speed for simulations of
physical processes (for nontrivial simulations execution times may
easily reach weeks or months). If this is your goal, then none of
the three scripting languages you described will be nearly fast enough.
Octave might be. C or C++ with the right software libraries would be
fastest.

If your goal is learning (object oriented) programming, and the
simulations are just for you to play around with, then Ruby is an
excellent choice (with the caveat, that you may have to implement
more "infrastructure" e.g. triangulations, discretisations...).

etaoin shrdlu,

Michael

--
Michael Ulm
R&D Team
ISIS Information Systems Austria
tel: +43 2236 27551-219, fax: +43 2236 21081
e-mail: ***@isis-papyrus.com
Visit our Website: www.isis-papyrus.com
Glenn Parker
2005-05-11 13:02:27 UTC
Permalink
Franz Hartmann wrote:
>> From: Michael Ulm <***@isis-papyrus.com>
>>
>> I do not say that object oriented programming is much faster than
>> normal, so not everyone is saying that :-)
>
> Okay, everyone except for you, $\infty - 1$ :-)

Nor do I. OO code may be faster to write (and re-write), but it has
never been faster to execute. On average, OO code execution speed is
very similar to non-OO code. On top of that, Ruby is dynamically typed,
unlike TurboPascal or C++ or VB, which adds more execution-time
overhead. Finally, the current Ruby interpreter has sub-optimal
performance because it is still rather new compared to mature languages
like Smalltalk.

Real numerical simulations (as opposed to toy projects) demand efficient
use of hardware resources, and they do not benefit as much from the OO
design style. All this makes Ruby a poor choice, unless you are just
playing around.

>> Trying to learn object oriented programming is a noble goal. If you
>> want fast and object oriented, use C++.
>
> Uuargh! must i?

It sounds like you have already made up your mind, so why ask?

--
Glenn Parker | glenn.parker-AT-comcast.net | <http://www.tetrafoil.com/>
Jim Weirich
2005-05-11 14:45:30 UTC
Permalink
Glenn Parker said:
> Real numerical simulations (as opposed to toy projects) demand efficient
> use of hardware resources, and they do not benefit as much from the OO
> design style. All this makes Ruby a poor choice, unless you are just
> playing around.

The Kali code project seems to be using Ruby to do dense stellar system
modeling. Chapter 12 where they address speed issues is still incomplete,
but they talk about timing issues and C code libraries. All in all, an
interesting read (I'm slowing working through it).

--
-- Jim Weirich ***@weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
Logan Capaldo
2005-05-11 10:35:41 UTC
Permalink
On 5/11/05, Franz Hartmann <***@hotmail.com> wrote:

> >I would recommend Octave as the best free choice for getting
> >solutions for (partial) differential equations. If you have money
> >to burn, you may want to look at Matlab or, depending on your
> >specific needs, Maple or Mathematica.
>
> i cannot use octave. SGI octave is a unix machine and i need windows
> compatible, or best case macintosh, because i need use word & excel & power
> point (& counterstrike *g* ). which programming languages run on octave?
> thank you for the suggestion, i have already tried matlab but it is not good
> to. I want to do object oriented programming because it is faster.
>
> >HTH,
>

GNU Octave IS a programming language., designed for numerical
applications. It runs on Windows, Linux and OS X. Its website is here:
http://www.octave.org/
Franz Hartmann
2005-05-11 11:06:51 UTC
Permalink
Hello Logan,

>From: Logan Capaldo <***@gmail.com>
>Reply-To: ruby-***@ruby-lang.org
>To: ruby-***@ruby-lang.org (ruby-talk ML)
>Subject: Re: ruby vs. java?
>Date: Wed, 11 May 2005 19:35:41 +0900
>
>On 5/11/05, Franz Hartmann <***@hotmail.com> wrote:
>
> > >I would recommend Octave as the best free choice for getting
> > >solutions for (partial) differential equations. If you have money
> > >to burn, you may want to look at Matlab or, depending on your
> > >specific needs, Maple or Mathematica.
> >
> > i cannot use octave. SGI octave is a unix machine and i need windows
> > compatible, or best case macintosh, because i need use word & excel &
>power
> > point (& counterstrike *g* ). which programming languages run on octave?
> > thank you for the suggestion, i have already tried matlab but it is not
>good
> > to. I want to do object oriented programming because it is faster.
> >
> > >HTH,
> >
>
>GNU Octave IS a programming language., designed for numerical
>applications. It runs on Windows, Linux and OS X. Its website is here:
>http://www.octave.org/

that is strange, i always thought that octave was the name of the big sgi
box. havent these gnu guys been accused by sgi yet?
thank you for the link, but i dont like it. it is to much like fortran for
me. they say that when you know fortran you can learn octave in a few hours.
i think fortrans time is over. and besides, what shall my professor say when
i come up with a fortran program?

Franz

_________________________________________________________________
Nicht lange suchen – finden! MSN Suche. http://search.msn.de/ Jetzt testen!
Ralf Müller
2005-05-11 11:59:59 UTC
Permalink
> that is strange, i always thought that octave was the name of the big sgi
> box. havent these gnu guys been accused by sgi yet?
> thank you for the link, but i dont like it. it is to much like fortran for
> me. they say that when you know fortran you can learn octave in a few hours.
> i think fortrans time is over. and besides, what shall my professor say when
> i come up with a fortran program?

Sorry, but for numerical solutions Fortran is still a standard. That's why there are Fortran 95 and Fortran 99.

I wonder why Fortran seems strange to you; you're are a physician. Most of the physicians i know use either Fortan or C.

ralf
Franz Hartmann
2005-05-11 12:16:27 UTC
Permalink
Ralf,

>From: Ralf Müller <***@imp-ag.de>
>Reply-To: ruby-***@ruby-lang.org
>To: ruby-***@ruby-lang.org (ruby-talk ML)
>Subject: Re: ruby vs. java?
>Date: Wed, 11 May 2005 20:59:59 +0900
>
>
> > that is strange, i always thought that octave was the name of the big
>sgi
> > box. havent these gnu guys been accused by sgi yet?
> > thank you for the link, but i dont like it. it is to much like fortran
>for
> > me. they say that when you know fortran you can learn octave in a few
>hours.
> > i think fortrans time is over. and besides, what shall my professor say
>when
> > i come up with a fortran program?
>
>Sorry, but for numerical solutions Fortran is still a standard. That's why
>there are Fortran 95 and Fortran 99.

nightmare - to be continued ;-)

>I wonder why Fortran seems strange to you; you're are a physician. Most of
>the physicians i know use either Fortan or C.

no i am not, and physicians rarely use any programming language, because
Virchow got along without any computer at all.
(physician = Arzt, physicist = Physiker) :-)))

>ralf
>

Franz

_________________________________________________________________
Eine für alle. MSN Suche. http://search.msn.de Finden statt suchen!
Ralf Müller
2005-05-11 12:31:27 UTC
Permalink
> (physician = Arzt, physicist = Physiker) :-)))
DAMN!
sorry, my fault


but how did you came across fluid dynamics as ARZT (damndamndamn)
Christian Neukirchen
2005-05-11 16:12:36 UTC
Permalink
Ralf Müller <***@imp-ag.de> writes:

>> (physician = Arzt, physicist = Physiker) :-)))
> DAMN!
> sorry, my fault
>
>
> but how did you came across fluid dynamics as ARZT (damndamndamn)

Maybe calculating syringe diameters? :-)

--
Christian Neukirchen <***@gmail.com> http://chneukirchen.org
Franz Hartmann
2005-05-12 08:24:18 UTC
Permalink
let me explain honey :-) :
franz.study.name == "physic"
franz.study.comprise( "fluid dynamics" ) == "Yes"

>From: Ralf Müller <***@imp-ag.de>
>Reply-To: ruby-***@ruby-lang.org
>To: ruby-***@ruby-lang.org (ruby-talk ML)
>Subject: Re: ruby vs. java?
>Date: Wed, 11 May 2005 21:31:27 +0900
>
> > (physician = Arzt, physicist = Physiker) :-)))
>DAMN!
>sorry, my fault
>
>
>but how did you came across fluid dynamics as ARZT (damndamndamn)
>

_________________________________________________________________
MSN Hotmail. Anmelden und gewinnen! http://www.msn.de/email/webbased/ Ihre
Chance, eines von 10 T-Mobile MDA II zu gewinnen!
Ralf Müller
2005-05-12 08:39:24 UTC
Permalink
On Thu, 12 May 2005 17:24:18 +0900
"Franz Hartmann" <***@hotmail.com> wrote:

> let me explain honey :-) :
> franz.study.name == "physic"
> franz.study.comprise( "fluid dynamics" ) == "Yes"

And your prof would be shocked by fortan?
I'm curious which language he use for simulation?

ralf
Franz Hartmann
2005-05-12 08:46:25 UTC
Permalink
well now, i have to work my way thru quite a lot of very kind mails...
thanks to everyone here who has taken the time! sorry for not thanking you
more early but when i came back from the loo the computer was occupied :)

i think i now understand: "library" is a collection of plug-ins for ruby, or
other language. (ok you wont like the term, but i have to understand in my
own words.) ruby library <> java library. where can i download the ruby
library?

and please explain to me:
- what is "racc"? (sounds painful to me)
- what is the position of ilias lazaridis? (he is very authoritative but not
in charge?)
- what is a "lucky stiff" and what is a "paraffin banjo", especially if held
on someone's knee? (no idea about that)

Franz

_________________________________________________________________
Immer für Sie da. MSN Hotmail. http://www.msn.de/email/webbased/ Jetzt
kostenlos anmelden und überall erreichbar sein!
Michael Ulm
2005-05-12 09:14:07 UTC
Permalink
Franz Hartmann wrote:
> well now, i have to work my way thru quite a lot of very kind mails...
> thanks to everyone here who has taken the time! sorry for not thanking
> you more early but when i came back from the loo the computer was
> occupied :)
>
> i think i now understand: "library" is a collection of plug-ins for
> ruby, or other language. (ok you wont like the term, but i have to
> understand in my own words.) ruby library <> java library. where can i
> download the ruby library?

There exist many libraries for many purposes. The standard library
should be part of the ruby distribution. Other libraries that help
you deal with specific purposes may be found at

http://raa.ruby-lang.org

>
> and please explain to me:
> - what is "racc"? (sounds painful to me)

This is a program that is a ruby "parser generator". This means you
give it a description of a gramar and it returns a ruby program that
parses texts written in that grammar. You probably don't need this yet.

> - what is the position of ilias lazaridis? (he is very authoritative but
> not in charge?)

Ilias is ruby-langs resident troll. You can savely ignore him.

> - what is a "lucky stiff" and what is a "paraffin banjo", especially if
> held on someone's knee? (no idea about that)

_why the lucky stiff (sp?) is ruby-langs resident mad genius. Check out
his introduction to ruby:

http://poignantguide.net/ruby

Michael

--
Michael Ulm
R&D Team
ISIS Information Systems Austria
tel: +43 2236 27551-219, fax: +43 2236 21081
e-mail: ***@isis-papyrus.com
Visit our Website: www.isis-papyrus.com
Brian Schröder
2005-05-12 09:32:12 UTC
Permalink
On 12/05/05, Michael Ulm <***@isis-papyrus.com> wrote:
> Franz Hartmann wrote:
> > well now, i have to work my way thru quite a lot of very kind mails...
> > thanks to everyone here who has taken the time! sorry for not thanking
> > you more early but when i came back from the loo the computer was
> > occupied :)
> >
> > i think i now understand: "library" is a collection of plug-ins for
> > ruby, or other language. (ok you wont like the term, but i have to
> > understand in my own words.) ruby library <> java library. where can i
> > download the ruby library?
>
> There exist many libraries for many purposes. The standard library
> should be part of the ruby distribution. Other libraries that help
> you deal with specific purposes may be found at
>
> http://raa.ruby-lang.org
>
> >
> > and please explain to me:
> > - what is "racc"? (sounds painful to me)
>
> This is a program that is a ruby "parser generator". This means you
> give it a description of a gramar and it returns a ruby program that
> parses texts written in that grammar. You probably don't need this yet.
>
> > - what is the position of ilias lazaridis? (he is very authoritative but
> > not in charge?)
>
> Ilias is ruby-langs resident troll. You can savely ignore him.
>

Before you ask: http://en.wikipedia.org/wiki/Internet_troll

regards,

Brian

--
http://ruby.brian-schroeder.de/

Stringed instrument chords: http://chordlist.brian-schroeder.de/
Karl von Laudermann
2005-05-12 13:21:12 UTC
Permalink
Franz Hartmann wrote:
>
> - what is the position of ilias lazaridis? (he is very authoritative
but not
> in charge?)

Best answered here:
http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/139511
and here:
http://www.tfeb.org/lisp/mad-people.html
Mark Hubbart
2005-05-12 16:16:27 UTC
Permalink
On 5/12/05, Franz Hartmann <***@hotmail.com> wrote:
> well now, i have to work my way thru quite a lot of very kind mails...
> thanks to everyone here who has taken the time! sorry for not thanking you
> more early but when i came back from the loo the computer was occupied :)
>
> i think i now understand: "library" is a collection of plug-ins for ruby, or
> other language. (ok you wont like the term, but i have to understand in my
> own words.) ruby library <> java library. where can i download the ruby
> library?
>
> and please explain to me:
> - what is "racc"? (sounds painful to me)

Included with Ruby, it allows you to write parsers, for document
formats or for programming languages.

> - what is the position of ilias lazaridis? (he is very authoritative but not
> in charge?)

Ilias is our resident controversy. Be careful around him, he's been
known to bite.

> - what is a "lucky stiff" and what is a "paraffin banjo", especially if held
> on someone's knee? (no idea about that)

_why, or "why the lucky stiff", is our resident guru jester. He keeps
things lighthearted around here, while surreptitiously injecting large
chunks of wisdom.

And a "paraffin banjo" is the instrument you play Waxy Bluegrass on. :)

cheers,
Mark
James Edward Gray II
2005-05-12 16:26:56 UTC
Permalink
On May 12, 2005, at 11:16 AM, Mark Hubbart wrote:

> Included with Ruby, it allows you to write parsers, for document
> formats or for programming languages.

The racc runtime is included with Ruby, but not racc itself. Right?

James Edward Gray II
Mark Hubbart
2005-05-12 16:48:11 UTC
Permalink
On 5/12/05, James Edward Gray II <***@grayproductions.net> wrote:
> On May 12, 2005, at 11:16 AM, Mark Hubbart wrote:
>
> > Included with Ruby, it allows you to write parsers, for document
> > formats or for programming languages.
>
> The racc runtime is included with Ruby, but not racc itself. Right?

I believe so. I've never actually worked with it, though, just read about it.

cheers,
Mark
Jim Freeze
2005-05-12 18:44:08 UTC
Permalink
* James Edward Gray II <***@grayproductions.net> [2005-05-13 01:26:56 +0900]:

> On May 12, 2005, at 11:16 AM, Mark Hubbart wrote:
>
> >Included with Ruby, it allows you to write parsers, for document
> >formats or for programming languages.
>
> The racc runtime is included with Ruby, but not racc itself. Right?

Correct

--
Jim Freeze
Ruby: I can explain it to ya but I can't understand it fer ya.
David A. Black
2005-05-13 04:55:28 UTC
Permalink
Hi --

On Thu, 12 May 2005, Franz Hartmann wrote:

> - what is a "lucky stiff" and what is a "paraffin banjo", especially if held
> on someone's knee? (no idea about that)

A paraffin banjo is an example of wh(ims)y :-)


David

--
David A. Black
***@wobblini.net
Cameron McBride
2005-05-11 13:06:02 UTC
Permalink
> Sorry, but for numerical solutions Fortran is still a standard. That's why there are Fortran 95 and Fortran 99.

well, I don't know about that. It's still around a lot, but I'm not
sure I want to jump to calling it a standard. I know people that
still PROGRAM IN ALL CAPS ("lowercase is for comments"), but that
doesn't mean it's a practice I endorse.

I like interpreted languages for development speed, but they can be
computationally slow. First off, GSL is pretty handy - and can solve
a lot of speed issues along with providing adequate libraries
(http://rb-gsl.rubyforge.org/). Franz, you don't sound like you know
C, but one of the beauties of ruby is it's ease of C binding. If you
need to make some routine fast, you can just spend time on that bit,
and return to ruby once it's done. Here, RubyInline can make things go
even faster (http://rubyforge.org/projects/rubyinline/).

Cameron
Dick Davies
2005-05-11 22:53:07 UTC
Permalink
* Franz Hartmann <***@hotmail.com> [0506 12:06]:

> >GNU Octave IS a programming language., designed for numerical
> >applications. It runs on Windows, Linux and OS X. Its website is here:
> >http://www.octave.org/
>
> that is strange, i always thought that octave was the name of the big sgi
> box. havent these gnu guys been accused by sgi yet?

that's an Octane.

--
'Everyone's always in favour of saving Hitler's brain, but when you put it
in the body of a Great White shark suddenly you've gone too far..'
-- Prof. Farnsworth
Rasputin :: Jack of All Trades - Master of Nuns
Jeremy Tregunna
2005-05-12 06:04:38 UTC
Permalink
On 11-May-05, at 7:06 AM, Franz Hartmann wrote:

>> GNU Octave IS a programming language., designed for numerical
>> applications. It runs on Windows, Linux and OS X. Its website is here:
>> http://www.octave.org/
>
> that is strange, i always thought that octave was the name of the big
> sgi box. havent these gnu guys been accused by sgi yet?
> thank you for the link, but i dont like it. it is to much like fortran
> for me. they say that when you know fortran you can learn octave in a
> few hours. i think fortrans time is over. and besides, what shall my
> professor say when i come up with a fortran program?

You may be thinking of "Octane" or "Origin". SGI has no machine called
"Octave".

> Franz

--
Jeremy Tregunna
***@blurgle.ca
Austin Ziegler
2005-05-13 16:12:02 UTC
Permalink
On 5/11/05, Franz Hartmann <***@hotmail.com> wrote:
>> Michael Ulm <***@isis-papyrus.com>
>> Sorry Franz, you are on a completely wrong track there. As much
>> as I hate to steer people away from Ruby, I don't think any of
>> the programming languages you mention are a good choice for
>> numeric simulations (if you would have to do it in one of those
>> languages, Ruby would be the best of the three for most
>> applications).
> Why are the programming languages i need not a good choice?
> Everyone says that object oriented programming is much faster than
> normal. Java has more object oriented feetures than ruby, or
> supports ruby interfaces and things like that too? i have not
> found any thing about it but documentation is very poor.

In fact, Java is *less* object-oriented in some ways than Ruby. No,
Ruby doesn't support "interfaces" as they're not needed in Ruby.
There is a long discussion behind this, but understand that anything
you can do in Java can ultimately be done in Ruby -- it just won't
look much like the Java code that does it. It'll usually be smaller
and more concise.

>> I would recommend Octave as the best free choice for getting
>> solutions for (partial) differential equations. If you have money
>> to burn, you may want to look at Matlab or, depending on your
>> specific needs, Maple or Mathematica.
> i cannot use octave. SGI octave is a unix machine and i need
> windows compatible, or best case macintosh, because i need use
> word & excel & power point (& counterstrike *g* ). which
> programming languages run on octave? thank you for the suggestion,
> i have already tried matlab but it is not good to. I want to do
> object oriented programming because it is faster.

Octave is a programming language that can be compiled for Mac OS X
(which is Unix) and it can run under Windows:

http://octave.sourceforge.net/Octave_Windows.htm

>> P.S. do yourself a favour and forget that such a beast as vb
>> exists.
> Why that? VB is industry standard, a VERY powerful object oriented
> language. All programmers i know write in VB, and excel, word etc
> also use VB. What is wrong about it? (apart from that it is very
> difficult)

Visual Basic is neither powerful nor object oriented. Visual
Basic.NET is powerful and object oriented, but bears no relationship
to either VB6 or Visual Basic for Applications used as a macro
language in Excel and Word.

-austin
--
Austin Ziegler * ***@gmail.com
* Alternate: ***@halostatue.ca
Jaypee
2005-05-11 09:22:25 UTC
Permalink
Franz Hartmann a écrit :
> Hello all,
>
> just call me Franz. I study physic in Berlin, but i am from bavaria
> (that is in the south of germany). sorry for my bad english but foreign
> languages are not my strong point. i like more mathematic.
>
> I want to do a physical model calculation about the dynamics of
> incompressibel liquids. I am not sure which is the best programming
> language for this. I think about visual basic, java and ruby. I know
> java quite good and vb and ruby a bit. actually i wanted to do it in vb
> but its to powerful for me. so i am looking for something easier.
>
> can you tell me the essential differences between java and ruby? what
> can you do in ruby that you cannot do in java? and what about jruby? can
> i combine java and ruby?
>
> Franz
>
> ps. does ruby run on macintosh tiger?
>
> _________________________________________________________________
> MSN Hotmail. Anmelden und gewinnen! http://www.msn.de/email/webbased/
> Ihre Chance, eines von 10 T-Mobile MDA II zu gewinnen!
>
>
>
I can answer to the PS: yes, the version 1.8.2 of ruby is a standard
part Tiger.
For the other points, may I suggest you to be specific about what you
are looking for in VB or in Java (GUI, ready to use libs etc) that you
did not find. It will help further answers.
J-P
Franz Hartmann
2005-05-11 10:25:24 UTC
Permalink
Hello Jaypee,

>From: Jaypee <***@sd.eepyaj>
>Reply-To: ruby-***@ruby-lang.org
>To: ruby-***@ruby-lang.org (ruby-talk ML)
>Subject: Re: ruby vs. java?
>Date: Wed, 11 May 2005 18:25:27 +0900
>
>Franz Hartmann a écrit :
>>Hello all,
>>
>>just call me Franz. I study physic in Berlin, but i am from bavaria (that
>>is in the south of germany). sorry for my bad english but foreign
>>languages are not my strong point. i like more mathematic.
>>
>>I want to do a physical model calculation about the dynamics of
>>incompressibel liquids. I am not sure which is the best programming
>>language for this. I think about visual basic, java and ruby. I know java
>>quite good and vb and ruby a bit. actually i wanted to do it in vb but its
>>to powerful for me. so i am looking for something easier.
>>
>>can you tell me the essential differences between java and ruby? what can
>>you do in ruby that you cannot do in java? and what about jruby? can i
>>combine java and ruby?
>>
>>Franz
>>
>>ps. does ruby run on macintosh tiger?
>>
>>_________________________________________________________________
>>MSN Hotmail. Anmelden und gewinnen! http://www.msn.de/email/webbased/ Ihre
>>Chance, eines von 10 T-Mobile MDA II zu gewinnen!
>>
>>
>>
>I can answer to the PS: yes, the version 1.8.2 of ruby is a standard part
>Tiger.

That is very good. Because i think to buy a macintosh perhaps. the G5 is now
at 2x2.7 ghz and i think this is just what i need. can ruby handle two
processors? (or do i need a c extension for that *g* ?)
btw, i know this is a ruby list but is their any way to run windows programs
on mac?

>For the other points, may I suggest you to be specific about what you are
>looking for in VB or in Java (GUI, ready to use libs etc) that you
>did not find. It will help further answers.
>J-P

yes you may but i myself dont know yet :-) . i think windows and graphics
will be needed. 3d graphics would be super to present the results.
as i wrote before, going into libraries is not a problem, i have all the
books and documentations.

Thanks
Franz

_________________________________________________________________
Eine für alle. MSN Suche. http://search.msn.de Finden statt suchen!
Jaypee
2005-05-11 11:01:22 UTC
Permalink
Franz Hartmann a écrit :
> Hello Jaypee,
>
>> From: Jaypee <***@sd.eepyaj>
>> Reply-To: ruby-***@ruby-lang.org
>> To: ruby-***@ruby-lang.org (ruby-talk ML)
>> Subject: Re: ruby vs. java?
>> Date: Wed, 11 May 2005 18:25:27 +0900
>>
>> Franz Hartmann a écrit :
>>
>>> Hello all,
>>>
...
>>> ps. does ruby run on macintosh tiger?
>>>
...
>>>
>> I can answer to the PS: yes, the version 1.8.2 of ruby is a standard
>> part Tiger.
>
>
> That is very good. Because i think to buy a macintosh perhaps. the G5 is
> now at 2x2.7 ghz and i think this is just what i need. can ruby handle
> two processors? (or do i need a c extension for that *g* ?)
> btw, i know this is a ruby list but is their any way to run windows
> programs on mac?
>
>> For the other points, may I suggest you to be specific about what you
>> are looking for in VB or in Java (GUI, ready to use libs etc) that you
>> did not find. It will help further answers.
>> J-P
>
>
> yes you may but i myself dont know yet :-) . i think windows and
> graphics will be needed. 3d graphics would be super to present the results.
> as i wrote before, going into libraries is not a problem, i have all the
> books and documentations.
>
...
Franz,
I have myself somehow tested this and unfortunately, ruby shall not take
advantage of the dual CPU. The example I used for this was the
calculation of the factorial of 100000. This is IMHO a good example to
discuss the performance question.
Especially in your case, where you master a domain where other people
are generally of little help, you need to be very autonomous and in that
regard, Ruby is very good, it helps you to really cope with some level
of complexity. In the example of the factorial. It takes 1 minute to
write in ruby and even if you deal with a very large integer, it's
ruby's business, not yours, and it takes 10 min or so to compute.

Or you may get the result in ten seconds after one day of laborious
coding in another language. Which language was best in that example?

Just my 2 cents (of Euro)
Jean-Pierre
PS: There are ruby-Tk, ruby-OpenGL, ruby-Fox (careful I did not test it
as thoroughly as it would be necessary), ruby-SVG, ruby-fltk ...
interfaces to best known graphical libraries or toolkit to make desktop
or web user front-ends.
Franz Hartmann
2005-05-11 11:43:45 UTC
Permalink
Hello Jaypee,

>From: Jaypee <***@sd.eepyaj>
>Reply-To: ruby-***@ruby-lang.org
>To: ruby-***@ruby-lang.org (ruby-talk ML)
>Subject: Re: ruby vs. java?
>Date: Wed, 11 May 2005 20:05:28 +0900
>
>Franz Hartmann a écrit :
>>Hello Jaypee,
>>
>>>From: Jaypee <***@sd.eepyaj>
>>>Reply-To: ruby-***@ruby-lang.org
>>>To: ruby-***@ruby-lang.org (ruby-talk ML)
>>>Subject: Re: ruby vs. java?
>>>Date: Wed, 11 May 2005 18:25:27 +0900
>>>
>>>Franz Hartmann a écrit :
>>>
>>>>Hello all,
>>>>
>....
>>>>ps. does ruby run on macintosh tiger?
>>>>
>....
>>>>
>>>I can answer to the PS: yes, the version 1.8.2 of ruby is a standard part
>>>Tiger.
>>
>>
>>That is very good. Because i think to buy a macintosh perhaps. the G5 is
>>now at 2x2.7 ghz and i think this is just what i need. can ruby handle two
>>processors? (or do i need a c extension for that *g* ?)
>>btw, i know this is a ruby list but is their any way to run windows
>>programs on mac?
>>
>>>For the other points, may I suggest you to be specific about what you are
>>>looking for in VB or in Java (GUI, ready to use libs etc) that you
>>>did not find. It will help further answers.
>>>J-P
>>
>>
>>yes you may but i myself dont know yet :-) . i think windows and graphics
>>will be needed. 3d graphics would be super to present the results.
>>as i wrote before, going into libraries is not a problem, i have all the
>>books and documentations.
>>
>....
>Franz,
>I have myself somehow tested this and unfortunately, ruby shall not take
>advantage of the dual CPU. The example I used for this was the calculation
>of the factorial of 100000. This is IMHO a good example to discuss the
>performance question.

Yes, and i am schocked... i have a pentium 3 box (900 mhz) which give me
1800 mips and it needs 14 min 43 secfor the calculation of 100000
multiplications.
14 x 60 + 43 sec = 883 sec
100000 operations / 883 sec = 113 flops???
c64 basic calculated 10000 sqrts within less than 20 minutes, that amount to
10000 / 1200 = 8 flops. at 0.9 mhz, that is 1/1000.
(8 / 113) / (0.9 / 900) = 70.8
Does this mean that ruby is 70 (seventy) times slower than c64 basic, not
counting the advantages of 32 vs 8 bit????
Or did i just make some very stupid error? Here's the program:


def fac( n )
f = 1
(1..n).each { |x| f *= x }
return f
end

print "%d\n" % fac( ARGV[0].to_i )


>Especially in your case, where you master a domain where other people are
>generally of little help, you need to be very autonomous

That's what our professors always tell us to. :-(

>and in that regard, Ruby is very good, it helps you to really cope with
>some level of complexity. In the example of the factorial. It takes 1
>minute to write in ruby and even if you deal with a very large integer,
>it's ruby's business, not yours, and it takes 10 min or so to compute.
>
>Or you may get the result in ten seconds after one day of laborious coding
>in another language. Which language was best in that example?

The one where it takes me 1 min to write and 10 sec to run. why is their no
such thing?

>Just my 2 cents (of Euro)
>Jean-Pierre
>PS: There are ruby-Tk, ruby-OpenGL, ruby-Fox (careful I did not test it as
>thoroughly as it would be necessary), ruby-SVG, ruby-fltk ... interfaces to
>best known graphical libraries or toolkit to make desktop or web user
>front-ends.

thanks, i'll have a look.

Franz

_________________________________________________________________
Die rote Karte für lästige E-Mails. MSN Hotmail mit Junk-Mail-Filter.
http://www.msn.de/antispam/prevention/junkmailfilter Jetzt kostenlos
anmelden!
Jim Freeze
2005-05-11 11:59:42 UTC
Permalink
* Franz Hartmann <***@hotmail.com> [2005-05-11 20:43:45 +0900]:

> 1800 mips and it needs 14 min 43 secfor the calculation of 100000
> multiplications.
> 14 x 60 + 43 sec = 883 sec
> 100000 operations / 883 sec = 113 flops???
> c64 basic calculated 10000 sqrts within less than 20 minutes, that amount
> to 10000 / 1200 = 8 flops. at 0.9 mhz, that is 1/1000.
> (8 / 113) / (0.9 / 900) = 70.8
> Does this mean that ruby is 70 (seventy) times slower than c64 basic, not
> counting the advantages of 32 vs 8 bit????
> Or did i just make some very stupid error? Here's the program:
>
>
> def fac( n )
> f = 1
> (1..n).each { |x| f *= x }
> return f
> end
>
> print "%d\n" % fac( ARGV[0].to_i )

I can't answer your question exactly, but there are faster
ways to write the code. (BTW, did c64 basic support
arbitrarily large numbers and their math?)

And one other thing, I removed printing from the timing since
it can take some time to print out such a large number.

% ruby fac 7500
0.498884
0.337408
0.283017 # this is faster than #2
% ruby fac 17500
2.375539
2.075047
2.111601 # looks like a GC happened. Used to be faster.
% ruby fac 27500
5.997851
5.749802
5.797634

% cat fac
def fac1( n )
f = 1
(1..n).each { |x| f *= x }
return f
end

def fac2( n )
f = 1
(1..n).each { |x| f *= x }
end

def fac3( n )
(1..n).inject(1) { |f,x| f * x }
end

start = Time.now
fac1( ARGV[0].to_i )
puts Time.now - start

start = Time.now
fac2( ARGV[0].to_i )
puts Time.now - start

start = Time.now
fac3( ARGV[0].to_i )
puts Time.now - start

--
Jim Freeze
Jim Freeze
2005-05-11 12:11:53 UTC
Permalink
* Jim Freeze <***@freeze.org> [2005-05-11 20:59:42 +0900]:

Let me point out one other thing. If you start with
f = 1.0

instead of
f = 1

that is, floating pt math instead of integer math, you get:
% ruby fac 7500
0.03094
0.038541
0.068006
% ruby fac 17500
0.066106
0.075447
0.128814
% ruby fac 27500
0.10868
0.113806
0.198435

> % ruby fac 7500
> 0.498884
> 0.337408
> 0.283017 # this is faster than #2
> % ruby fac 17500
> 2.375539
> 2.075047
> 2.111601 # looks like a GC happened. Used to be faster.
> % ruby fac 27500
> 5.997851
> 5.749802
> 5.797634
>
> % cat fac
> def fac1( n )
> f = 1
> (1..n).each { |x| f *= x }
> return f
> end
>
> def fac2( n )
> f = 1
> (1..n).each { |x| f *= x }
> end
>
> def fac3( n )
> (1..n).inject(1) { |f,x| f * x }
> end
>
> start = Time.now
> fac1( ARGV[0].to_i )
> puts Time.now - start
>
> start = Time.now
> fac2( ARGV[0].to_i )
> puts Time.now - start
>
> start = Time.now
> fac3( ARGV[0].to_i )
> puts Time.now - start
>
> --
> Jim Freeze

--
Jim Freeze
Ruby: I can explain it to ya but I can't understand it fer ya.
Michael Ulm
2005-05-11 12:11:58 UTC
Permalink
Franz Hartmann wrote:


>> Franz,
>> I have myself somehow tested this and unfortunately, ruby shall not
>> take advantage of the dual CPU. The example I used for this was the
>> calculation of the factorial of 100000. This is IMHO a good example to
>> discuss the performance question.
>
>
> Yes, and i am schocked... i have a pentium 3 box (900 mhz) which give me
> 1800 mips and it needs 14 min 43 secfor the calculation of 100000
> multiplications.
> 14 x 60 + 43 sec = 883 sec
> 100000 operations / 883 sec = 113 flops???
> c64 basic calculated 10000 sqrts within less than 20 minutes, that
> amount to 10000 / 1200 = 8 flops. at 0.9 mhz, that is 1/1000.
> (8 / 113) / (0.9 / 900) = 70.8
> Does this mean that ruby is 70 (seventy) times slower than c64 basic,
> not counting the advantages of 32 vs 8 bit????
> Or did i just make some very stupid error? Here's the program:
>
>
> def fac( n )
> f = 1
> (1..n).each { |x| f *= x }
> return f
> end
>
> print "%d\n" % fac( ARGV[0].to_i )
>

Ruby may be slow, but not that slow. In your computation, you did
not do floating point computations, but arbitrary size integer
computations. Multiplication of an ~100000 digit integer by another
integer is quite costly. Therefore it took so long.

Here is a test for floating point operations:

def harm(n)
(1..n).inject(1.0) {|a, b| a + 1.0 / b}
end

which computes the n'th harmonic number (1 + 1/2 + 1/3 + ... + 1/n).

harm(100000) takes about 1 second on my system.

xyzzy,

Michael

--
Michael Ulm
R&D Team
ISIS Information Systems Austria
tel: +43 2236 27551-219, fax: +43 2236 21081
e-mail: ***@isis-papyrus.com
Visit our Website: www.isis-papyrus.com
Michael Ulm
2005-05-11 12:16:35 UTC
Permalink
Michael Ulm wrote:

> Here is a test for floating point operations:
>
> def harm(n)
> (1..n).inject(1.0) {|a, b| a + 1.0 / b}
> end
>

Correction:
that should be

def harm(n)
(1..n).inject(0.0) {|a, b| a + 1.0 / b}
end

--
Michael Ulm
R&D Team
ISIS Information Systems Austria
tel: +43 2236 27551-219, fax: +43 2236 21081
e-mail: ***@isis-papyrus.com
Visit our Website: www.isis-papyrus.com
James Edward Gray II
2005-05-11 13:44:04 UTC
Permalink
On May 11, 2005, at 5:25 AM, Franz Hartmann wrote:

> can ruby handle two processors?

Not really, no. Ruby's threads are non-native, so they can't take
advantage of Mac OS X's scheduler. Other things can be run on the
other processor while Ruby is running, but Ruby itself will not run
on both (excepting programs that call fork()).

> btw, i know this is a ruby list but is their any way to run windows
> programs on mac?

Yes, with an emulator. Virtual PC is the best choice here. Be
warned though, this process of emulating an operating system inside
another operating system is a massive resource drain. Everything you
do in the Window's environment will suffer greatly and some things
are simply impossible or at least impractical.

If you need to run a lot of Windows' software, you're going to want a
Windows machine, in my opinion.

James Edward Gray II
Robert Klemme
2005-05-11 09:28:11 UTC
Permalink
Dear Franz,

Franz Hartmann wrote:
> Hello all,
>
> just call me Franz. I study physic in Berlin, but i am from bavaria
> (that is in the south of germany).

You sure wanted to say "Bavaria is the southern neighbour of Germany"...
:-)))
(Sorry group, this is just some internal German joke.)

> sorry for my bad english but
> foreign languages are not my strong point. i like more mathematic.
>
> I want to do a physical model calculation about the dynamics of
> incompressibel liquids. I am not sure which is the best programming
> language for this. I think about visual basic, java and ruby. I know
> java quite good and vb and ruby a bit. actually i wanted to do it in
> vb but its to powerful for me. so i am looking for something easier.

VB is too powerful? I've never heard that before...

I'm not really into physical calculations but I'm sure you need a fast
language as these things tend to involve a lot of number crunching. IMHO
that rules out VB, leaving Java and Ruby. For Ruby you might need a C
extension to do the math (depending on your requirements you will have to
write it on your own or you might find something useful on the RAA).
Plain Java can be quite fast if used properly.

> can you tell me the essential differences between java and ruby? what
> can you do in ruby that you cannot do in java? and what about jruby?
> can i combine java and ruby?

Well, there are of course performance differences (depending on the
application at hand). Ruby is usually more concise and easier to read
(IMHO) because it needs less lines of code. Other than that I think you
can do pretty much the same with both.

Maybe it's more important which tools are around: is there a numerical
library capable of doing the kind of stuff you need? Are there IDE's
available that suit you? These kinds of questions.

> Franz
>
> ps. does ruby run on macintosh tiger?

Dunno.

Kind regards

robert
Franz Hartmann
2005-05-11 10:19:18 UTC
Permalink
Hello Robert,

>From: "Robert Klemme" <***@gmx.net>
>Reply-To: ruby-***@ruby-lang.org
>To: ruby-***@ruby-lang.org (ruby-talk ML)
>Subject: Re: ruby vs. java?
>Date: Wed, 11 May 2005 18:30:27 +0900
>
>Dear Franz,
>
>Franz Hartmann wrote:
> > Hello all,
> >
> > just call me Franz. I study physic in Berlin, but i am from bavaria
> > (that is in the south of germany).
>
>You sure wanted to say "Bavaria is the southern neighbour of Germany"...
>:-)))
>(Sorry group, this is just some internal German joke.)

S**preiß damischer ;-) ! Wos wuisch? (<= Sorry to, but that is how we
bavarians react on other germans)
A Preiß is Nice, but a Bayer is Higher.

> > sorry for my bad english but
> > foreign languages are not my strong point. i like more mathematic.
> >
> > I want to do a physical model calculation about the dynamics of
> > incompressibel liquids. I am not sure which is the best programming
> > language for this. I think about visual basic, java and ruby. I know
> > java quite good and vb and ruby a bit. actually i wanted to do it in
> > vb but its to powerful for me. so i am looking for something easier.
>
>VB is too powerful? I've never heard that before...

there is not one vb book which is <1000 sides and everything goes like
this.object.has.another.property.than(the.other.object.which.we.talk.about)...
and you can program excel & word with it. thats what i think, maybe i should
use an excel sheet and do the programming with vb. or is their something
like ruby for excel?

>
>I'm not really into physical calculations but I'm sure you need a fast
>language as these things tend to involve a lot of number crunching. IMHO
>that rules out VB, leaving Java and Ruby. For Ruby you might need a C
>extension to do the math (depending on your requirements you will have to
>write it on your own or you might find something useful on the RAA).
>Plain Java can be quite fast if used properly.

Why is vb not a fast language? I have read statistics who say that you can
program in vb 10x as faster than in c/c++. i dont know, i cant c and i dont
like it too. /must/ i write an extension to do math in ruby?
how fast can java be? depends this not on the browser?
and what is RAA? i guess some archive but where can i find it?

> > can you tell me the essential differences between java and ruby? what
> > can you do in ruby that you cannot do in java? and what about jruby?
> > can i combine java and ruby?
>
>Well, there are of course performance differences (depending on the
>application at hand). Ruby is usually more concise and easier to read
>(IMHO) because it needs less lines of code. Other than that I think you
>can do pretty much the same with both.

Is this good? Can we say: Less code => run faster?

>Maybe it's more important which tools are around: is there a numerical
>library capable of doing the kind of stuff you need? Are there IDE's
>available that suit you? These kinds of questions.

Oh, dont you worry about the library, i think i have all the necessary math
books on my shelf.
What is IDE?

> > Franz
> >
> > ps. does ruby run on macintosh tiger?
>
>Dunno.

I dont too, so there is at least one thing we have common. I think we will
be friends, if if you are a Preiß :-) .

>Kind regards
>
> robert
>

Franz

_________________________________________________________________
Nicht lange suchen – finden! MSN Suche. http://search.msn.de/ Jetzt testen!
wannes
2005-05-11 11:07:49 UTC
Permalink
> maybe i should use an excel sheet and do the programming with vb.

hehe, you sound like my dad ;)

Whenever he want to do something, he automaticly uses excel/acces for
the data, and writes all programmingstuff in VB(a). I've tried to open
up his mind, but I guess he's just getting old ;) (don't tell him i said
that :p)

> Can we say: Less code => run faster?

no, but we can say: Less code => faster writing ;)

>> Maybe it's more important which tools are around: is there a numerical
>> library capable of doing the kind of stuff you need? Are there IDE's
>> available that suit you? These kinds of questions.
>
> Oh, dont you worry about the library, i think i have all the necessary
> math books on my shelf.
> What is IDE?

IDE: Integrated Development Environment
Freeride is an example of an IDE for Ruby: http://freeride.rubyforge.org/

grtz,
wannes
Robert Klemme
2005-05-11 12:04:17 UTC
Permalink
Franz Hartmann wrote:
> Hello Robert,
>
>> From: "Robert Klemme" <***@gmx.net>
>> Reply-To: ruby-***@ruby-lang.org
>> To: ruby-***@ruby-lang.org (ruby-talk ML)
>> Subject: Re: ruby vs. java?
>> Date: Wed, 11 May 2005 18:30:27 +0900
>>
>> Dear Franz,
>>
>> Franz Hartmann wrote:
>>> Hello all,
>>>
>>> just call me Franz. I study physic in Berlin, but i am from bavaria
>>> (that is in the south of germany).
>>
>> You sure wanted to say "Bavaria is the southern neighbour of
>> Germany"... :-)))
>> (Sorry group, this is just some internal German joke.)
>
> S**preiß damischer ;-) ! Wos wuisch? (<= Sorry to, but that is how we
> bavarians react on other germans)

LOL

> A Preiß is Nice, but a Bayer is Higher.

(A German, pardon: Bavarian, proverb of doubtful quality)

>>> sorry for my bad english but
>>> foreign languages are not my strong point. i like more mathematic.
>>>
>>> I want to do a physical model calculation about the dynamics of
>>> incompressibel liquids. I am not sure which is the best programming
>>> language for this. I think about visual basic, java and ruby. I know
>>> java quite good and vb and ruby a bit. actually i wanted to do it in
>>> vb but its to powerful for me. so i am looking for something easier.
>>
>> VB is too powerful? I've never heard that before...
>
> there is not one vb book which is <1000 sides and everything goes like
>
this.object.has.another.property.than(the.other.object.which.we.talk.about
)...
> and you can program excel & word with it. thats what i think, maybe i
> should use an excel sheet and do the programming with vb. or is their
> something like ruby for excel?

I know that people have undertaken to use Ruby to control Excel before
(there were some requests about this). You might find them by searching
the archives:
http://blade.nagaokaut.ac.jp/ruby/ruby-talk/index.shtml

>> I'm not really into physical calculations but I'm sure you need a
>> fast language as these things tend to involve a lot of number
>> crunching. IMHO that rules out VB, leaving Java and Ruby. For Ruby
>> you might need a C extension to do the math (depending on your
>> requirements you will have to write it on your own or you might find
>> something useful on the RAA). Plain Java can be quite fast if used
>> properly.
>
> Why is vb not a fast language? I have read statistics who say that
> you can program in vb 10x as faster than in c/c++.

Well yes, but the software will likely run faster in C or C++.

> i dont know, i
> cant c and i dont like it too. /must/ i write an extension to do math
> in ruby?

No, if one of the existing extensions does what you need.

> how fast can java be? depends this not on the browser?

??? Java is not only for applets. Of course the speed depends on the
hardware, operating system and algorithms used - as always. :-)

> and what is RAA? i guess some archive but where can i find it?

http://raa.ruby-lang.org/

>>> can you tell me the essential differences between java and ruby?
>>> what can you do in ruby that you cannot do in java? and what about
>>> jruby? can i combine java and ruby?
>>
>> Well, there are of course performance differences (depending on the
>> application at hand). Ruby is usually more concise and easier to
>> read (IMHO) because it needs less lines of code. Other than that I
>> think you can do pretty much the same with both.
>
> Is this good? Can we say: Less code => run faster?

Unfortunately it's not that easy. But: less code => less time to program
and less errors.

>> Maybe it's more important which tools are around: is there a
>> numerical library capable of doing the kind of stuff you need? Are
>> there IDE's available that suit you? These kinds of questions.
>
> Oh, dont you worry about the library, i think i have all the
> necessary math books on my shelf.
> What is IDE?
http://en.wikipedia.org/wiki/Integrated_development_environment

>
>>> Franz
>>>
>>> ps. does ruby run on macintosh tiger?
>>
>> Dunno.
>
> I dont too, so there is at least one thing we have common. I think we
> will be friends, if if you are a Preiß :-) .

*gggg*

Servus

robert
Ralf Müller
2005-05-11 09:42:47 UTC
Permalink
On Wed, 11 May 2005 17:57:10 +0900
"Franz Hartmann" <***@hotmail.com> wrote:

> Hello all,
>
> just call me Franz. I study physic in Berlin, but i am from bavaria (that is
> in the south of germany). sorry for my bad english but foreign languages are
> not my strong point. i like more mathematic.
>
> I want to do a physical model calculation about the dynamics of
> incompressibel liquids. I am not sure which is the best programming language
> for this. I think about visual basic, java and ruby. I know java quite good
> and vb and ruby a bit. actually i wanted to do it in vb but its to powerful
> for me. so i am looking for something easier.
>
> can you tell me the essential differences between java and ruby? what can
> you do in ruby that you cannot do in java? and what about jruby? can i
> combine java and ruby?

Well...

it depends on what you mean by 'the best programming language for this'?
Should it be fast? or have beautiful code? Should it be extensible? Do you want to rely on existing libraries?

I did some numerical analysis in geophysics and it took 1-7 days to get the results. So, you should keep in mind how expensive you number crunching will be. Maybe a week is to long for you.

btw: there is a 'Runge-Kutta Ruby Class' avaliable, search freshmeat

regards
ralf
Franz Hartmann
2005-05-11 10:32:02 UTC
Permalink
>From: Ralf Müller <***@imp-ag.de>
>Reply-To: ruby-***@ruby-lang.org
>To: ruby-***@ruby-lang.org (ruby-talk ML)
>Subject: Re: ruby vs. java?
>Date: Wed, 11 May 2005 18:42:47 +0900
>
>On Wed, 11 May 2005 17:57:10 +0900
>"Franz Hartmann" <***@hotmail.com> wrote:
>
> > Hello all,
> >
> > just call me Franz. I study physic in Berlin, but i am from bavaria
>(that is
> > in the south of germany). sorry for my bad english but foreign languages
>are
> > not my strong point. i like more mathematic.
> >
> > I want to do a physical model calculation about the dynamics of
> > incompressibel liquids. I am not sure which is the best programming
>language
> > for this. I think about visual basic, java and ruby. I know java quite
>good
> > and vb and ruby a bit. actually i wanted to do it in vb but its to
>powerful
> > for me. so i am looking for something easier.
> >
> > can you tell me the essential differences between java and ruby? what
>can
> > you do in ruby that you cannot do in java? and what about jruby? can i
> > combine java and ruby?
>
>Well...
>
>it depends on what you mean by 'the best programming language for this'?
>Should it be fast? or have beautiful code? Should it be extensible? Do you
>want to rely on existing libraries?

as i said before, i need no libraries. have all the books at hand.
should be fast. what do you call a beautiful language?

>I did some numerical analysis in geophysics and it took 1-7 days to get the
>results. So, you should keep in mind how expensive you number crunching
>will be. Maybe a week is to long for you.

oh, it will not be expensive at all because i can use my own computer. or
maybe i will by me a mac, that costs less then €3000.
if i can get the programm written in a week i will be very happy.

>btw: there is a 'Runge-Kutta Ruby Class' avaliable, search freshmeat

thanks for the hint, but i went to freshmeat.com and it did not found
anything: it just gave me "Popular Categories" and such stuff. I mean,
<eiteitei>skin care is quite nice</eiteitei>, but not what i look for. WHere
must i look?

>
>regards
>ralf
>

thanks,
Franz

_________________________________________________________________
Ungestört surfen. MSN Toolbar mit Pop-up-Blocker. http://toolbar.msn.de/
Jetzt kostenlos downloaden!
Ralf Müller
2005-05-11 11:08:33 UTC
Permalink
> as i said before, i need no libraries. have all the books at hand.
> should be fast. what do you call a beautiful language?
I wrote beautiful code, i.e. code that is easy to read and to understand even if you look at it for the first time.
just ruby

If it should be fast, use a unix terminal at the physics deprtement und choose C or Fortran. 2D or 3D can be generated out of text-files with gnuplot

>
> >I did some numerical analysis in geophysics and it took 1-7 days to get the
> >results. So, you should keep in mind how expensive you number crunching
> >will be. Maybe a week is to long for you.
>
> oh, it will not be expensive at all because i can use my own computer. or
> maybe i will by me a mac, that costs less then _3000.
> if i can get the programm written in a week i will be very happy.
Maybe 'expensive' was too ambiguous: I meant, how much time will it take to run you program on a given machine, i.e. you computer. 1 day?, 1 week?

>
> >btw: there is a 'Runge-Kutta Ruby Class' avaliable, search freshmeat
>
> thanks for the hint, but i went to freshmeat.com and it did not found
> anything: it just gave me "Popular Categories" and such stuff. I mean,
> <eiteitei>skin care is quite nice</eiteitei>, but not what i look for. WHere
> must i look?
try http://freshmeat.net/projects/rk4/
baalbek
2005-05-16 01:22:49 UTC
Permalink
Franz Hartmann wrote:

>> From: Ralf Müller <***@imp-ag.de>

> as i said before, i need no libraries. have all the books at hand.

I think Franz is referring to software libraries, not public libraries :-)

Baalbek
Joel VanderWerf
2005-05-11 18:52:18 UTC
Permalink
Ralf Müller wrote:
> On Wed, 11 May 2005 17:57:10 +0900
> "Franz Hartmann" <***@hotmail.com> wrote:
>
>
>>Hello all,
>>
>>just call me Franz. I study physic in Berlin, but i am from bavaria (that is
>>in the south of germany). sorry for my bad english but foreign languages are
>>not my strong point. i like more mathematic.
>>
>>I want to do a physical model calculation about the dynamics of
>>incompressibel liquids. I am not sure which is the best programming language
>>for this. I think about visual basic, java and ruby. I know java quite good
>>and vb and ruby a bit. actually i wanted to do it in vb but its to powerful
>>for me. so i am looking for something easier.
>>
>>can you tell me the essential differences between java and ruby? what can
>>you do in ruby that you cannot do in java? and what about jruby? can i
>>combine java and ruby?
>
>
> Well...
>
> it depends on what you mean by 'the best programming language for this'?
> Should it be fast? or have beautiful code? Should it be extensible? Do you want to rely on existing libraries?
>
> I did some numerical analysis in geophysics and it took 1-7 days to get the results. So, you should keep in mind how expensive you number crunching will be. Maybe a week is to long for you.
>
> btw: there is a 'Runge-Kutta Ruby Class' avaliable, search freshmeat
>
> regards
> ralf

Ruby is working out pretty well for numerical simulations for my work,
but that depends heavily on using C code generation to produce fast code
to perform rk4 (Runge-Kutta 4th order) evaluations. Speeds ends up a
factor of two slower than, say, Matlab, but that's not because of ruby,
it's because we're not doing pure ODEs, but hybrid ODEs with state
changes, reconfigurable dataflow, and guards that have to be checked at
every timestep.

If you're willing either to write a core of C code or to write a code
generator, then you can probably keep 90% or 95% of the rest of your
code (GUI, input/output processing, file handling, etc.) in ruby and be
happier overall.
Dibya Prakash
2005-05-12 01:47:41 UTC
Permalink
Hi,
I definitely agree "NO VB".My preferrence would be C++.It will give u
a good mathematical support.

On 5/12/05, Joel VanderWerf <***@path.berkeley.edu> wrote:
> Ralf Müller wrote:
> > On Wed, 11 May 2005 17:57:10 +0900
> > "Franz Hartmann" <***@hotmail.com> wrote:
> >
> >
> >>Hello all,
> >>
> >>just call me Franz. I study physic in Berlin, but i am from bavaria (that is
> >>in the south of germany). sorry for my bad english but foreign languages are
> >>not my strong point. i like more mathematic.
> >>
> >>I want to do a physical model calculation about the dynamics of
> >>incompressibel liquids. I am not sure which is the best programming language
> >>for this. I think about visual basic, java and ruby. I know java quite good
> >>and vb and ruby a bit. actually i wanted to do it in vb but its to powerful
> >>for me. so i am looking for something easier.
> >>
> >>can you tell me the essential differences between java and ruby? what can
> >>you do in ruby that you cannot do in java? and what about jruby? can i
> >>combine java and ruby?
> >
> >
> > Well...
> >
> > it depends on what you mean by 'the best programming language for this'?
> > Should it be fast? or have beautiful code? Should it be extensible? Do you want to rely on existing libraries?
> >
> > I did some numerical analysis in geophysics and it took 1-7 days to get the results. So, you should keep in mind how expensive you number crunching will be. Maybe a week is to long for you.
> >
> > btw: there is a 'Runge-Kutta Ruby Class' avaliable, search freshmeat
> >
> > regards
> > ralf
>
> Ruby is working out pretty well for numerical simulations for my work,
> but that depends heavily on using C code generation to produce fast code
> to perform rk4 (Runge-Kutta 4th order) evaluations. Speeds ends up a
> factor of two slower than, say, Matlab, but that's not because of ruby,
> it's because we're not doing pure ODEs, but hybrid ODEs with state
> changes, reconfigurable dataflow, and guards that have to be checked at
> every timestep.
>
> If you're willing either to write a core of C code or to write a code
> generator, then you can probably keep 90% or 95% of the rest of your
> code (GUI, input/output processing, file handling, etc.) in ruby and be
> happier overall.
>
>
speechexpert
2005-05-12 14:02:48 UTC
Permalink
I want to set up a state machine, in this case I am parsing a simple
scripting language using regexp, and then running
a segment of code, which might be another regexp, etc. I'd like to be be
able to specify that code in a file...

Can I feed a String like "str = a.scan(/\<cat.*?>/)" #regexp here
is just an example ;)
into a method or any other way and have it execute?

TIA
John B
speechexpert
2005-05-12 14:37:14 UTC
Permalink
simple question - Looks like Kernel#eval is the answer ;)

----- Original Message -----
From: "speechexpert" <***@sbcglobal.net>
To: "ruby-talk ML" <ruby-***@ruby-lang.org>
Sent: Thursday, May 12, 2005 7:02 AM
Subject: Running a String as Ruby Code at Run-Time?


> I want to set up a state machine, in this case I am parsing a simple
> scripting language using regexp, and then running
> a segment of code, which might be another regexp, etc. I'd like to be be
> able to specify that code in a file...
>
> Can I feed a String like "str = a.scan(/\<cat.*?>/)" #regexp
here
> is just an example ;)
> into a method or any other way and have it execute?
>
> TIA
> John B
>
>
>
Brian Schröder
2005-05-12 14:38:13 UTC
Permalink
On 12/05/05, speechexpert <***@sbcglobal.net> wrote:
> I want to set up a state machine, in this case I am parsing a simple
> scripting language using regexp, and then running
> a segment of code, which might be another regexp, etc. I'd like to be be
> able to specify that code in a file...
>
> Can I feed a String like "str = a.scan(/\<cat.*?>/)" #regexp here
> is just an example ;)
> into a method or any other way and have it execute?

Take a look at eval

irb(main):001:0> s = "1+10+13"
=> "1+10+13"
irb(main):002:0> eval s
=> 24
irb(main):003:0> eval 's.scan(/\\d+/)'
=> ["1", "10", "13"]

regards,

Brian
>
> TIA
> John B
>
>


--
http://ruby.brian-schroeder.de/

Stringed instrument chords: http://chordlist.brian-schroeder.de/
speechexpert
2005-05-12 18:19:56 UTC
Permalink
Here's the coding scenario:

I match an input string with regexp and store captuing group in an @instance
var.
The captured string may have 'difficult' characters such as ? " ' etc.
Considering that the regexp will capture all those chars, is Ruby smart
enough not to choke on them when they show up in a string
that will be used in various methods or expressions?

JB
A***@noaa.gov
2005-05-12 19:58:27 UTC
Permalink
On Wed, 11 May 2005, Ralf [ISO-8859-1] Müller wrote:

> Well...
>
> it depends on what you mean by 'the best programming language for this'?
> Should it be fast? or have beautiful code? Should it be extensible? Do you
> want to rely on existing libraries?
>
> I did some numerical analysis in geophysics and it took 1-7 days to get the
> results. So, you should keep in mind how expensive you number crunching will
> be. Maybe a week is to long for you.

one thing no one has thrown out here is the idea of clustering your code. we
run a small linux cluster of 30 nodes and this make many codes which we can
develop quickly but do not run quickly feasible to test. we do a lot of this
since many things just get thrown away - as is typical in research. in any
case i wrote a tool, rq (ruby queue), which allows one to setup a linux
cluster in about 5 minutes. for some domains it certainly 'faster' to get
your science done by just buying more computers and writing code in something
that allows the fastest devleopment time which, in our case, is ruby and idl.
no one likes to think of things this way but it can be much more economical to
have phd's running slow code on a cluster today vs. fast code in a single node
next month - especially when preliminary results are required for more grants
(my work for today for example ;-) ).

2 cts.

kind regards.

-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| renunciation is not getting rid of the things of this world, but accepting
| that they pass away. --aitken roshi
===============================================================================
Steve Callaway
2005-05-11 10:33:24 UTC
Permalink
Franz Hartmann
2005-05-11 12:10:03 UTC
Permalink
Hello Steve,

>From: Steve Callaway <***@yahoo.com>
>Reply-To: ruby-***@ruby-lang.org
>To: ruby-***@ruby-lang.org (ruby-talk ML)
>Subject: Re: ruby vs. java?
>Date: Wed, 11 May 2005 19:33:24 +0900
>
>Franz,
>
>Just my 2 cents worth: Object-oriented programming is
>not a magic bullet. But in the scale of these things,
>Visual Basic is a poor substitute for a OO programming
>language; it is clumsy, slow, inelegant and its
>tendency towards OO is more to sell it to uneducated
>managers than to the poor programmers who are forced
>to work with it.

Slow it is probable, if it is as slow as ruby (see my factorial mail). but
why inelegant? i think it is a very elegant thing to integrate a language
with an application (excel) (<= maybe i am really growing old :-) but still
i think that is a great idea)

>The choice is therefore between Java, ruby and/or C or
>C++. Java almost certainly has math libraries which
>will do what you want BUT I would make that the first
>point of departure, to ensure that it does have the
>libraries you need at a price you are willing to pay
>if you intend to go down the Java road.

as i said before, no problem with the library - have all the necessary books
on my shelf

>Conversely if you find that the code is not available
>(or not available at a price which you are prepared to
>pay) then I would look very closely at ruby as the
>best fit. It is fast, allows insertion of C compiled
>objects for the removal of bottlenecks or to solve
>particular problems for which none is available within
>the standard version of the language itself.

maybe i should really beginn learning c...
look how good i am already:
#define bah (unsigned double *)(&(--x)++.h->h?x:y) ~= 0815

>Moreover
>ruby will require considerably less code to be written
>overall than Java. My own experience suggests that the
>learning curve with Ruby is markedly less steep than
>with Java and you will be doing things faster and more
>efficiently in a shorter space of time using Ruby than
>you could ever hope to do in Java.

??? maybe its the inbreeding but i am confused... the learning curve with
ruby is /less steep/ but i will be doing things /faster... in a shorter
space of time/ ?

Franz

>rgds
>
>Steve Callaway
>
>--- Franz Hartmann <***@hotmail.com> wrote:
> > Hello Michael and all of you,
> >
> > >From: Michael Ulm <***@isis-papyrus.com>
> > >Reply-To: ruby-***@ruby-lang.org
> > >To: ruby-***@ruby-lang.org (ruby-talk ML)
> > >Subject: Re: ruby vs. java?
> > >Date: Wed, 11 May 2005 18:19:01 +0900
> > >
> > >Franz Hartmann wrote:
> > >>Hello all,
> > >>
> > >--snip--
> > >>I want to do a physical model calculation about
> > the dynamics of
> > >>incompressibel liquids. I am not sure which is the
> > best programming
> > >>language for this. I think about visual basic,
> > java and ruby. I know java
> > >>quite good and vb and ruby a bit. actually i
> > wanted to do it in vb but its
> > >>to powerful for me. so i am looking for something
> > easier.
> > >>
> > >>can you tell me the essential differences between
> > java and ruby? what can
> > >>you do in ruby that you cannot do in java? and
> > what about jruby? can i
> > >>combine java and ruby?
> > >>
> > >
> > >Sorry Franz, you are on a completely wrong track
> > there. As much as
> > >I hate to steer people away from Ruby, I don't
> > think any of the
> > >programming languages you mention are a good choice
> > for numeric
> > >simulations (if you would have to do it in one of
> > those languages,
> > >Ruby would be the best of the three for most
> > applications).
> >
> > Why are the programming languages i need not a good
> > choice? Everyone says
> > that object oriented programming is much faster than
> > normal. Java has more
> > object oriented feetures than ruby, or supports ruby
> > interfaces and things
> > like that too? i have not found any thing about it
> > but documentation is very
> > poor.
> >
> > >I would recommend Octave as the best free choice
> > for getting
> > >solutions for (partial) differential equations. If
> > you have money
> > >to burn, you may want to look at Matlab or,
> > depending on your
> > >specific needs, Maple or Mathematica.
> >
> > i cannot use octave. SGI octave is a unix machine
> > and i need windows
> > compatible, or best case macintosh, because i need
> > use word & excel & power
> > point (& counterstrike *g* ). which programming
> > languages run on octave?
> > thank you for the suggestion, i have already tried
> > matlab but it is not good
> > to. I want to do object oriented programming because
> > it is faster.
> >
> > >HTH,
> >
> > what means HTH?
> >
> > >Michael
> > >
> > >P.S. do yourself a favour and forget that such a
> > beast as vb exists.
> >
> > Why that? VB is industry standard, a VERY powerful
> > object oriented language.
> > All programmers i know write in VB, and excel, word
> > etc also use VB. What is
> > wrong about it? (apart from that it is very
> > difficult)
> >
> > >
> > >--
> > >Michael Ulm
> > >R&D Team
> > >ISIS Information Systems Austria
> > >tel: +43 2236 27551-219, fax: +43 2236 21081
> > >e-mail: ***@isis-papyrus.com
> > >Visit our Website: www.isis-papyrus.com
> >
> > Nice website!
> >
> > Franz
> >
> >
>_________________________________________________________________
> > Die rote Karte für lästige E-Mails. MSN Hotmail mit
> > Junk-Mail-Filter.
> > http://www.msn.de/antispam/prevention/junkmailfilter
> > Jetzt kostenlos
> > anmelden!
> >
> >
> >
>
>
>
>Yahoo! Mail
>Stay connected, organized, and protected. Take the tour:
>http://tour.mail.yahoo.com/mailtour.html
>
>

_________________________________________________________________
Die rote Karte für lästige E-Mails. MSN Hotmail mit Junk-Mail-Filter.
http://www.msn.de/antispam/prevention/junkmailfilter Jetzt kostenlos
anmelden!
Robert Klemme
2005-05-11 12:20:11 UTC
Permalink
Franz Hartmann wrote:
>> The choice is therefore between Java, ruby and/or C or
>> C++. Java almost certainly has math libraries which
>> will do what you want BUT I would make that the first
>> point of departure, to ensure that it does have the
>> libraries you need at a price you are willing to pay
>> if you intend to go down the Java road.
>
> as i said before, no problem with the library - have all the
> necessary books on my shelf

Franz, is it possible that you misunderstand the term "library" in this
context? Folks here are talking about libraries of written code while it
seems to me you are rather talking about a building with a lots of
books...

Kind regards

robert
Ralf Müller
2005-05-11 12:20:40 UTC
Permalink
> >The choice is therefore between Java, ruby and/or C or
> >C++. Java almost certainly has math libraries which
> >will do what you want BUT I would make that the first
> >point of departure, to ensure that it does have the
> >libraries you need at a price you are willing to pay
> >if you intend to go down the Java road.
>
> as i said before, no problem with the library - have all the necessary books
> on my shelf

library = function library

just in case ...






ralf
(-,-)...zZ
Steve Callaway
2005-05-11 12:57:59 UTC
Permalink
Reply to Franz Hartmann:

> Slow it is probable, if it is as slow as ruby (see
my factorial mail).
> but why inelegant? i think it is a very elegant
thing to integrate a
> language with an application (excel) (<= maybe i am
really growing old :-) but
> still i think that is a great idea)


Ruby is not slow relative to VB, on the contrary for
many if not most operations it is significantly
faster, both in terms of execution and of
construction.

The integration of VB into Excel is /extremely/
limited relative to what is possible with Ruby, which
is also capable of manipulation of Excel spreadsheets
via Win32OLE.

>as i said before, no problem with the library - have
> all the necessary >books on my shelf

Here I think you are confusing /physical/ books with
code libraries.

> ??? maybe its the inbreeding but i am confused...
the learning curve
> with ruby is /less steep/ but i will be doing things
/faster... in a shorter
> space of time/ ?

This is just a way of saying that ruby is less
difficult to learn and thus it will be quicker to get
things done. Languages with a steep learning curve are
/more difficult/.

Regards

Steve Callaway

==Message truncated==

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
James Edward Gray II
2005-05-11 13:35:54 UTC
Permalink
On May 11, 2005, at 5:33 AM, Steve Callaway wrote:

> Conversely if you find that the code is not available
> (or not available at a price which you are prepared to
> pay) then I would look very closely at ruby as the
> best fit. It is fast...

I hope you were talking about coding speed here and not execution
speed. I work with several languages and I'm pretty sure Ruby is the
slowest (execution). Java is definitely faster at most things and
even Perl is significantly quicker in my experiments.

Don't get me wrong, I adore Ruby. I do believe it's very fast to
code in, but for execution speed, well, there's a reason we're very
excited about YARV. :)

James Edward Gray II
Nikolai Weibull
2005-05-11 11:42:16 UTC
Permalink
Franz Hartmann, May 11:

> just call me Franz.

Why would we call you anything else?,
nikolai

--
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
Franz Hartmann
2005-05-11 11:47:23 UTC
Permalink
>From: Nikolai Weibull <mailing-lists.ruby-***@rawuncut.elitemail.org>
>Reply-To: ruby-***@ruby-lang.org
>To: ruby-***@ruby-lang.org (ruby-talk ML)
>Subject: Re: ruby vs. java?
>Date: Wed, 11 May 2005 20:42:16 +0900
>
>Franz Hartmann, May 11:
>
> > just call me Franz.
>
>Why would we call you anything else?,
> nikolai

well i don't know why you would. thats why i make sure. :-)

Franz

>--
>Nikolai Weibull: now available free of charge at http://bitwi.se/!
>Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
>main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
>

_________________________________________________________________
So einfach geht das. MSN Toolbar mit Pop-up-Blocker. http://toolbar.msn.de/
Jetzt kostenlos downloaden und gut ist!
Jason Foreman
2005-05-11 12:53:34 UTC
Permalink
Random thoughts related to this topic:

+1 for ForTran. Learn to love it.

The SGI box is the Octane, not the Octave.

Don't start this project in ruby, because when your program takes 3
months to run you'll just rewrite it in ForTran anyway...

Repeat after me: "I will not use Visual Basic. I will NOT use Visual Basic"

Don't force an Object Oriented design onto your numerical analysis
problem unless there is good reason too do so. You'll shoot yourself
in the foot before you even get started.

Java does not run only in a web browser, and its speed is certainly
not related to running in a browser. But it's not the right tool for
this job either.

Less code != faster code.

Mathematica would probably work too, if you can afford it or your Uni
has it available.


Jason
Cameron McBride
2005-05-11 13:28:58 UTC
Permalink
> Random thoughts related to this topic:

and some random responses.

> +1 for ForTran. Learn to love it.

no. I'll interface when necessary, but love it? heh. no.

> Don't start this project in ruby, because when your program takes 3
> months to run you'll just rewrite it in ForTran anyway...

Who is this "Tran" you speak of, and why do you write For them? ;)

how many small scientific programs really grow up into projects? What
I've noticed is that a lot of scientific programs actually skip a lot
of the test / usage cycle. Using a simplier programming language
(interpreted) might help you a lot in the design and tweak stages. To
pound cliches, "you spend less time creating scaffolding for the
language".

> Repeat after me: "I will not use Visual Basic. I will NOT use Visual Basic."

Good man. This I endorse.

> Java does not run only in a web browser, and its speed is certainly
> not related to running in a browser. But it's not the right tool for
> this job either.

actually, that might not be true. I saw some very smart people talk
about making Java useful for some big tasks.
http://www.cs.berkeley.edu/Research/Projects/titanium/
http://www.siam.org/meetings/pp04/yelick.htm

I just think ruby is far nicer, and more appropriate to the scale I'm
dealing with.

Cameron
Christian Neukirchen
2005-05-11 16:18:58 UTC
Permalink
Jason Foreman <***@gmail.com> writes:

> Random thoughts related to this topic:
>
> +1 for ForTran. Learn to love it.
>
> The SGI box is the Octane, not the Octave.
>
> Don't start this project in ruby, because when your program takes 3
> months to run you'll just rewrite it in ForTran anyway...
>
> Repeat after me: "I will not use Visual Basic. I will NOT use Visual Basic."
>
> Don't force an Object Oriented design onto your numerical analysis
> problem unless there is good reason too do so. You'll shoot yourself
> in the foot before you even get started.

Ahh, if only Fortress was ready for use...

> Jason
--
Christian Neukirchen <***@gmail.com> http://chneukirchen.org
b***@aol.com
2005-05-12 13:04:29 UTC
Permalink
Jason Foreman wrote:
> Random thoughts related to this topic:
>
> +1 for ForTran. Learn to love it.

<snip>

> Don't force an Object Oriented design onto your numerical analysis
> problem unless there is good reason too do so. You'll shoot yourself
> in the foot before you even get started.

I agree, but note that Fortran 95 does have user-defined types with
public and private data members and operator overloading (but not
inheritance), so it has some support for OOP (although not as much as
C++ does). The matrix and vector classes I see defined in C++ numerics
books often just create part of the functionality (such as whole-array
operations) that is built in to the arrays of Fortran 95.
James Britt
2005-05-11 13:29:49 UTC
Permalink
Franz Hartmann wrote:
> Hello all,
>
> just call me Franz. I study physic in Berlin, but i am from bavaria
> (that is in the south of germany).

That's the best part.

(Meine Frau ist von Kempten, in Allgäu)

James
Steve Callaway
2005-05-12 05:00:09 UTC
Permalink
--- James Edward Gray II <***@grayproductions.net>
wrote:
> On May 11, 2005, at 5:33 AM, Steve Callaway wrote:
>
> > Conversely if you find that the code is not
> available
> > (or not available at a price which you are
> prepared to
> > pay) then I would look very closely at ruby as the
> > best fit. It is fast...
>
> I hope you were talking about coding speed here and
> not execution
> speed. I work with several languages and I'm pretty
> sure Ruby is the
> slowest (execution). Java is definitely faster at
> most things and
> even Perl is significantly quicker in my
> experiments.
>
> Don't get me wrong, I adore Ruby. I do believe it's
> very fast to
> code in, but for execution speed, well, there's a
> reason we're very
> excited about YARV. :)
>
> James Edward Gray II
>

I wouldn't know since I never actually sat down to
benchmark anything in ruby, but in my experience it is
fast enough to do the /extremely/ complex
configuration of the server setup for a /very/ large
Scandinavian bank without even giving pause for
reflection. Fast I guess is a relative concept, but my
users love it.

Rgds

Steve Callaway

Stvee



__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Horst Duchene
2005-05-13 12:54:28 UTC
Permalink
Hi Franz,

recently I came across a book from two physics teaching ruby by
calculating the "The Two-Body Problem". This might be a motivation to
use ruby:

http://www.artcompsci.org/kali/vol/two_body_problem_1/doc/files/_/_title_ok.html

Horst
Loading...