What New Language After Ruby?

Please consider “arc” which is introduced at
http://www.paulgraham.com/arc.html.

http://www.paulgraham.com is a treasure trove for anyone interested
computer languages.
Whether you choose arc or not having perused this site will make you
final choice better.

When I discovered ruby, I vetted it by noticing that matz knew lisp,
smalltalk, and perl. Other
language inventors started from other traditions without mastering this
basic triad and in my mind
mislead newbies. Without a grounding in l-s-p you are bound to reinvent
the wheel. Actually my current
vetting check is for l-s-p -r. I don’t know what Paul thinks of ruby.
Although he does not speak
highly of o-o.

YMMV,

John

Come on… He’s a Pragmatic Programmer, not a Utopian one :slight_smile:
Japanese would be more like “one language per decade” :slight_smile: (and I probably
fall short)

You’ll soon have to answer such things as “is it worth switching to
Japanese if I know Ruby” or “can Japanese be embedded in a C application”;
the responses could arguably be yes in both cases :slight_smile:

Maybe we should have a FAQ:

  • Who’s behind it? Is it ready for prime-time?

Japanese is a time-proven, industrial-strength language. It is actively
used by more than 120 million people worldwide. It is little known out
of Japan but it is much more used there than Python, Perl and even C/C++!
It is also a very general language, suitable for any application you can
think of!

We don’t know who’s the current maintainer, but who needs one, anyway?

  • I’ve heard Japanese supports OOP, is it true?

Yes; basic OO features such as classes, inheritance, etc have been used
for a long time. Moreover, advanced concepts such as mix-ins and
iterators can also be expressed in Japanese.

  • Is Japanese more OO than Python?

Yes and no. Everything can be thought of as an object, but Japanese is
multi-paradigm. You can think OO, functional, logical, whatever!
But in a way it is more OO as you can extend all values. Methods and
objects can easily be protected or made private.

  • What are its more interesting features?
  • it is multi-paradigm: dataflow, functional, logical, procedural, OO…
  • dynamically typed: variables (references) are type-less, but the values they
    point to have their own type. For performance and/or other reasons,
    you can specify the expected type with the type markers: “-chan”,
    “-kun”, “-san”, “-senpai”, “-sensei”, etc… Values ares very often
    promoted, for example from “-chan” to “-kun”. This dynamic typing
    allows you to use the same value in different contexts (try
    pointing to an unknown value as “-chan” and watch the result!) This
    is however quite an advanced feature, unsuited for newbies
  • HUGE library of already-made, fully-debugged classes
  • access to these classes is done via “Kanji” in Japanese terminology,
    of which there is an ENORMOUS number
  • What platforms can I use it with?

Japanese has been used near Windows™. It can also be used in Un*x
and POSIX-compliant systems. Just about anywhere there’s people,
Japanese can work!

  • So if it’s so advanced, is it for me, the Pragmatic Programmer?

Forget it. You’ll never be proficient enough with Japanese. Its design
is too alien for us and very few people outside of Japan have been able
to learn it. Use BrainF*ck instead.

···

On Thu, Aug 22, 2002 at 12:20:19AM +0900, Yukihiro Matsumoto wrote:

To Andrew Hunt and David Thomas:

I think in the book “The Pragmatic Programmer”, one of the advices is to
learn a new language at least once a year. Probably for the year 2001 it
was Ruby. Now we are already in August 2002. Is there any language
candidate for this year?

I remember Dave once said his language for the year 2001 was Japanese.


_ _

