Ruby vs Java vs c++

On Mon, 2006-11-20 at 15:05 +0900, Friedrich D. wrote:

Why not Ruby and Java and C++?
The realy unanswered question is when is one better than the other. I
even have seen someone using C for “scripting” :wink:

:slight_smile:
http://www.softintegration.com/

Ch is an embeddable C/C++ interpreter for cross-platform scripting,
shell programming, 2D/3D plotting, numerical computing, and embedded
scripting. Ch is the solution for:

On 20/nov/06, at 16:20, stef wrote:

My literacy is just fine, thank you very much. For the sake of
speed, I
use shortcuts.

http://www.google.com/search?q=dvorak+keyboard

On Sun, 19 Nov 2006 17:20:29 -0800, Paul L. wrote:

I thought you would find it useful, in your valiant efforts to gain greater
literacy and achieve clearer communications with your fellow man. :slight_smile:

My literacy is just fine, thank you very much. For the sake of speed, I
use shortcuts.
I realize you are a programmer but contrary to the machines you program,
which interpret code literally, you hopefully have the power to
INTERPRET,
as opposed to a chip.
Surely, you can make out that “u” = “you”, etc…

On 2006-11-20 10:16:19 -0500, stef [email protected] said:

well that’s really helpful…
Surely, you can make out that “u” = “you”, etc…
Sure, I can, but I’ll be less inclined to undertake the effort of
reading something if it makes my eyes bleed. Failing to use proper
English is jarring to me. Most of us grew up reading books; the English
you use is not the English we are used to reading.

How much time do you save? You realize that abbreviating tiny words
like “you” and “thanks” are dwarfed by other words, like “programmer”,
“contrary”, and “interpret”?

Best,
James

stef wrote:

My literacy is just fine, thank you very much. For the sake of speed, I
use shortcuts.
I realize you are a programmer but contrary to the machines you program,
which interpret code literally, you hopefully have the power to INTERPRET,
as opposed to a chip.
Surely, you can make out that “u” = “you”, etc…

Not everyone has English as a first language and therefore the use of
regional and or cultural variants is unlikely to aid communication, even
native speakers can have problems. Remember that Ruby was developed by a
Japanese speaker. If Matz had shown your arrogance we would all be VB
programmers! Isn’t is nice that Matz put the effort into communicating
clearly with other people. If you can’t be bothered to take the time to
communicate then save yourself even more time by not hitting the send
button.

On Tue, 21 Nov 2006, stef wrote:

My literacy is just fine, thank you very much. For the sake of speed, I
use shortcuts.

If you are using vi or vim you can program the editor to expand
abbreviations for you. In vim you can lookup :ab in the help
system:-
:he :ab
I’m almost certain Emacs can do abbreviation expansion as well. There
is also automatic completion available in vim for, that matter, see
:he compl-generic
for more on this. Searching for tools to help with RSI will
provide other alternatives.

You appear to be using the Pan newsreader. I’m unfamiliar with it,
and a quick look around the pan web site turns up nothing about
configuring the editor for it, so I’d suggest you look on a Pan
mailing list about how to configure it to use you favourite editor.

I realize you are a programmer but contrary to the machines you program,
which interpret code literally, you hopefully have the power to INTERPRET,
as opposed to a chip.
Surely, you can make out that “u” = “you”, etc…

This moves effort from you to the N people reading the message.
Given the way much reading is done by word shape rather than reading
individual letters, this is at best inconsiderate. As you have
seen, it can be misconstrued as ignorance.

    Hugh

Reid T. [email protected] writes:

On Mon, 2006-11-20 at 15:05 +0900, Friedrich D. wrote:

Why not Ruby and Java and C++?
The realy unanswered question is when is one better than the other. I
even have seen someone using C for “scripting” :wink:

:slight_smile:
http://www.softintegration.com/
Yeah I know that but I was talking of compiled C. So a bit different
;-). IIRC that was for parsing some XML…

Ch is an embeddable C/C++ interpreter for cross-platform scripting,
shell programming, 2D/3D plotting, numerical computing, and embedded
scripting. Ch is the solution for:
It’s very C-ish but the libraries make the difference. However others
have written C-Interpreters also:
Eic (now abondoned)
Cint http://root.cern.ch/root/Cint.html
and another one which name I forgot…

And I remember that in anotherthread someone suggested to use the Ruby
Interpreter as a somewhat bigger library :wink:

Regards
Friedrich

spooq wrote:

Isn’t VBA rather similar to Ruby, anyway?

To me it looks like an OO BASIC with support for databases and Office apps.

My two cents here as someone who swtiched from VB script to Ruby on why
not VBA, is pretty simple. If you learn VBA your are locked in to MS
products only this was my feeling as I’ve not heard much of VB anything
on a non-Windows environment or at least none to take note of. While
it probably is the best way to go if you are in a MS only environment
and are ok with that it seems at least to be a non-transferable
language. I did switch to Ruby however exactly because as was said
above it is very much like VBA which I had experience with. The other
reason I switch if the OP cares is that Ruby is a younger language and
this give me an opportunity to learn the language before/if the
language becomes more popular. So far (6 months) I like Ruby very much
and with the help of some people on this list I’ve managed to put into
production some of my scripts.

CParticle

spooq wrote:

I would like to suggest the newbie learns VBA.

Perhaps, but IMHO after he learns programming. Otherwise VBA is a VBI.
It is
certainly not a model for reliable programming style. It is only a small
bit removed from its origins in what may be the worst computer language
ever conceived.

The financial world
lives and breathes Excel. VBA is by far the language most likely to be
of use to someone entering that world. It’s pretty clear programming
is a tool for his/her use, rather than something that (s)he wants to
do for it’s own sake. Having said that, Excel can be viewed as a type
of DSL in it’s own right, so pushing the boundaries of what can be
done ‘natively’ is a great place to start.

OTOH, there are all sorts of interfaces to Excel objects, interfaces
that
allow one to use more modern programming methods, and Ruby has one of
those. This adds to portability in a way that a complete absorption in
VBA
would not – for example one might create a generic solution to a
financial
computation that interacts with, but is not dependent on, the Excel/VBA
interface. That solution could then be ported and used elsewhere. This
strategy would prolong the professional lifetime – the viability – of
a
programmer who adopted this approach.

David K. wrote:

Isn’t VBA rather similar to Ruby, anyway?
Not remotely. It has its roots in Visual Basic, which Microsoft
abandoned a
few years ago in its zeal to sell a different, newer language to all its
loyal adherents. VBA will suffer the same fate in time, because it is
owned
by a corporation whose goal is to sell new products to old customers.

VBA is not a very good model for teaching programming principles, and it
is
important to remember it is a single-vendor product, one that will rise
or
fall with that vendor’s fortunes. Also Microsoft has no incentive to
cooperate with third parties – those will good long-term recall will
remember the brouhaha surrounding Microsoft and Java.

I realize you are a programmer but contrary to the machines you program,
which interpret code literally, you hopefully have the power to INTERPRET,
as opposed to a chip.
Surely, you can make out that “u” = “you”, etc…

Although I must agree that Paul was nitpicking too much, and I am happy
to be a bit flexible (for example lots of friends forget to capitalize
the first word of a sentence), some of those abbreviation you used do
take a while to be “processed”.

You may think your readers will be happy to put up with it, but most
probably if they cannot work out one of your abbreviation in some short
time, they’ll just give up and move to the next question.

So it’s all a matter of who has the most interest in the communication,
if you or your reader.

That said, maybe you can set a small ruby script and everyone wins, you
get speed and the rest of us get clarity. :slight_smile:

Diego

On 11/20/06, stef [email protected] wrote:

On Sun, 19 Nov 2006 17:20:29 -0800, Paul L. wrote:

My literacy is just fine, thank you very much. For the sake of speed, I
use shortcuts.

You realise how self-defeating that is? Your speed of typing translates
into greater work for the reader. In your effort to seek help you should
be writing clearly. If that means that you sit down at a PC instead of
replying from your smartphone then do so.

Surely, you can make out that “u” = “you”, etc…

Yes we can, but it’s annoying. Text speak is bad.

Also consider that this is an international group. Phonetic text
abbreviations
that may be obvious to an english speaker, might be unreadable to many
worldwide Ruby-talk readers.

EB wrote:

I feel old.
You feel old? Apparently you missed my post on ILLIAC I. :slight_smile:


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.

Roseanne Z. wrote:

I asked several Java experts include Jason Hunter, Daniel Brookshier
about the question, why? The answers are the same, JIT!!!

Your answer is processor cache relative. It also depends on how well
the C++ optimizer works.
OTOH, D (Digital Mars D) also turns in times faster than C++…probably
for similar reasons. And it’s a compiled language. Theoretically, with
a good optimizer, this should be impossible…so I suspect the C
optimizer.

M. Edward (Ed) Borasky wrote:

I actually wrote some programs in RATFOR (Rational Fortran) … man
I feel old.
You feel old? Apparently you missed my post on ILLIAC I. :slight_smile:

:slight_smile:

(you are kidding right??)

Chilkat S. wrote:

understanding of the bits & bytes,
pointers, pointer arithmetic, structure layouts, byte ordering,
structure member alignment, dynamic memory
allocation on the heap as opposed to the stack, etc. Understanding
this gives you a good idea
as to what’s going on “under the hood” with higher-level languages.
Things won’t be so mysterious.
It’ll pay off in the long run.

-Matt
From that perspective, I’d recommend starting with MIX & Knuth. But if
you want faster results pick Ruby or Python.

I’d NEVER recommend C++. C, perhaps, to establish a solid grounding in
the fundamentals…but not for anything serious. It takes too long.
One compiled language that you might try is D (Digital Mars D), with
links to C libraries to accomplish the things that aren’t yet built in.