__ __ | | ___ _ __ ___ __ _ _ __
'_ \ / | __/ __| '_ _ \ / ` | ’ \
) | (| | |
__ \ | | | | | (| | | | |
.__/ _,
|_|/| || ||_,|| |_|
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

Linux: Where Don’t We Want To Go Today?
– Submitted by Pancrazio De Mauro, paraphrasing some well-known sales talk

Hi,

There is nothing wrong with functional programming in general. It is only
for practicality reason. For example, if we tell our supervisors that we
are going to develop in C/C++ or Java, there will be no question
asked. It is hard enough to convince the use of Ruby to people who are in
charge of financial matters. I think in the industry the use of
functional programming is much less than procedural language; and
therefore, I think, it is much harder to justify, because my guess is,
they think if it is not widely used, there must be something wrong with
it, and why we should use it. Yes, for ourselves I have no problem at
all; the problem is only how to convince the people in charge.

Regards,

Bill

···

=============================================================================
Rafael ‘Dido’ Sevilla dido@imperium.ph wrote:

On Wed, Aug 21, 2002 at 11:52:30PM +0900, William Djaja Tjokroaminata wrote:

(hopefully the language can be considered to be “better” than Ruby in
some specific areas, or just simply has totally different approach;
hopefully also we will not have to consider Lisp-like programming
languages).

What’s wrong with Lisp, or functional programming in general? I’ve done
some work in functional languages such as OCaml and Scheme and can say
it’s a very powerful idea for certain problems, far better than Java or
Ruby in many respects for certain problems, such as for doing AI work
and compiler construction.


Rafael R. Sevilla +63(2)8123151
Software Developer, Imperium Technology Inc. +63(917)4458925

Folks have already thrown Lisp, OCaml, Prolog, and Japanese into the
mix, and Smalltalk is always floating around. Given that those are
reasonably academic languages (Okay, except for Japanese :slight_smile: I’ll add
a few of the more low-level or odd languages.

[…]

Fortran: Yeah, it’s older than you are, but it still can’t be beat for speed.

Can I ask why? People say it all the time, but I point-blank refuse to believe
that it is faster than optimised C. They’re the same bloody thing, aren’t
they? - low-level procedural languages. My knowledge of Fortran is small, but
of course everyone knows it’s used for scientific calculations, so it may have
the edge in numerical calculations (infinite precision, …) but can’t you get
a C library that equals it? If not, why not. It’s all machine language in the
end, and not sufficiently far from that to begin with for me to believe that
the two should be any different.

breaths out

[…]

Dan Sugalski

Gavin

···

----- Original Message -----
From: “Dan Sugalski” dan@sidhe.org

Thu, 22 Aug 2002 01:32:37 +0900, William Djaja Tjokroaminata billtj@z.glue.umd.edu pisze:

To me several factors influence the “usefulness” of a language:
- how long the language has been around (related to bug fixes)

Haskell has 10 years. It has 2 alive implementations (ghc & nhc),
1 maintained but not actively developed (Hugs), and 1 dead (hbc).

- number of users (related to getting help)

Small.

- can be interfaced to C/C++ or Java (related to production code)

Yes, http://www.cse.unsw.edu.au/~chak/haskell/ffi/

- amount of library (related to practicality)

Not many I think.

- execution and memory performance (related to why we should drop C)

Average (it has compilers to native code but the language semantics
make it difficult to produce good code). It’s hard to reason about
efficiency, especially memory usage, so unfortunately it’s easy to
write inefficient programs.

- easy, clean, short, and regular syntax (related to our time :) )

Yes!

···


__("< Marcin Kowalczyk
__/ qrczak@knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/

Well, I don’t know if it would ever do as The Ultimate Language (I
think Poplog lacks a native object-oriented structure and a strong
typing), but the editor would pretty much get close to The Ultimate
Editor :slight_smile:

William Djaja Tjokroaminata wrote:

···

No problem, Giuseppe, as long as you can assure me that result of doing
this is the ultimate programming language to end all the other languages
:slight_smile: I will take the 5 years instead of the full-lifetime learning job :slight_smile:

Cheers,

Bill

Giuseppe Bilotta bilotta78@hotpop.com wrote:

I’ll assing you Poplog. This will require you to learn POP-11, Prolog
and Common Lisp. I’ll give you 5 years for that, but as a final exam
you’ll have to write a complete, modular editor, as powerful as
Emacs, based on POP-11 but with full Poplog capabilities (thus
allowing use of Emacs-Lisp code). You may use VED (Poplog native
editor) as a base, and you’ll have to implement a VIM emulation layer
on The Beast.

Sounds like good homework? :smiley:


Giuseppe “Oblomov” Bilotta

Axiom I of the Giuseppe Bilotta
theory of IT:
Anything is better than MS

Very interesting thought, Mauricio. I think there was an article in
either IEEE Computer magazine or the ACM Communications whether computer
language should mimic human language or vice versa. I think it is a very
interesting subject, if we can tell a computer what to do instead of how
to do it. I had that kind of thought to specify system configurations
before I came to Tcl, then Perl, then Python, and now Ruby.

Bill

···

===========================================================================
Mauricio Fern?ndez batsman.geo@yahoo.com wrote:

Come on… He’s a Pragmatic Programmer, not a Utopian one :slight_smile:
Japanese would be more like “one language per decade” :slight_smile: (and I probably
fall short)

You’ll soon have to answer such things as “is it worth switching to
Japanese if I know Ruby” or “can Japanese be embedded in a C application”;
the responses could arguably be yes in both cases :slight_smile:

Maybe we should have a FAQ:

  • Who’s behind it? Is it ready for prime-time?

Japanese is a time-proven, industrial-strength language. It is actively
used by more than 120 million people worldwide. It is little known out
of Japan but it is much more used there than Python, Perl and even C/C++!
It is also a very general language, suitable for any application you can
think of!

We don’t know who’s the current maintainer, but who needs one, anyway?
(rest deleted)

really ?

where is japanese programing language for download ?

–Por la puerta de la muerte se alcanza el camino a la vida–

···

----- Original Message -----
From: “Mauricio Fernández” batsman.geo@yahoo.com
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Wednesday, August 21, 2002 1:53 PM
Subject: Re: What New Language After Ruby?

On Thu, Aug 22, 2002 at 12:20:19AM +0900, Yukihiro Matsumoto wrote:

To Andrew Hunt and David Thomas:

I think in the book “The Pragmatic Programmer”, one of the advices is
to
learn a new language at least once a year. Probably for the year 2001
it
was Ruby. Now we are already in August 2002. Is there any language
candidate for this year?

I remember Dave once said his language for the year 2001 was Japanese.

Come on… He’s a Pragmatic Programmer, not a Utopian one :slight_smile:
Japanese would be more like “one language per decade” :slight_smile: (and I probably
fall short)

You’ll soon have to answer such things as “is it worth switching to
Japanese if I know Ruby” or “can Japanese be embedded in a C application”;
the responses could arguably be yes in both cases :slight_smile:

Maybe we should have a FAQ:

  • Who’s behind it? Is it ready for prime-time?

Japanese is a time-proven, industrial-strength language. It is actively
used by more than 120 million people worldwide. It is little known out
of Japan but it is much more used there than Python, Perl and even C/C++!
It is also a very general language, suitable for any application you can
think of!

We don’t know who’s the current maintainer, but who needs one, anyway?

  • I’ve heard Japanese supports OOP, is it true?

Yes; basic OO features such as classes, inheritance, etc have been used
for a long time. Moreover, advanced concepts such as mix-ins and
iterators can also be expressed in Japanese.

  • Is Japanese more OO than Python?

Yes and no. Everything can be thought of as an object, but Japanese is
multi-paradigm. You can think OO, functional, logical, whatever!
But in a way it is more OO as you can extend all values. Methods and
objects can easily be protected or made private.

  • What are its more interesting features?
  • it is multi-paradigm: dataflow, functional, logical, procedural, OO…
  • dynamically typed: variables (references) are type-less, but the values
    they
    point to have their own type. For performance and/or other reasons,
    you can specify the expected type with the type markers: “-chan”,
    “-kun”, “-san”, “-senpai”, “-sensei”, etc… Values ares very often
    promoted, for example from “-chan” to “-kun”. This dynamic typing
    allows you to use the same value in different contexts (try
    pointing to an unknown value as “-chan” and watch the result!) This
    is however quite an advanced feature, unsuited for newbies
  • HUGE library of already-made, fully-debugged classes
  • access to these classes is done via “Kanji” in Japanese terminology,
    of which there is an ENORMOUS number
  • What platforms can I use it with?

Japanese has been used near Windows™. It can also be used in Un*x
and POSIX-compliant systems. Just about anywhere there’s people,
Japanese can work!

  • So if it’s so advanced, is it for me, the Pragmatic Programmer?

Forget it. You’ll never be proficient enough with Japanese. Its design
is too alien for us and very few people outside of Japan have been able
to learn it. Use BrainF*ck instead.


_ _

__ __ | | ___ _ __ ___ __ _ _ __
'_ \ / | __/ __| '_ _ \ / ` | ’
) | (| | |
__ \ | | | | | (| | | | |
.__/ _,
|_|/| || ||_,|| |_|
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

Linux: Where Don’t We Want To Go Today?
– Submitted by Pancrazio De Mauro, paraphrasing some well-known sales
talk

If you want to learn ST why not VisualWorks?

···

On Wed, 21 Aug 2002 16:24:10 GMT, Jim Freeze jfreeze@freebsdportal.com wrote:

On Thu, Aug 22, 2002 at 12:04:35AM +0900, Pat Eyler wrote:

On Wed, 21 Aug 2002, William Djaja Tjokroaminata wrote:

To Andrew Hunt and David Thomas:

I think in the book “The Pragmatic Programmer”, one of the advices is to
learn a new language at least once a year. Probably for the year 2001 it
was Ruby. Now we are already in August 2002. Is there any language
candidate for this year?

At the pragmatic programmer web site, there is a LoTY project running,
this year’s language is Haskell … I’m a year behind though and am
working on Ruby this year. :wink:

My first reaction to the LoTY project was, man you guys
got a lot of free time. :slight_smile:

I think LoTY is a good idea, but a bit idealistic for me
unless I plan on using the language. I looked at Haskell,
and decided I don’t have a use for it. However, I think
that ocaml or squeak may be something that I could use.

Ocaml because it is compilable and fast. Squeak because
of the language and the development environment.

$0.02

Kyle Rawlins wrote:

I had Robin Popplestone, the creator of POP-1, for my “programming
paradigms” class. While we didn’t actually use POP-11, we did have to
use poplog/VED since the Scheme implementation was “UMass scheme”,
written by Popplestone (as I recall), in poplog with VED as the
development environment/interpreter. I also took the honors section
where we did prolog and ML using, once again, the poplog environment.
That was an experience. Though it seems to me I may have used SML for
most of my actual work, just making sure the code ran in ved.

I have to say, poplog taken as a whole is already pretty emacs-like,
short of not implementing emacs lisp. It already has common lisp and
CLOS built in I think, which is probably better anyways. He
had built an entire automated grading system for the class into it, plus
a whole bunch of other things. I recall towards the end of the semester
he was working on building some native widgets for VED so it wouldn’t
have to use motif. Interesting class, interesting professor. Too bad
that he’s retired now.

Anyways, sorry for rambling - you just brought back memories.

Actually, I’d like to thank you for sharing these memories with us.

···


Giuseppe “Oblomov” Bilotta

Axiom I of the Giuseppe Bilotta
theory of IT:
Anything is better than MS

How about FCS/EPS or Magic or Cesil (for those of you that had a UK
education).

Tabol (The bastard offspring of COBOL and FORTRAN).

I seem to recall RTL/2 on the Vax but I could be wrong.

Thanks for the pointers. Uh oh, this year’s language is Haskell. I am
sorry for broadening the question. For people who have used Ruby and have
understood Haskell, is Haskell really practical (i.e., we can use it in
our daily professional work), or is it more interesting as just a mind
exercise? In particular, is it possible to combine Haskell and C (and
therefore Ruby, C, and Haskell)?

Haskell has a good library for processing XML. In fact, functional
languages are ideal for applications that translate documents between
different formats – such applications are basically just tree
transformations. That’s why DSSSL and XSL borrow a lot of concepts from
functional languages.

However, the LoTY exercise is not meant to be purely practical. In my
experience, learning a new language introduces you to new ideas about
programming itself, and you can then apply that new understanding in the
everyday languages one uses in every day work.

For example, among other things, Haskell demonstrates that:

  1. A static type system, if done properly, does not have to be
    restrictive, and doesn’t need “escape holes” such as casts.

  2. Lazy evaluation is a powerful mechanism for modelling “infinite” data
    structures. Haskell can do this without special language constructs such
    as Python’s generators, or explicit coding of laziness.

  3. How to structure programs using higher-order functions.

Points 2 & 3 can be applied to everyday languages, such as Java or Ruby,
with a little work. Point 1 will, unfortunately, increase your dislike
of Java, but won’t affect your love of Ruby!

Someone pointed me to Lua before, and he has combined Ruby, C, and
Lua. Has Lua been considered before? Or Lua is just too simple?

Lua is a very simple, I’d go so far as to say simplistic, language. I
don’t think its different enough from Ruby to be worth learning, unless
you actually have to use it in practice. Ruby does everything that Lua
does, only Ruby is more elegant and more expressive.

Cheers,
Nat.

···

On Wed, 2002-08-21 at 16:52, William Djaja Tjokroaminata wrote:


Dr. Nathaniel Pryce, Technical Director, B13media Ltd.
Studio 3a, 22-24 Highbury Grove, London N5 2EA, UK
http://www.b13media.com

To blow away your argument that functional programs are not widely used
in industry: Ericsson generally standardized on the use of Erlang as
the language of choice for almost all of their internal development.
Besides, what kind of shop are you running, that your finance managers
have the ability to dictate to the engineers how they should do their
job? I’d think that today’s finance managers would understand that the
engineers know what their doing far better than they ever will, and they
shouldn’t try to meddle too much in that business.

···

On Thu, Aug 22, 2002 at 10:15:28PM +0900, William Djaja Tjokroaminata wrote:

Hi,

There is nothing wrong with functional programming in general. It is only
for practicality reason. For example, if we tell our supervisors that we
are going to develop in C/C++ or Java, there will be no question
asked. It is hard enough to convince the use of Ruby to people who are in
charge of financial matters. I think in the industry the use of
functional programming is much less than procedural language; and
therefore, I think, it is much harder to justify, because my guess is,
they think if it is not widely used, there must be something wrong with
it, and why we should use it. Yes, for ourselves I have no problem at
all; the problem is only how to convince the people in charge.


Rafael R. Sevilla +63(2)8123151
Software Developer, Imperium Technology Inc. +63(917)4458925

When you start comparing language speeds, you really need to add some
context - which platform, compiler, etc. Fortran for science, math,
or engineering applications on supercomputer platforms as well as PC
platforms with the right compiler, is typically faster than C given
the same developer input time.

As far as I’ve been able to gather, one of the factors in this is that
C exposes certain features to the developer that Fortran doesn’t - e.g
pointers. This allowed the compiler writers to use a class of
optimizations which can be more globally applied to programs written
in Fortran. It also makes it easier to automatically parallelize (is
that a word?) than C. But that’s just my conclusions as a non-compiler
writer in either Fortran or C.

  • alan
···

On Fri, Aug 23, 2002 at 01:10:47AM +0900, Gavin Sinclair wrote:

----- Original Message -----
From: “Dan Sugalski” dan@sidhe.org

Fortran: Yeah, it’s older than you are, but it still can’t be beat for speed.

Can I ask why? People say it all the time, but I point-blank refuse to believe
that it is faster than optimised C. They’re the same bloody thing, aren’t
they? - low-level procedural languages. My knowledge of Fortran is small, but
of course everyone knows it’s used for scientific calculations, so it may have
the edge in numerical calculations (infinite precision, …) but can’t you get
a C library that equals it? If not, why not. It’s all machine language in the
end, and not sufficiently far from that to begin with for me to believe that
the two should be any different.


Alan Chen
Digikata LLC
http://digikata.com

In article 011801c249f6$61f71380$2c4432d2@nosedog,

From: “Dan Sugalski” dan@sidhe.org

Folks have already thrown Lisp, OCaml, Prolog, and Japanese into the
mix, and Smalltalk is always floating around. Given that those are
reasonably academic languages (Okay, except for Japanese :slight_smile: I’ll add
a few of the more low-level or odd languages.

[…]

Fortran: Yeah, it’s older than you are, but it still can’t be beat for speed.

Can I ask why? People say it all the time, but I point-blank refuse to believe
that it is faster than optimised C. They’re the same bloody thing, aren’t
they? - low-level procedural languages.

    • No. C is much more complicated that Fortran ( at least
      Fortran77.) There are no pointers in Fortran77[1]. There
      are no data structures more complicated than an array in
      Fortran.

My knowledge of Fortran is small, but
of course everyone knows it’s used for scientific calculations, so it may have
the edge in numerical calculations (infinite precision, …)

    • Infinite precision, Fortran… That’s really funny. What you
      get in Fortran is well tested, proven numerical
      libraries. Writing numerical code that gets correct answers is
      not always easy. Many C numerical libraries are just plain
      broken.

but can’t you get
a C library that equals it? If not, why not. It’s all machine language in the
end, and not sufficiently far from that to begin with for me to believe that
the two should be any different.

    • In theory yes, in practice the Fortran code has the following
      advantages.

a. The algorithms and libraries have been proven and optimized by
years of use.

b. BLAS assembler routines.

c. Vector compilers have a much easier time getting performance
out of Fortran code. It’s pretty easy to write code in C that
can’t be vectorized well. Of course you can write Fortran in
any language, if you write fortran-like C the compiler will
vectorize fairly well. Many of the early supercomputers
were explictly designed in the hardware to run Fortran for
loops as fast as humanly possible. When you design the
hardware to the language, it’s hard to match performance
in other languages.

    • The best of all worlds is to call the Fortran code
      libraries from a programming language that’s a lot friendlier.
      I used to write a lot of code that did the data management in
      C and all the numerical heavy lifting in Fortran.
    • Booker C. Bense

[1]- Of course the first thing every complicated program does is
implement pointers using a whopping big common block and
array indices.

···

Gavin Sinclair gsinclair@soyabean.com.au wrote:

----- Original Message -----

Well, it’s been 10-15 years since I was in the position of comparing
FORTRAN and C head-to-head, but at the time the widely-used FORTRAN
compilers generated VERY GOOD code for do-looping over arrays, which
is basically all you do in a FORTRAN program. Also, FORTRAN compilers
don’t have any problems with pointer aliasing, since FORTRAN doesn’t
have pointers.

Second, since the folks who do numerical processing all used FORTRAN,
all the good numerical libraries were written in FORTRAN and people
had spent years optimizing them. Either there were no equivalent C
libraries or the equivalent libraries were much less mature than the
FORTRAN libraries. We spent a lot of time figuring out how to allow C
calls into FORTRAN routines, for the same reason people today make
Ruby call C routines: speed.

HTH.

···

On Thu, 22 Aug 2002 17:21:37 GMT, “Gavin Sinclair” gsinclair@soyabean.com.au wrote:

Can I ask why? People say it all the time, but I point-blank refuse to believe
that it is faster than optimised C. They’re the same bloody thing, aren’t
they? - low-level procedural languages. My knowledge of Fortran is small, but
of course everyone knows it’s used for scientific calculations, so it may have
the edge in numerical calculations (infinite precision, …) but can’t you get
a C library that equals it? If not, why not. It’s all machine language in the
end, and not sufficiently far from that to begin with for me to believe that
the two should be any different.

That’s fine. You’d be wrong in your lack of belief. :slight_smile:

Fortran compilers can optimize code better than C compilers for one
reason: no pointers. Pointers kill optimization dead–they
introduce an awful lot of uncertainty into code, enough to really
hamper what an optimizer can do. I chatted about this once with one
of the guys on the Dec Fortran compiler team. Dec Fortran (well,
Compaq Fortran (okay, HP Fortran)) is screamingly fast and will wipe
the floor with equivalent code written in C compiled with Dec C.
(Which is something of an accomplishment, as Dec C has the best
optimizer I’ve ever seen for a C compiler)

On Fortran’s turf, nothing (save, perhaps, a good APL) can beat it for speed.

Having said that, I’d not use Fortran to write, say, a mail client.
(But, then, I wouldn’t use C either :slight_smile:

···

At 1:10 AM +0900 8/23/02, Gavin Sinclair wrote:

----- Original Message -----
From: “Dan Sugalski” dan@sidhe.org

Folks have already thrown Lisp, OCaml, Prolog, and Japanese into the
mix, and Smalltalk is always floating around. Given that those are
reasonably academic languages (Okay, except for Japanese :slight_smile: I’ll add
a few of the more low-level or odd languages.

[…]

Fortran: Yeah, it’s older than you are, but it still can’t be beat
for speed.

Can I ask why? People say it all the time, but I point-blank refuse
to believe that it is faster than optimised C.


Dan

--------------------------------------“it’s like this”-------------------
Dan Sugalski even samurai
dan@sidhe.org have teddy bears and even
teddy bears get drunk

I’ve never used (or seen :slight_smile: Fortran, but I can think of a number of
reasons for a language to be “faster” then C…

  • scientific computation means doing things with vectors; I’d bet
    Fortran compilers know about them and can use SIMD accordingly
  • aliasing: in C (but no longer in C99) you can have several different
    pointers to the same value, which means some values have to be escaped
    and can’t be put in registers. I’d bet again that Fortran doesn’t
    allow that
  • C makes some things harder to inline. Think of qsort(): you give it a
    function pointer to compare two values and it sorts an array. Can’t be
    faster, right? Yet it can: qsort() involves a function call to compare
    the elements, whereas in C++ for instance that function is easily
    inlined, for std::sort is a template function…
  • COW and shared mem representations: C uses by
    default call-by-value semantics, which involves copying data. You
    may use pointers to go around this, but there’s one reason why this
    doesn’t solve the problem completely (read below). One example of
    COW is std::string, where the actual data is only copied when it is
    modified… Another one is perl’s strings, which I’ve read can often
    be faster than C’s.
  • [related to the latter but I wanted to develop a little more on
    this]: lazy evaluation
    Say you have vectors A, B, C, D. You wanna make A = B .* (C + D)
    .* means one-by-one product, not matrix product
    In C you have to go through the pain of doing
    for ( i = 0; i < size; i++)
    A[i] = B[i] * (C[i] + D[i]);
    Sure this doesn’t seem too bad, but in some languages you can
    make A = B .* ( C + D ) and still be running the code above (or
    even better), without temporary values, for C + D doesn’t
    compute the sum right away, but something that “remembers” it
    is the sum of C and D. It is only computed when actually needed.
    Note than with A = B .* ( C + D ), in some languages you later can have
    A[i] and only get A[i] = B[i] .* ( C[i] + D[i] ) calculated,
    cause things are only computed when really needed. It is
    convenient to be able to skip this sort of details when you’re
    writing something complicated.
    APL did this, AFAIK.
  • not related to the language, but important anyway: many scientist
    have rather modest programming skills. They need a tool in which they
    can easily map the “mathematical solution”, but they’ll code as if it
    did even when it doesn’t.
    Read C-vs-FORTRAN

I’ve found a paper on Blitz++ (a scientific calculation
library for C++) vs Fortran, maybe some things can map to C:
http://osl.iu.edu/~tveldhui/papers/iscope97/

···

On Fri, Aug 23, 2002 at 01:10:47AM +0900, Gavin Sinclair wrote:

----- Original Message -----
From: “Dan Sugalski” dan@sidhe.org

Folks have already thrown Lisp, OCaml, Prolog, and Japanese into the
mix, and Smalltalk is always floating around. Given that those are
reasonably academic languages (Okay, except for Japanese :slight_smile: I’ll add
a few of the more low-level or odd languages.

[…]

Fortran: Yeah, it’s older than you are, but it still can’t be beat for speed.

Can I ask why? People say it all the time, but I point-blank refuse to believe
that it is faster than optimised C. They’re the same bloody thing, aren’t
they? - low-level procedural languages. My knowledge of Fortran is small, but
of course everyone knows it’s used for scientific calculations, so it may have
the edge in numerical calculations (infinite precision, …) but can’t you get
a C library that equals it? If not, why not. It’s all machine language in the
end, and not sufficiently far from that to begin with for me to believe that
the two should be any different.


_ _

__ __ | | ___ _ __ ___ __ _ _ __
'_ \ / | __/ __| '_ _ \ / ` | ’ \
) | (| | |
__ \ | | | | | (| | | | |
.__/ _,
|_|/| || ||_,|| |_|
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

Linux: the operating system with a CLUE… Command Line User Environment.
– seen in a posting in comp.software.testing

Thanks a lot, Marcin, for the valuable information. The description on
the web page to interface with C is very encouraging.

I also have checked that amazon.com has several books on Haskell; it
is good. The last thing that concerns me is that the Google Groups does
not have a comp.lang.haskell. There are some for Lisp, ML, and Scheme,
although they are not as active as Ruby.

Can anyone give me a pointer to the original reason why
pragmaticprogrammer.com chooses Haskell instead of Scheme, Lisp, or
ML? (If we just want to learn “a new thing”, any of the functional
languages will do, right? But to be both learning a new thing and being
practical, I think it is a different story.)

Regards,

Bill

···

=============================================================================
Marcin ‘Qrczak’ Kowalczyk qrczak@knm.org.pl wrote:

Thu, 22 Aug 2002 01:32:37 +0900, William Djaja Tjokroaminata billtj@z.glue.umd.edu pisze:

To me several factors influence the “usefulness” of a language:
- how long the language has been around (related to bug fixes)

Haskell has 10 years. It has 2 alive implementations (ghc & nhc),
1 maintained but not actively developed (Hugs), and 1 dead (hbc).

- number of users (related to getting help)

Small.

- can be interfaced to C/C++ or Java (related to production code)

Yes, http://www.cse.unsw.edu.au/~chak/haskell/ffi/

- amount of library (related to practicality)

Not many I think.

- execution and memory performance (related to why we should drop C)

Average (it has compilers to native code but the language semantics
make it difficult to produce good code). It’s hard to reason about
efficiency, especially memory usage, so unfortunately it’s easy to
write inefficient programs.

- easy, clean, short, and regular syntax (related to our time :) )

Yes!


__("< Marcin Kowalczyk
__/ qrczak@knm.org.pl
^^ Blog człowieka poczciwego.

Uh oh, then we may have a slight problem, Giuseppe, because for my
simplistic purpose, my GNU Emacs 21.1.1 is my ultimate editor :slight_smile: (I still
don’t know all those hidden capabilities because I never have time to
complete an Emacs book from cover to cover :slight_smile: and I don’t need any new
functionalities for now…)

Cheers,

Bill

···

============================================================================
Giuseppe Bilotta bilotta78@hotpop.com wrote:

Well, I don’t know if it would ever do as The Ultimate Language (I
think Poplog lacks a native object-oriented structure and a strong
typing), but the editor would pretty much get close to The Ultimate
Editor :slight_smile:

William Djaja Tjokroaminata wrote:

No problem, Giuseppe, as long as you can assure me that result of doing
this is the ultimate programming language to end all the other languages
:slight_smile: I will take the 5 years instead of the full-lifetime learning job :slight_smile:

Cheers,

Bill