OTOH, for many uses Ruby and Python are BOTH hard to beat. I like Ruby
better as a language, but Python seems to have more bug-free libraries.
(Well, free of “show stopper” bugs.) And Python has a wider variety of
libraries. (Still, you find me here in the Ruby news group. I like
Ruby better.)

WARNING: NO LANGUAGE IS PERFECT!! Choose the language to suit the
problem. For some problems Java is the best available solution. (I’m
not aware of ANY problems for which I would choose C#, but that’s
because of potential legal issues…so I won’t even look at it.)

On 11/19/06, M. Edward (Ed) Borasky [email protected] wrote:

in Uganda?
Good question. I should do that sooner or later.

Actually, what made Vim my editor of choice was the GVim implementation
on Windows, not the Unix/Linux versions. After all, they already had vi,
and for those with enough memory, emacs. But the ability to do both “vi”
keystroke editing and Notepad-like cut and paste in GVim was what made
it indispensable to me.

Most of the time vi is just aliased to vim on newer systems.
(possibly in the ugly compatible mode). Yeah, I liked GVim a lot when
I was still using windows a lot, I find myself using command line vim
even on windows now, just because of my fear of the mouse.

The reason I started using vim maybe 7 years ago was because I opened
up emacs first, couldn’t figure out how to edit a file or close it in
five seconds, and then had to kill the process. I opened up vim and
it told me how to do that right away. I think emacs has something to
that effect now… But that was literally the arbitrary decision I
made. Now I’m just happy enough with vim that what others have shown
me in Emacs I can usually do in vim, so there is no compelling reason
for me to switch. So it keeps me out of holy wars usually, except for
the occasional support of Vim just to be loyal :slight_smile:

ArchLinux, eh? I’ve forgotten – is that a Debian derivative?

http://archlinux.org/about/

I think it was based on CRUX, actually.

They’re much less concerned with licensing issues. I’m a bit of an
idealist when it comes to maintaining a free operating system, but
when I have hardware that free drivers barely support without pain,
I’m willing to slip a little. :wink:

The real reason why I like ArchLinux though is because it offers the
flexibility and simplicity of something like Gentoo without waiting
weeks for things to compile :slight_smile: (Yes, gentoo has binaries too, but it’s
too tempting to use the shiny build system). Arch does have a decent
build system, when it is needed though.

I can probably fit the applications I use regularly onto my fingers,
so as simple a system as possible is what I crave. :slight_smile:

Charles D Hixson wrote:

my C++ code was about twice faster than Java c++/Java = 610/1085.
language. Theoretically, with a good optimizer, this should be
impossible…so I suspect the C optimizer.
The process of profiling/optimizing C++ is an iterative one, and most
folks have neither the patience nor the need for it. There’s an
excellent (AMD-64/Intel x86-64 based) reference work on the subject at
Software optimization resources. C++ and assembly. Windows, Linux, BSD, Mac OS X. But for the most common number crunching
tasks, dense matrix operations and Fast Fourier Transforms, I doubt
seriously if anybody’s JIT can beat Atlas and FFTW. Tie them, perhaps,
but not beat them.


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.

Jim C. wrote:

.)

Eiffel USED to be a good language. Unfortunately they started making a
lot of the wrong changes a few years ago. Now… well, it was a small
language to begin with, but it’s split into at least three mutually
incomprehensible dialects. Also they’ve suppressed a lot of the good
features while trying to add compatibility with MS.NET and also while
adding tuples. During this process they broke many of the extant
libraries. If something survives from this, it might again be a decent
language to look at in a decade (perhaps slightly less). Unfortunately,
while they are feuding, other languages are progressing. I note that
Ada 2000 didn’t add garbage collection, so it’s still out of the loop,
but there are new contenders. My favorite among the compiled languages
is D (Digital Mars D), though I’m also giving a bit of consideration to
Gambit Scheme with Termite. (To be honest, the Scheme thing is probably
on indefinite hold…but Termite sounds quite interesting for a few
years from now when more than two processors/CPU becomes common.
[Currently I have an SMP system with two processors, so this wouldn’t
buy me much, but how many CPU slices with my next computer have?])

Friedrich D. wrote:

Reid T. [email protected] writes:

Ch is an embeddable C/C++ interpreter for cross-platform scripting,
shell programming, 2D/3D plotting, numerical computing, and embedded
scripting. Ch is the solution for:
It’s very C-ish but the libraries make the difference. However others
have written C-Interpreters also:
Eic (now abondoned)
Cint http://root.cern.ch/root/Cint.html
and another one which name I forgot…

There’s tcc[1]. It’s a C compiler for linux and (maybe) now windows that
is fast enough to use for scripting. This is not quite OT. It would be
great to use libtcc[2] with inline C code when compile time is more
critical than run time. And you don’t have to muck with tempfiles.

[1] Redirection
[2] http://fabrice.bellard.free.fr/tcc/tcc-doc.html#SEC22