Subject: How do you choose your programming language ?

From: "ik_5" <[email-masked]>
Date: Mon, 21 Nov 2005 10:41:10 -0000

OK, I do not want to start a language war, but I want to give a side
that most of you do not see.

As many of you know, my favorite programming language is FPC (Free
Pascal Compiler). Now before you are going to say a lot (usually
wrong, but some negative things on the language are true.. don't get
me wrong) things about the language, let me give you some of my point
of view about the myths about the language or at least two of them...

Usually I'm getting answers such as "Yes we learn Pascal at school, so
we know that language". But thats wrong to say. When I learned at high
school (wow it was something like 9-10 years ago) Pascal, I didn't
really learn the language except for some few basic commands, such as
"read/ln, write/ln, math operators, condition statements, functions,
array constant and loop handling". Yes these are only basic stuff of
the language, and the language have so much more to offer. I learned a
lot about the language by downloading programs from BBS, books and a
lot of reading and not understanding of help documents and source
codes back then. :)

The motto of Pascal programming is "make the hardest thing to be
easy". Thats why documents such as "why not to use Pascal" wrote
things such as "Everyone could write programs if they will use Pascal,
we should continue using COBOL/Fortran". And thats just for the preview ;)

The part that most of us never learned at high school or universities
with Pascal, was that since Turbo Pascal 5.5 (If I remember correctly
came out at 86 or 87) had some basic Object Oriented support, but with
full constructor inheritance, and Turbo Pascal 3 (came out in 82 I
think) started also to support direct memory access (you can not do
that in protected mode, but I'm talking about making variables
addressed to segment and offset of memory calls instead of just using
the *OS* interrupts).

As you can see here, we did not learned all of that. Now I can move
along to FPC 2, that came out this year.

This compiler is one of the fastest compilers exists at the Open
source arsenal (yes much faster then gcc, VC, BCB, but not faster then
Delphi that uses threads to compile, while FPC does not).

FPC and Delphi supports a lot of actions and ways to do things, that
sometimes are not the same as C or C++, because it require different
approach, but when you know how to use the language, you find out,
that sometimes on C++ you will write a whole class to implement things
that on Delphi/FPC you will write only two lines of code to do the
same (Unless you really love to write classes, and then you can do the
same solution you made in C++ or Java).

FPC gives you a lot of ways to use classes, and other language tools
such as AnsiString that will give you the feeling of a script language
rather then a strict compiled programing language.
If you wish to use a function inside a class for example, that does
not require the class to be created/initialized, you can call the
function directly without creating the class itself.
The AnsiString type supports a very long string (if I remember
correctly, it can store up to 4 mega of string by default), the
compiler places code that handle length checking, so you do not need
to wary about buffer overflows, and it works much father then Null
terminated strings. 

Hows that for the first myth ? (I have a lot more to say about this
myth such as a very flexible use of assembly language and controlling
variable names at assembly/compiled use, creating dynamic libraries by
changing headers, using the source code to give instructions to the
compiler, including linking libraries and much much more, but lets
stop at this point).

So, why don't you use Pascal if only part of what I say is true (and
all of it is true :P) ? First of all I think it's the name and the
connection of the name you have for "Pascal". 

Secondly The industry takes only languages that was giving to them
after chowing and a lot of money investment on them (take Java and C#
as two examples). 

I'm starting to hear "but no one really uses this language". Many
people uses Windows, many developers write programs with buffer
overflows, and most of them do not try to understand whats going on
with things that they did not pay money to know, and things that no
one gave them to swallow the chowed information. And thats true also
for many popular languages, when people does not really know anything,
but think they are the smartest people on the plant, at least on
everything that regarded to what they suppose to know. People still
give more credits to diploma (do you want to buy one instead of
learning ? I know some good bulk mail that offers that :P) then to
people that actually learned things... Most of you in this forum knows
that from first hand experience.

So, if you know that there is a tool that can give you more power and
less work, will you use it ? it seems that it's the wrong question. 

So how do you choose your programming language, and will you use FPC
if it will not have the name Pascal inside, but will deliver you a
faster code development and and more stable code, in less time then
C#, Java, C, C++, VB and others ?

P.S.
If I'm sounds like attacking or making fights, here, then I'm sorry
from a head.. thats not my intention.

---

From: "Nadav Har'El" <[email-masked]>
Date: Mon, 21 Nov 2005 14:22:16 +0200

> connection of the name you have for "Pascal". 

Your long story (that I clipped) describes something very very different
from what Pascal used to be. It reminds me of an old story, about some
developer in 1960 (or whatever) being asked what programming language he
thinks he'll be using in 2000, and he answered "I don't know which programming
language I will use, but I know its name will be Fortran". This joke
turned up to be surprisingly true, with the advent of "Fortran 90" and
"Fortran 95", which are similar to Fortran mostly in name. Similarly, the
Pascal that you describe is similar to the Pascal I used only in name.

Whenever someone tries to convince me to use "A new Fortran that has all
the features of C" or "A new Pascal that has all the features of C++", I
ask them - why should I use those "layer upon layer" languages, instead of
the one they are trying to emulate?

The reason I give these answers is not because I'm a C fanatic. I also
give a similar answer when someone tells me of a "C++ library that has
all the features of Perl" or a "C library that makes X programming as easy
as in Tcl/Tk" - why do I need those knockoffs, when I can use the originals?

And note that I have nothing "religious" against using Pascal:
In the late 80's, Turbo Pascal (on DOS) was my favorite language. I still
have in my cabinet at work 4 books: "Mastering Turbo Pascal 4.0", "Turbo
Pascal 5.5 OOP Guide", "Turbo Pascal the Complete Reference" and "Turbo
Pascal 6 the complete Reference", which as you can guess I never use any more.
The reason I liked Turbo Pascal was basically one: it allowed me to write
"graphical" programs, both using real graphics (I had just gotten my first
VGA card, and it was cool :)) and cursor (character-based graphics).
At that time, I couldn't do some of these things on the monochrome Unix
system I was using (I was already a good C programmer by that time - Pascal
was NOT my first language). But this was the only reason I liked Turbo
Pascal - I didn't like its syntax, I didn't like its limitations, and the
speedy compilation (2 seconds to compile a file, instead of 10 seconds in
C) was completely irrelevant even when I had a 16Mhz i386sx.

But as time passed, TP's only advantage became irrelevant. In 1990 I wrote
a C library that emulated Turbo-Pascal's character-graphics features, in 1991
we got (for real money!) a graphics library for our AT&T System V machine,
and in 1992 or 1993 we moved to Linux, and finally had X windows at home.
I never used Turbo Pascal since. And I do not miss it.

> after chowing and a lot of money investment on them (take Java and C#

Java "succeeded" (if you can call it that) because it had genuine differences
from existing languages. It wasn't the same as C++ with a different syntax,
or the same as Perl with a different syntax, and so on. It had something
genuinely different to offer. Of course, you might argue (like I do) if this
"different" necessarily means better.

C# is a new fad which is very similar to Java, and it will only succeed if
Microsoft uses its monopoly to somehow enforce it. If Microsoft had wanted,
Pascal would have become a standard by now...

> C#, Java, C, C++, VB and others ?

I try to learn as many languages as I can, and use for each job what is
better. In the last year I probably programmed in C, C++, Java, Tcl,
Perl, Awk, Zsh, Lisp, and probably a few others I forgot. Each language
is best for a specific kind of task. Still, somehow I doubt that if I
learned all the new bells-and-whistles of Pascal, it will add something
new to my arsenal of languages. For the same reason, there are other
languages I still haven't learn (though eventually I do plan to learn),
like PHP and Python - because the tasks they excel in are already "covered"
by other languages I know.

-- 
Nadav Har'El                        |     Monday, Nov 21 2005, 19 Heshvan 5766
[email-masked]             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |The message above is just this
http://nadav.harel.org.il           |signature's way of propagating itself.

---

From: Micha Feigin <[email-masked]>
Date: Mon, 21 Nov 2005 14:25:18 +0200

On Mon, 21 Nov 2005 10:41:10 -0000

> of view about the myths about the language or at least two of them...
[...]
> we should continue using COBOL/Fortran". And thats just for the preview ;)

can't say these documents sound very smart ;-)

[..]

> Delphi that uses threads to compile, while FPC does not).

AFAIK gcc is known to be slow and doesn't necessarily provide the smallest
code, but it does provide good optimized code. Being faster then gcc isn't such
an achievement.

[...]

> rather then a strict compiled programing language.

C++ has strings with length checking and streams support, not that I like them
very much though.

> to wary about buffer overflows, and it works much father then Null
[...]
> connection of the name you have for "Pascal". 

It's more an issue of the ability to work on existing code bases. Its not often
that you get to start a new project from scratch and companies look for people
who are able to debug/fix/modify existing code. People choose languages among
other reasons by the requirements of existing job offers.

> after chowing and a lot of money investment on them (take Java and C#

Management chooses programing languages based on hype (thats what they know)
and the availability of good programmers who know the language.

> that from first hand experience.

Its easier to filter people using diplomas first. Since there is an overflow of
applicants each easier to use that first and then test whomever is left.

> less work, will you use it ? it seems that it's the wrong question. 

Question is, do you know and how much work it will take to learn it compared to
how many problems it will solve.

> C#, Java, C, C++, VB and others ?

Each one has its merits and downfalls, which is better depends on the job at hand.

> Yahoo! Groups Links
>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 

 +++++++++++++++++++++++++++++++++++++++++++
 This Mail Was Scanned By Mail-seCure System
 at the Tel-Aviv University CC.

---

From: Ofir Carny <[email-masked]>
Date: Mon, 21 Nov 2005 14:01:52 +0200

It does sound interesting, but as far as I understand, lacks the portability
and standard compliance C offers and functionality VB offers, and I suspect
that it also lacks the body of open source code most languages in your list
offer.

---

From: Omer Shapira <[email-masked]>
Date: Mon, 21 Nov 2005 15:13:54 +0200

> C#, Java, C, C++, VB and others ?

As time has passed, I found I can not really learn a programming
language unless I have to solve nontrivial tasks in it; otherwise I
just learn to use the new syntax for writing in a language I already
know. As most of these tasks happen at my workplace, I am somewhat
limited to languages that will be accepted by my colleagues. But
sometimes I try to learn a new programming language precisely because
I will be able to use this langauge when using other's language
syntax: I've already wrote Python in Java (and vice versa), LISP in
C++, Scheme, C++ and assembly in C and in Java; there always was some
gain in using foreign techinques. Now I try to learn ML so I would be
able to write ML in C++.

And as an answer to your question: I do not consider the name as
relevant; I will learn FPC if it will be an acceptable choice in my
workplace or will give me something I do not know yet.

--
Sincerely Yours,
 Omer Shapira

---

From: "ik_5" <[email-masked]>
Date: Mon, 21 Nov 2005 13:28:15 -0000

> the one they are trying to emulate?

You are missing then a lot about Pascal :)
This is not a new Pascal, but rather the development of the language.
If you would have worked with Borland Pascal (Not Turbo Pascal), this
changes where less different then what you think on them now.

Pascal, or at least FPC and Delphi (that is ding for a long time now),
are not trying to mimic C or C++, rather it's an alternative. You have
in FPC macros, but not the type of macros that you will use in C or
C++. They wasn't planed to be one.

Pascal is the only language I know that does things different from any
other exited (used) language today. You can only dream on the RTTI
that FPC and Delphi have on C++ (I'm still learning the RTTI part in
FPC). 
In C++ you are most likely using STL to have the same features in
FPC/Delphi (I don't know the history of STL so I do not know what came
first). So why not to use a language that that thing "build in" ?

> Pascal would have become a standard by now...

C# btw took a lot of things from Delphi as well (many "power features"
in C# are based on the Delphi implementation... at least the last time
I checked C#).

> by other languages I know.

These days (at work), I'm using a lot of Perl, Java, Javascript, CSS,
nasl and others... But, still I see that many things that I do with
Java for example, can be done much better and faster in FPC, with less
time spending on small things such as "should I use String or
StringBuffer", "did I passed it as null ?" etc.. 

> nyh@m...             |-----------------------------------------

---

From: "Tzahi Fadida" <[email-masked]>
Date: Mon, 21 Nov 2005 15:44:04 +0200

I used to love to learn languages, but as time goes by I find
that if I don't use a language I forget too much to just come back
and start programming in it. For example, cobol, I used to know it
by heart and a while ago someone offered me to do some cobol
job but because I didn't have confidence in my ability after all
these years I had to turn it down.
So now, I will only learn things I am about to use.

btw, I don't think delphi is an emulation of C++. C++ was a 
compromise and I don't like it at all. However, java and delphi are unique
and they come with certain rules of thumb that let you feel
secure that they will help you get the job done.
Of course, the last few months I am programming in C since
it's a requirement and I came to realise that C, although, error prone
a lot more than high level languages, mostly you would prefer it 
because of the efficiency factor and is worth the extra effort and 
risk (the risk of failure at the client and recalls). However, I don't advocate
the use of C for direct user applications or any GUI related applications,
applications that don't need to be very efficient.

Regards,
	tzahi. 

> -----Original Message-----
> From: [email-masked] 
> [mailto:[email-masked]] On Behalf Of Omer Shapira
> Sent: Monday, November 21, 2005 3:14 PM
> To: [email-masked]
> Subject: Re: [hackers-il] How do you choose your programming 
> language ?
> 
> ------------------------ Yahoo! Groups Sponsor 
> --------------------~--> 
> Get fast access to your favorite Yahoo! Groups. Make Yahoo! 
> your home page
> http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/saFolB/TM
> --------------------------------------------------------------
> ------~-> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
>

---

From: Omer Zak <[email-masked]>
Date: Mon, 21 Nov 2005 16:11:39 +0200

> changes where less different then what you think on them now.

First of all, I am hereby officially registering my profound objection
to the failure of this mailing list to host a violent and highly
interesting religious war over the relative merits of languages like
Haskell and O'Caml, which brought to the table novel concepts, which are
missing from languages like C++ and Pascal.

Now, if we are discussing Pascal, why not argue about more recent
languages from Niklaus Wirth's heritage, such as Modula-2, Modula-3 (not
designed by Wirth himself) or Oberon-2?

Another principle more worthy of arguing about:
Which language scales better for giant projects (and I mean projects
with 10^7 lines of source code) and why?  I am fed up with sandbox level
quibbles about the relative merits of

if (boop)
then begin;  beep; end;
else begin;  baap; end;
endif;

versus

if (boop) { beep; } else { baap; }

or 

if (boop)
  beep
else
  baap

After you have spent time typing the above stuff, it no longer matters
which is easier to write.  What matters is the difficulty to maintain
those pieces of smelly brown matter.  And this is the bane of large
scale projects.

Let's argue like grown-up persons having wicked fun in the most naughty
nightclubs while trying to conquer the wilderness over there instead of
toddlers who play in the sandbox under the protective eyes of nannies
from the neighborhood nunnery.
                                            --- Omer
-- 
Sent from a PC running a top secret test version of Windows 97.
My own blog is at http://www.livejournal.com/users/tddpirate/

My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html

---

From: Micha Feigin <[email-masked]>
Date: Mon, 21 Nov 2005 17:48:17 +0200

On Mon, 21 Nov 2005 16:11:39 +0200

> missing from languages like C++ and Pascal.

My favorite programing language is a nice Baseball bat. Won't give you nice gui
but will easily get rid of it. It is also easy to maintain and debug, even
after 10^7 blows ;-)

---

From: Omer Zak <[email-masked]>
Date: Mon, 21 Nov 2005 17:59:14 +0200

> but will easily get rid of it. It is also easy to maintain and debug, even

Cute, but I would be disappointed to see bandwidth wasted on a religious
war between baseball bats and clue sticks as aliases to the same
concept.       :-)
                                          --- Omer
-- 
Jara Cimrman.  A name to remember.
My own blog is at http://www.livejournal.com/users/tddpirate/

---

From: Shlomi Fish <[email-masked]>
Date: Tue, 22 Nov 2005 01:12:15 +0200

On Monday 21 November 2005 14:22, Nadav Har'El wrote:
> Java "succeeded" (if you can call it that) because it had genuine
> differences from existing languages. It wasn't the same as C++ with a
> different syntax, or the same as Perl with a different syntax, and so on.
> It had something genuinely different to offer. Of course, you might argue
> (like I do) if this "different" necessarily means better.
>

I beg to differ. .NET might be popular and might be from Microsoft, but only 
time can tell if it's a fad or not. Meanwhile:

C# has a cross-platform open-source implementation - Mono, and some other 
open-source components (DotGNU, a C#/Java#/VB# compiler, etc.). From my 
limited experience, it is faster than Java (including Sun's Java JDK) its GUI 
applications take a much shorter time to load, and they also feel much 
snappier than Java. I should note that I didn't try JDK 1.5 yet extensively, 
but the only program I ran that required it, was the Ants "third-generation" 
file-swapping client, and it couldn't even connect and allow me to swap 
songs.[1] I don't recall how snappy it was, but I quickly abandoned it.[2]

There are some very smart open-source people who are writing stuff using .NET. 
Either ASP.NET things, applications for GNOME (E.g: Beagle, F-Spot), or even 
open-source Windows applications. There's also Perl.NET, IronPython, etc. 
which are implementations of dynamic languages above .NET. I myself, have 
contributed two bug-fixes to F-Spot which is written in C# using Gtk#, and it 
wasn't an entirely unpleasant experience. C# seemed pretty much like Java, 
only a bit better (and possibly more complicated) in some respects.

All of these things bid pretty well for .NET (which is much more than just 
C#). One should not rule .NET, just because it came out of Microsoft and 
because it is based on Java. 

Regards,

	Shlomi Fish

[1] - Hi Elad! Yes, I'm "stealing" as always.

[2] - The ironic thing is that one can write perfectly responsive GUIs with 
Perl, Python and friends with Tk, Gtk, Qt, etc. while not doing too much 
effort. And these languages are always tauted as slower than Java.

---------------------------------------------------------------------
Shlomi Fish      [email-masked]
Homepage:        http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.

---

From: "ik_5" <[email-masked]>
Date: Tue, 22 Nov 2005 10:38:43 -0000

> effort. And these languages are always tauted as slower than Java.

C# is the proof that Delphi does worth something. 
They used Java syntax with Delphi idea and combined it together... BTW
there is also Delphi .NET as well... 

Since Delphi 5 there where group of components that allowed you to
create the same program you usually do with databases, but make them
as CGI on the web, so you can take an existed gui program and just use
"grep replace" to these components instead of the original you are
using (and without changing any other line of code), and the program
will become a full CGI program. 

Another power to Pascal, that I never found on any other compilers and
IDE based compilers.

---

From: Shlomi Fish <[email-masked]>
Date: Tue, 22 Nov 2005 22:24:52 +0200

On Monday 21 November 2005 15:44, Tzahi Fadida wrote:
> risk (the risk of failure at the client and recalls). However, I don't
> advocate the use of C for direct user applications or any GUI related
> applications, applications that don't need to be very efficient.
>

Hi Tzahi!

We had this discussion before:

http://groups.yahoo.com/group/hackers-il/message/4104

In it, I tried to tell you that there are many other reasons one would prefer 
using C (ANSI C, C/C++, ObjC, etc.) over Java and possibly other languages 
besides "efficiency". This has motivated me to write the essay "When C is the 
Best?":

http://www.shlomifish.org/philosophy/computers/when-c-is-best/

I publicised it on OSNews:

http://www.osnews.com/story.php?news_id=12189

And in turn it hit the rest of the blogosphere at the time:

http://www.google.com/search?q=%22when+c+is+the+best%22&ie=UTF-8&oe=UTF-8

Note that I have some problems with the essay, that are mentioned on the page. 
And some others were pointed out by some of the less mis-guided comments.

Please stop implying that C would only preferable when performance is 
critical. Maybe it's for you, but it's not for me and it's not for many of 
the other people who use C.

Regards,

	Shlomi Fish

---

From: "Tzahi Fadida" <[email-masked]>
Date: Tue, 22 Nov 2005 23:09:01 +0200

I am not going to start a long discussion (although its interesting) since I don't have
the time.
However, reading back your comments, you imply that C is good because of portability
,etc... system calls, etc... FOSS, etc.., static linking...
Anyway, all of these worth nothing if the software is distributed and there is a major
recall because of bugs such as range checks rouge pointers, etc... the usual...
Better use a high level language that restrict more than being flexible and even less
efficient because of that and save you the cost of recalls.
I am talking about the bottom line, which is revenues, cost to develop, market and
time to market which in todays still backward approach are not integrated fully
into a software lifecycle and timeline.
Anyway, some of our doctoral students in the faculty are working
on this integration. Maybe in a few years it will become more clear...

Regards,
	tzahi. 

> [mailto:[email-masked]] On Behalf Of Shlomi Fish
> Sent: Tuesday, November 22, 2005 10:25 PM

Regards,

	Shlomi Fish

 
Yahoo! Groups Links

---

From: "Nadav Har'El" <[email-masked]>
Date: Wed, 23 Nov 2005 11:04:20 +0200

On Tue, Nov 22, 2005, Tzahi Fadida wrote about "RE: [hackers-il] How do you choose your programming language ?":
>...
>...

In theory, you are right, and such reasons are always quoted for why Java
is better than C.

But while in theory, theory and practice are the same, in practice, practice
is often different from theory :)

What I mean is that often a program gets written in, say, Java, and while it
results in a program that has fewer bugs - it often results in a program that
is utterly unusable, because it takes up tons of memory ("don't worry, just
upgrade your memory to 1GB" is something I often hear in the context of Java
programs), or other performance issues. On more than one occasion (dare I
say, "every occasion"?) when a Java project or program is complete, the
people involved say, "This product has a great potential, but if it were
written in a different language, perhaps we could actually use it."

And I'm saying this is a person who currently programs in Java for a living (!).

So while when you say "C is better in performance" people always think
"I don't care because I don't mind if my program is 10% slower, or the
GUI takes 10 milliseconds instead of 1 milliseconds to update", you can't
neglect it altogether. A 5-fold memory usage increase, a 5-fold slowdown
in CPU-intensive applications, pauses (for garbage-collection or swapping)
during interactive applications - these things are NOT ACCEPTABLE. And in
some languages (especially Java) and some cases, they are nearly unavoidable.

Since my vents are already open ( :-) ), let me say what really bothers me
about Java, and its concept of garbage collection.
Java basically assumes that by the time of garbage collection, most of the
objects in memory are garbage, and its GC algorithms handle this case very
efficiently. It is almost always the case, because Java encourages you to
create many transient objects that live for very short durations.
So Java programs typically allocate a (very) large heap, and just go over
it giving out memory until the heap is all finished, at which time garbage
collection is done (very efficiently - forget the details for now).
The problem is that this process is very good when the Java virtual machine
is given the machine's entire memory (Linux kernel hackers: this is exactly
like the Linux kernel always tries to fill up the entire memory with buffers
and caches). So Java is ok for running a single huge application on some
machine. But as soon as we start running several separate JVMs (namely,
different Java-written utilities) on the same machine, things get hairy.
You can't let each Java program use 1 GB of heap, because even if it needs
just 50 MB, it will REALLY USE that 1 GB. So you need to either allow the
program to use tons of memory (ever used Eclipse? it's really notorious in
this regard) or artificially limit the heap size of the program, causing
horrible crashes when the heap really runs out because the program really
needs more memory. Sun's JVM (but not IBM's!) knows to shrink the heap
to a size more similar to the real size needed, but it still doesn't do
this effectively, and it always uses up much more memory than the program
really needs.

So in short, performance is *always* an issue: nobody cares about 10%
speedups, but people always care whether a utility takes 20 MB of memory
or 200 MB of memory (these are actual numbers from a comparison of one
C program and a similar Java program we did at work).

-- 
Nadav Har'El                        |  Wednesday, Nov 23 2005, 21 Heshvan 5766
[email-masked]             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |The trouble with being punctual is that
http://nadav.harel.org.il           |nobody is there to appreciate it.

---

From: "ik_5" <[email-masked]>
Date: Wed, 23 Nov 2005 10:23:54 -0000

--- In [email-masked], "Nadav Har'El" <nyh@m...> wrote:
>
> On Tue, Nov 22, 2005, Tzahi Fadida wrote about "RE: [hackers-il] How
> is often different from theory :)

So lets return to the original discussion: use Pascal :) It have the
low programming of pointers, memory handling on your own, and you have
the "Java" like usage, that someone already made the job for you
instead of do it on your own.

It's native compiled to many OS's and many architecture, and it take
lass time to do many things that on Java or C or C++ take a lot of
time/code writing to do the same thing. :)

So do you really want to enjoy all of this worlds, or just keep saying
how much Java Sux, but keep using it ? Or saying "I do not like C/C++,
but I don't have anything else to work with" ?

---

From: "Tzahi Fadida" <[email-masked]>
Date: Wed, 23 Nov 2005 14:58:07 +0200

I think that because I discussed a few month ago with shlomi about
the benefits of java you were unknowingly biased to think that is the only
language of choice I advocate.
I meant that you can use ANY higher level language that was intentionally
limited and constrained in order to avoid lower level bugs such as in C or
C++. Not so weird, pascal was actually built originally for students to learn
programming concepts and because of that it should be inherently safer than
C. However, we all know that even in pascal you can circumvent safeguards as
part of the language and so the most restricted language I know that 
is widely used is JAVA.

Btw, regarding the C system calls you sometimes have to use in JAVA, even makes
my case stronger. If you have to get to the C system calls, than you either should
have used a lower level language or find a java librarly. Either way this place where
you have to use the call is probably a dangerous place for bugs and thus when you
call just it you can control the number of errors from it.

If you really don't like JAVA performance there are native compilers now that should
work most of the time, hopefully it will tell you when it can't :) but I wouldn't like to
find it out after distribution.

I think that there were attempts to make a variant of C with as many safeguards
as possible but I don't remember the name. However, C as is can never be a part of
RAD family which is what an organization would probably use to develop end user
apps. I.e. time to market is everything today.

I know it feels strange for a technical discussion to sudenly talk about marketing
strategies and costs but that's the way these things goes. 
Its all about the money.

Of course if we are talking about a BSD style FOSS(no arguing that BSD!=FOSS) or
GPL end user app (no library style licensing) FOSS project than do what you want.
Have fun with C, I know I did :) (not to mention P langs :)

P.s.: I LOVE PASCAL,DELPHI,C. which has nothing to do with my end decision.

Regards,
	tzahi. 

> [mailto:[email-masked]] On Behalf Of Nadav Har'El
> Sent: Wednesday, November 23, 2005 11:04 AM
> On Tue, Nov 22, 2005, Tzahi Fadida wrote about "RE: 
> [hackers-il] How do you choose your programming language ?":
> >...
> [email-masked]             
> |-----------------------------------------
> 1.2 million kids a year are victims of human trafficking. 
> Stop slavery.
> http://us.click.yahoo.com/WpTY2A/izNLAA/yQLSAA/saFolB/TM

---

From: "Nadav Har'El" <[email-masked]>
Date: Wed, 23 Nov 2005 16:06:35 +0200

> find it out after distribution.

If you'll read my post, you'll see that the things that bother me cannot be
fixed by a "compiler". The entire notion of "fill the entire memory with
temporary objects like there's no tomorrow, because we have an efficient
algorithm to clear that garbage later" in Java is what causes the horrible
memory usage issues, and I don't see how any compiler can solve this.

Other high-level languages such as Perl (for example) run into much fewer
problems of this sort for several reasons. Some of them have a reference-
counting garbage collection (which is slower, but allows less accumulation
of garbage). Some of them don't encourage so much "object orientedness"
(in other words, create, create create and create objects) as in Java.
Also, you don't often use these language to create as large programs as
you often do in Java.

-- 
Nadav Har'El                        |  Wednesday, Nov 23 2005, 21 Heshvan 5766
[email-masked]             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |An egotist is a person of low taste, more
http://nadav.harel.org.il           |interested in himself than in me.

---

From: Omer Shapira <[email-masked]>
Date: Wed, 23 Nov 2005 15:34:38 +0200

On 11/23/05, Tzahi Fadida <[email-masked]> wrote:
> C++.

Actually, this is much simpler than that: a lion's share of mistakes
can be avoided by imposing stricter discipline -  it is much harder to
miss a tone on a (tuned) piano than on a (tuned) fiddle - but great
violinist "somehow" manage with the imperfect tool that gives you a
low level access to tonal "address space". Returning to the geekity,
more strict languages often cut mistakes by not allowing them. Which
allows industrializing the development process - every operation has a
(quite a high) cost, which can be seen, measured and prioritized.
Nothing to do with "high" level of language, though.

These days I am re-learning to use type inference to speed-up my
programming, and, quite amazingly, it works. Type inference is
considered a property of high level languages; not allowed to use
OCaML at work I manage pretty well with g++ 3.3.3.

--
Sincerely Yours,
 Omer Shapira

---

From: Zohar Kelrich <[email-masked]>
Date: Wed, 23 Nov 2005 16:54:11 +0200

On Nov 23, 2005, at 16:06, Nadav Har'El wrote:

> On Wed, Nov 23, 2005, Tzahi Fadida wrote about "RE: [hackers-il]  
> How do you choose your programming language ?":

Native compiler here as in, compile to native code, not JVM code, I  
believe.

> memory usage issues, and I don't see how any compiler can solve this.

Actually, the Java spec says nothing whatsoever about what sort of  
implementation the GC should have; its only GC "contract" is, IIRC,  
no object gets finalized more than once.
You're free to free (as it were)  objects at the end of every method,  
if you so choose.

   Zohar

---

From: "Nadav Har'El" <[email-masked]>
Date: Wed, 23 Nov 2005 18:34:56 +0200

> You're free to free (as it were)  objects at the end of every method,  

Just like understanding human languages requires several levels (syntax,
semantics, pragmatics, and world knowledge), so does understanding a
programming language. You cannot realisticly seperate a language and its
syntax from the language's standard library, and accepted practices.
Also, the syntax and semantics it provides, or doesn't provide, implies on
the way people use it, and therefore on the way typical programs are written
in this language.

In this example, one very fundamental point about Java is that there is no
free() call and no objects that live only for the duration of a single
scoped (such as "automatic" (on-stack) variables in C/C++, or "autoptr" in
C++). So generally, a user cannot do what you describe in Java (he has no
free() function), and every Java implementation, whether an "interpreter" or
"compiler", CANNOT do what you describe in the general case. Because,
imagine the following piece:

	{
		Thing a = new Thing(17);
		counter+=someobject.doSomethingWith(a);
	}

Can a be freed automatically right after this block (by an interpreter or
a compiler, it doesn't matter)? It's not easy to decide. It depends on
what doSomethingWith() does. Typically, what this method does is not known
during compilation of the individual classes. Also, someobject might be of
different classes (because of inheritence) and each of these classes' method
might do something else. But even if you know exactly which method is called,
it's still not easy to know if a pointer to a is kept. Perhaps that method
calls other methods with a, or with parts of a as parameters, and these
methods saves pointers?

Don't understand me wrong - the very fact that everything in Java is a
reference, and there're no error-prone pointers/autopointers/automatic
variables/malloc-free, and no chance to accidentally use an out-of-date
pointer or forget to free one - is what makes Java different, and easier to
write than languages like C++. It's a deliberate design decision, and not
an implementation mistake.  But at the same time, it's what makes it a
memory hog.

-- 
Nadav Har'El                        |  Wednesday, Nov 23 2005, 22 Heshvan 5766
[email-masked]             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |My password is my dog's name. His name is
http://nadav.harel.org.il           |a#j!4@h, but I change it every month.

---

From: Gábor Szabó <[email-masked]>
Date: Wed, 23 Nov 2005 18:51:47 +0200

> an implementation mistake.  But at the same time, it's what makes it a

What do you think in this regard about Perl6 and Parrot ?

Gabor

---

From: "Nadav Har'El" <[email-masked]>
Date: Wed, 23 Nov 2005 19:09:26 +0200

> What do you think in this regard about Perl6 and Parrot ?

I don't know, I don't know anything about perl6. What has changed in Perl 6
regarding memory handling?

Perl 5 had reference counting garbage collection, so if by the end of a
scope an object had no references, it would be freed immediately. In this
scheme, both allocation and freeing is actually slower (even considerably
slower) than recent Java's "generation-based" garbage collection (if anyone
is interested, I can try to summarize what that means), but with the Perl way,
your program uses as much or as little memory as it actually needs. This
is why Perl can be called a lot of things, but I've yet to hear anyone calling
Perl programs "memory hogs" or "sluggish", or other words all-to-often used
to describe Java *utilities*
(like I said earlier, in an environment where you have just one huge Java
JVM - like cellphones, Web servers, and so on, Java's use-all-memory-I-can
model perhaps more sense).

-- 
Nadav Har'El                        |  Wednesday, Nov 23 2005, 22 Heshvan 5766
[email-masked]             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |When you handle yourself, use your head;
http://nadav.harel.org.il           |when you handle others, use your heart.

---

From: "Tzahi Fadida" <[email-masked]>
Date: Wed, 23 Nov 2005 22:56:26 +0200

I am not sure you are correct. I believe that in latest java there is a trick with
the classloader that you can allocate and free objects, however I heard
that it can lead to memory leak (whats new). I also heard that there are alternative
GC and that there are calls that can expedite GC.
Anyway, as I mentioned before there are native compilers that makes all these
a mute discussion, e.g. GCJ. And, its FOSS.

Personally the most important reason I like JAVA is that you can find the bugs quickly
and develop quickly using Jbuilder which is the best (although you have to pay).

Regards,
	tzahi. 

> Sent: Wednesday, November 23, 2005 6:35 PM
> On Wed, Nov 23, 2005, Zohar Kelrich wrote about "Re:

---

From: "Nadav Har'El" <[email-masked]>
Date: Thu, 24 Nov 2005 00:53:25 +0200

On Wed, Nov 23, 2005, Tzahi Fadida wrote about "RE: [hackers-il] How do you choose your programming language ?":
> that it can lead to memory leak (whats new).

Any language is Turing-complete, and if you realy try very hard, you CAN
allocate and free memory, perhaps by using class-loaders, or perhaps by
using JNI (i.e., C code). But doing this is extremely complex, and goes
against the entire design of the language. It's almost like buying a plane,
and then taking off its wings and trying to modify its engine to be more
fuel-efficient - why don't you buy a car instead?
Nobody programs the way you describe in Java, except perhaps as an excercise.
If someone wants to write this way, they just switch to C or whatever.

> I also heard that there are alternative

For the object creation patterns that are common in Java (myriads of short-
lived objects, Java's current GC ("hotspot") is extremely efficient in speed,
because allocations are extremely quick (no need to "search the heap" for
holes like in C, just increment the pointer), even in a multi-threaded
program, and free doesn't take any time (the time of GC is not proportional
to the number of dead objects, but rather to the number of living objects).

I wonder, though, if anybody attempted to do a reference-counting GC for
Java (do you know of such a thing?). It would have been much slower than the
current GC, but perhaps waste much less memory. For many applications,
this could have been a win.

> a mute discussion, e.g. GCJ. And, its FOSS.

I completely fail to understand this statement. Please enlighten me.
Even if gcj compiles codes, it still has to use garbage collection, because
in Java all parameters are "passed by reference" (except for primitive types
like "int"), and anybody can save these references and use them later, and
stop using them much later. Except a few optimizations (like immediately
freeing an object which was never passed anywhere), I don't see what you
can do to improve memory waste by dead objects. And these optimizations
are not specific to a compiler, anyway.

> and develop quickly using Jbuilder which is the best (although you have to pay).

I use eclipse, which is probably the most convenient development environment
I've seen. I agree, it's much more fun to program in Java than in C or C++.
BUT, the sad truth is that often when you finish the project and see how
the result behaves, you wish you spent the time on writing the project in
a different language :(

Ok, that has been the end of my gripes about Java for today. Sorry :-)

-- 
Nadav Har'El                        |   Thursday, Nov 24 2005, 22 Heshvan 5766
[email-masked]             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |Time is the best teacher. Unfortunately
http://nadav.harel.org.il           |it kills all its students.

---

From: "ik_5" <[email-masked]>
Date: Wed, 23 Nov 2005 19:35:06 -0000

--- In [email-masked], "Nadav Har'El" <nyh@m...> wrote:
>
> On Wed, Nov 23, 2005, Gábor Szabó wrote about "Re: [hackers-il] How
> model perhaps more sense).

How about this "hack" of Garbage Collector (Borland made it a bit
longer then really needed to be, but it gives you a demonstration
about  how the strength of Delphi (and FPC):
http://bdn.borland.com/article/0,1410,28217,00.html

And you can use a unit that do all of it and just call the function ...

Hows that for language that does not have Garbage Collector ? :)
But I still prefer not to use this types of "hacks".

Ido

---

From: "ik_5" <[email-masked]>
Date: Mon, 21 Nov 2005 15:12:25 -0000

> missing from languages like C++ and Pascal.

I'm sorry to say that I do not know O'Cmal or Haskell to do any
comparison with them. 

> designed by Wirth himself) or Oberon-2?

Because Pascal took a long road since the first design of Wirth, and
now it's not a student based language, but a strong language that
stands on it's own... Modula was created as far as I know, to be
mathematical based programming language with the idea of Fortran but
developer friendlier ... and with better syntax :P

> with 10^7 lines of source code) 

Well from experiences of coding huge projects with Delphi, VB and few
other languages, I must say that Delphi was the best tool for
maintaining huge projects. One of the reason is the IDE, and the
second is the ease to make your code part of the IDE on design and run
time... And thats before actually using the project handling tools and
many other features inside the IDE (tracking about some deceleration
up to the source file, with line, to start, or the ability to flexible
the use of many units and libraries using one IDE.
Integrated Custom Help files with the help system, tools to create
"Delphi Docs", and many third party components also ease the job.

BTW, Lazarus seems to have this same features more and more, and
Lazarus have also stand alone tools.

And speaking of Syntax usage. How do you declare today something in a
header and use the same declaration in the source file (like .c) ? I
guess Copy paste. On Delphi you just wrote the "header" part and
pressed on key combination to have the right deceleration works for
you on the code section (with the use of class namespaces etc...). 

And I can continue if you really want to hear more (Code templates in
the IDE and replace it with the right paramters, so you will not need
to write 

if boop then beep else baap

or

if boop then
  begin
   beep
  end
else begin
      baap
     end;

.

>and why?  I am fed up with sandbox level

---

From: Omer Shapira <[email-masked]>
Date: Wed, 23 Nov 2005 19:25:32 +0200

> calls other methods with a, or with parts of a as parameters, and these

There are rumours [0],[1] that the next Java version, Mustang, will
include the C++-like behaviour (the proper name for which is RAII).
Most probably the mechanism will be conservative, i.e. it will opt for
false negatives over false positives. So your assertion on the general
case is still valid.

> write than languages like C++.

Well, easier for some tasks. Generally speaking, there are a lot of
opportunities  to accidentally use an out of date pointer in Java.
This is because there are mechanisms that allow one to escape the GC
model (e.g. weak references), along with mechanisms that allow one to
extned the garbage collection. These techniques are used by developers
of JxEE application servers, which are the reflection of OS
development in the Java universe.  Of course, an assumption that a
business logic developer never touches these, so she's free to assume
that the code is executed by scrupulous pixies.

The bottom line is that expert-level development is dangerous even in
Java. On ther other hand, Java universe provides good tools for a
developer that is ready to use these.

> It's a deliberate design decision, and not

A memory hog and a mess to hack on. Try to implement a port scanner in
Java (I did) -chances you'll have to implement your own abstractions
for: sockets, addresses, memory buffers etc. On the other hand, there
are wonderful tools that can help you doing these - I am still to see
a tool that gives me a powerful refactoring browser for C++ that will
be comparable to where Eclipse was 2 years before.[2]

Memory problems are the easiest problems out there. Once the memory
problems are figured out, there are logic errors, type errors, state
errors, concurrency errors, error handling errors and not meeting the
functional requirements. All these are subtler than memory errors and
therefore harder to get right. Java attempts to answer these issues as
well as memory-related issues - an activity that contribute to the
infamous Java performance and run-time requirements.[3]

[0] http://forums.java.net/jive/thread.jspa?messageID=7952&tstart=0
[1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6336351
[2] SlickEdit is considerably less powerful. CDT is a joke, just as
KDevelop is. Of course, I can manage with
sed/awk/perl/vi/emacs/python/shell biosphere, but it routinely
requires more effort.
[3] These issues are treated in a compeltely different way in the C++
community. Here, learning curve is completely sacrificed to portable
and productive environment (that is inconsistent to the degree of
hostility and requires YEARS of hands-on experience)[4]. Most people I
know just do not make it to the end of the learning curve (which
includes type theory)
[4] Just as Common Lisp does.

--
Sincerely Yours,
 Omer Shapira

---

From: Omer Shapira <[email-masked]>
Date: Thu, 24 Nov 2005 15:37:55 +0200

> I'm sorry to say that I do not know O'Cmal or Haskell to do any

:)

--
Sincerely Yours,
 Omer Shapira

---

From: Beni Cherniavsky <[email-masked]>
Date: Sat, 03 Dec 2005 23:05:37 +0200

> http://www.shlomifish.org/philosophy/computers/when-c-is-best/
I'm not trying to comment on the article in general, just on one
sentence that caught my attention:

    ...  Open-source high level languages are better (especially 
    if they can be compiled using gcc or supply a gcc back-end), 
    but nonetheless, C is still more portable than anything written 
    using it.

If anything written in C is not as portable as C itself, then of what
use is this portability of "C itself" and how do you define the
protablility of "C itself" at all?!?

What you are trying to say is that if C is implemented on N_C
platforms, any language L implemented in C will necessarily run on a
subset of them (N_L < N_C), hence a program P written in L will run on
N_P < N_L platforms, whereas if it were implemented directly in C it
could exceed N_P, approaching the upper limit N_C.

But this argument is quite meaningless in real life, because approacing
N_C in C is very hard!  Very few programs ever came reasonably close to
N_C: Emacs, Perl and similar autoconf/ifdef monsters...  And it took
them an awful lot of time to achieve such wide portability.  Programs
written in P (Emacs Lisp, Perl, etc.) achieve about 0.95*N_P very
easily.  But to even come that close to N_P with a program written
directly in C, you must invest as much time as the writers of P did.

Conclusion: C is only potentially portable - the portability layer must
be implemented by you, and usually you are much better off using an
existing one (e.g. a FOSS langauge).

---

From: "ik_5" <[email-masked]>
Date: Sun, 04 Dec 2005 05:44:08 -0000

> existing one (e.g. a FOSS langauge).

Then use FreePascal :D thanks for bringing us back to the original
argument ... 

FPC have less range of OS and arch's it supports (you can help it
support more btw), but it's much easier to port an FPC program then to
port C, Perl and many other languages to more then OS.

Perl for example, require ActivePerl for Windows in order to run, and
it's not 100% the same Perl I'm using in Linux (and I do uses Perl in
Linux).

FPC is written in a way that it does not matter what OS/arch you are
using as long as you do not use specific OS/arch functions. So the
program you wrote for Linux will run in Windows. If you used "write"
for console (it's based on OS support: Windows and Amiga require
special code for that), you should write a compile directive that will
tell it to open a console.

BTW FPC is more portable between compilers, then "Ansi C". I was able
to bind libhocr to FPC, and to write the code in such way, that it
worked also for Delphi users, alto when I bind it I never used Delphi
to test it on. On "Ansi C", (the original language of the
library), I
know that it took a lot of work to do the same.

So C is portable only when you use it very careful and delicate. And
Perl is not portable as you may think. FPC is a "script" like language
(it have many script like features, that people usually looking at
language such as Perl, Python and Ruby), but it is not a script language.

For example, if you have a function in an object that will do the
following:

...
type
 TmyClass = class
...
 public
   procedure PrintHelloWorld;
...
end;
...
procedure TmyClass.PrintHelloWorld;
begin
  writeln ('Hello World');
end;
...

I do not need to create the entire class in order to call
"PrintHelloWorld&", but if it would have used something that require
the creation of the class, then I would have needed to create it.

Think how it was solve many Java problems for example.

BTW if you want I can give you so much more examples on why it's
better to use FPC then C or even many other P languages, in a real
programming situations. 

Ido

---

From: Shlomi Fish <[email-masked]>
Date: Sat, 10 Dec 2005 12:29:14 +0200

Hi Ido!

> port C, Perl and many other languages to more then OS.

So, now not only is FPC superior to C, it is also superior to Perl? You 
certainly have a non-neglible amount of Hubris.

OK, let me put the cards on the table: I became tired of all your constant 
raves about how FreePascal is better than C on http://linmagazine.co.il/ . I 
don't care how much they are true or how much you are right - they are still 
incredibly annoying. And now you've discovered Hackers-IL and moved all your 
discussions here.

I like C and Perl and Shell and to a lesser extent some other languages. On my 
system, there's not a single program written in Pascal, yet almost everything 
is written in C or in something that is written in C. And I like it that way.

Please *stop* these useless raves about Pascal, because I find them annoying 
and believe many other people too.

Another annoying issue is the fact that you support the claim that developers 
should not port their programs to Windows. I and many other people have 
strong opinions against this, and yet you brought it in many obscure places 
on linmagazine. Note that the official opinion of the FSF is that such 
efforts are acceptable and beneficial, and many GNU programs (and other FOSS 
programs) were ported to Windows and are actively maintained there. It's 
similar to porting software to non-free UNIX flavours, or to Novell NetWare, 
VMS, and other non-UNIXy operating systems. 

So, please stop.

Regards,

	Shlomi Fish

---

From: "ik_5" <[email-masked]>
Date: Sat, 10 Dec 2005 11:16:52 -0000

Shlomi if you do not have anything smart to say please don't !
You annoinning everyone that I know, and I find out new people that
also think so all of the time.

I did not wrote a Freecell solver, so I know I can not say anything
unless it's the same what other think as well, so guess what, I will
continue say what I want to say.

And if you was really smart, you could have wrote this thing on
different note, and give it to me in private... 

So please move to europe or the US, and stop annoing everyone over here...

--- In [email-masked], Shlomi Fish <shlomif@i...> wrote:
> So, now not only is FPC superior to C, it is also superior to Perl? 

What ever ...

>You eertainly have a non-neglible amount of Hubris.
> 
> Shlomi Fish      shlomif@i...

---

From: Shlomi Fish <[email-masked]>
Date: Sat, 10 Dec 2005 14:12:22 +0200

> Shlomi if you do not have anything smart to say please don't !

What I told you just now, was a very smart observation thing to say.

> also think so all of the time.

You did not reply to my complaint or observation, and you are instead now 
making a personal attack. "You are annoying everyone that I know" -- I happen 
to know many people here who I am not annoying, at least not enough to 
prevent them for replying to my messages.

> continue say what I want to say.

Very well, in that case, I may mark your messages as read and put them in an 
obscure folder on my system, just so I won't be bothered by them. If they 
have any substance then people will probably reply to them.

And what does not having written a Freecell solver has to do with anything? I 
have a problem understanding the first part of your sentence.

> different note, and give it to me in private...

Even smart people can act stupidely sometime. I did not write it to you in 
private because:

1. Private messages are more easily ignored.

2. I believe I was speaking on behalf of other people, too.

3. It is of interest to the public.

4. Hopefully, other people will "I feel so too" or alternatively "I think 
you're wrong."

So there is some logic to the madness.
 
> So please move to europe or the US, and stop annoing everyone over here...

Another personal insult...

Ido, I don't think you're a bad person or anything, but I gave you some advice 
about two of your public messages' patterns, that I (and possibly others) 
find annoying. (and for a good reason). On the other hand, you had nothing 
more mature to do than personally attacking me, and you also have not 
addresses any of my complaints. You also top-posted, which is considered bad 
netiquette and is known to generate responses full of non-sequitors and 
evasions. (as was yours).

Regards,

	Shlomi Fish

> > > > If anything written in C is not as portable as C itself, then of
>
> what
>
> > > > subset of them (N_L < N_C), hence a program P written in L will
>
> run on
>
> > > > But this argument is quite meaningless in real life, because
>
> approacing
>
> > > > N_C in C is very hard!  Very few programs ever came reasonably
>
> close to
>
> > > > them an awful lot of time to achieve such wide portability.
>
> Programs
>
> > > > Conclusion: C is only potentially portable - the portability
>
> layer must
>
> > OK, let me put the cards on the table: I became tired of all your
>
> constant
>
> > raves about how FreePascal is better than C on
>
> http://linmagazine.co.il/ . I
>
> > don't care how much they are true or how much you are right - they
>
> are still
>
> > incredibly annoying. And now you've discovered Hackers-IL and moved
>
> all your
>
> > discussions here.
> >
> > I like C and Perl and Shell and to a lesser extent some other
>
> languages. On my
>
> > system, there's not a single program written in Pascal, yet almost
>
> everything
>
> > is written in C or in something that is written in C. And I like it
>
> that way.
>
> > Please *stop* these useless raves about Pascal, because I find them
>
> annoying
>
> > Another annoying issue is the fact that you support the claim that
>
> developers
>
> > strong opinions against this, and yet you brought it in many obscure
>
> places
>
> > efforts are acceptable and beneficial, and many GNU programs (and
>
> other FOSS
>
> > programs) were ported to Windows and are actively maintained there.
>
> It's
>
> > similar to porting software to non-free UNIX flavours, or to Novell
>
> NetWare,
>
> > 95% of the programmers consider 95% of the code they did not write,
>
> in the
>
> > bottom 5%.
>
>
>
> Yahoo! Groups Links
>
>
>

--

---

From: "Nadav Har'El" <[email-masked]>
Date: Sat, 10 Dec 2005 15:12:44 +0200

On Sat, Dec 10, 2005, Shlomi Fish wrote about "Your (Annoying) Raves about Pascal [was Re: [hackers-il] Re: How do you choose your programming language ?]":
> On my 

Actually, there is one program written in Pascal: TeX.

But, the exception sort of prove the rules. If Pascal is so great, how
come that 15 years after I first used it, still none of the programs I
use (or justo one) is written in it? Makes me wonder too.

> should not port their programs to Windows. I and many other people have 

I actually agree with this :-) Stuff I write (say, Hspell) can be ported
to Windows if someone cares enough to, but I'll be damned if I do this
porting myself. I do not use Windows, I don't plan to ever switch to it,
and I am not going to spend a minute on porting my work to a system I'll
never use.

-- 
Nadav Har'El                        |     Saturday, Dec 10 2005, 9 Kislev 5766
[email-masked]             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |You have the right to remain silent.
http://nadav.harel.org.il           |Anything you say will be used against you.

---

From: Shlomi Fish <[email-masked]>
Date: Sat, 10 Dec 2005 15:45:41 +0200

On Saturday 10 December 2005 15:12, Nadav Har'El wrote:
> On Sat, Dec 10, 2005, Shlomi Fish wrote about "Your (Annoying) Raves about 
Pascal [was Re: [hackers-il] Re: How do you choose your programming 
language ?]":
> > everything is written in C or in something that is written in C. And I
> > like it that way.
>

Hmmm... well the first version of TeX was written in SAIL, which was a 
"bizarre Algol like language used only at Stanford AI lab." (to quote some 
old-timer I talked to yesterday on FreeNode). It was then converted to WEB, 
which is a literate programming version of Pascal, (that ends up being 
compiled into vanilla Pascal code). However, from what I know, Don Knuth 
ended up re-implementing it in C-WEB, which is the TeX we know today.

Another note is that Knuth says in his FAQ 
( http://www-cs-faculty.stanford.edu/~knuth/faq.html ) that his favourite 
programming language is CWEB.

When I compiled the TeTeX (a distribution of TeX for UNIXes) RPM once, I don't 
recall needing to install a Pascal compiler. 

> > developers should not port their programs to Windows. I and many other
> > people have
>

That's not the point. Ido and others (see http://dot.kde.org/1104998490/ ) 
believe that it is undesirable to port free software to Windows (for various 
reasons), and that people who do this do a disservice to the community, or 
are wasting precious time. I do not claim a completely UNIX-borne developer 
(like you or I) should explicitly try to port his software to Windows, but if 
a willing Windows-using developer would like to ponie up the effort to do 
that - he shouldn't prevent him from doing it, and try to cooperate with him. 
(like accepting patches that are necessary for clean compilation on Windows, 
or explaining about the code). 

Often portability to Windows is required because other programs or teams need 
to be portable to Windows. Many people have been using Subversion rather than 
Arch or Aegis or different free software solutions, simply because its 
Windows portability is second to none, and they may require performing 
version control operations on Windows. Another example is for OpenOffice.org, 
the GIMP, Inkscape, etc. Win32 portability is very important and so they 
cannot make use of a library that is not portable to Windows.

Regards,

	Shlomi Fish

---

From: "ik_5" <[email-masked]>
Date: Sat, 10 Dec 2005 16:25:15 -0000

--- In [email-masked], "Nadav Har'El" <nyh@m...> wrote:
>
> On Sat, Dec 10, 2005, Shlomi Fish wrote about "Your (Annoying) Raves
about Pascal [was Re: [hackers-il] Re: How do you choose your
everything 
> use (or justo one) is written in it? Makes me wonder too.

If you have used Mac (Before Mac OSX), you would have encounter a lot
more programs written in Pascal (The official compiler that came with
Mac).

As a sokoban player, this is a really known issue (some of the best
sokoban programs written for Mac):
http://members.aol.com/SokobanMac/

developers 
> and I am not going to spend a minute on porting my work to a system I'll

Actually I belive that if we wish to create a real competition with
Windows, Mac and every non open source OS, we must create tools that
will be helpfull and unique to Linux, or any other open source OS.

This tools should answers problems on any side, and will be the reason
for others to move to an open source slution rather then a closed
source one.

And therefor I belive that if we will not create a port of this tools
to any closed source OS, and will control what can be ported, we can
have a real competition that everyone will benifit from it.

Thats one of the reasons why you see my binding of libhdate for
example, that will work on on *nix:
http://cvs.sourceforge.net/viewcvs.py/libhdate/libhdate/bindings/pascal/hdate.pp?rev=1.4&view=auto

BTW to understand why it will work only on *nix, is because of the
reading direction of cdecl, that is the order of functions on *nix
based OS, while on Windows the order is different (I don't remember
what it is).

Regardless of that, I made a binding of libhocr that also compiles
(never tested if it working or not) on Delphi as well on Windows
without a lot of effort by me (btw, I did not test it myself, but
people actually told me that).

Another issue, is linmagazine. Uri invited me to write about FPC on
linmagazine, and on my first post, he also slamed me about things that
does not exists on FPC but does on C, and I proved him (on *private*)
that he is wrong.

I am on a "crussaide" on FPC to change people mind and to prove me
wrong by trying FPC. and when they will try it on FPC, they will find
new world that they did not know existed. I don't care what is the
programming langauge other like, because ther are so many to choose
from, but I do not like "closed" mineds about languages. I do not like
C because I need to work so hard on achiving small things that on any
other programming language will be very simple or even you do not need
to do so. I really love programming in Perl btw... And recently I saw
some really cool things on ruby that made me very interested in that
language as well.
But, I really enjoy and love Pascal. I'm using it since 1993 and I
still learn this language, and I still find better ways and different
reasons to use it all over. If I'll take a code that I wrote on FPC
few months ago (libhdate class for example), I can now write it even
better, and much smarter using FPC, but if I'll use Java or CPP, most
of the ways I'll use on rewriting the FPC binding will not work (and
I'm talking about the logic), because this language depands on C logic.
I started coding in C on 97 or so (I actually started before learning
Pascal, but that does not count), and I still can't see it go
anywhere. I see that history is repeated, by creating new languages
such as D instead of making the language better.

Gadi Evron told me that he really love C, but it's the #1 cuose of
Security Problems that will not exists on Pascal. 

I decided to write copy the full article to SecuriTeam
(http://www.securiteam.com/securityreviews/6D0042AEUQ.htm) about the
problems of Format string, because no one learns how to control tools
such as formats. On FPC and delphi btw, there is also format ability
(and the function is called format), but you can not execute arbitrary
code, or even travel on the user memory, because it created
differently. BTW if I'll use null terminated strings on FPC/delphi or
even TP, I can have the same problems I discribed above.

Another issue that was raised on linmagazine, is that when many people
uses toolkits and sub language (such as STL) to make a better coding,
on FPC and Delphi you can achive the same with the language itself,
before even starting to use the same toolkits. And I can use GTK and
onther toolkits on FPC and Delphi !

So Pasal is built to give me veraity of ways to do write programs.
It's have all of Perl, Python, Ruby, Java worlds, and all of C and C++
worlds, that make it better choice to make things.

BTW for CGI, I still uses Perl and not Pascal. Because Perl is much
better tool for that then Pascal. so you can see that I actully uses
the right tools for the right jobs.

---

From: Shlomi Fish <[email-masked]>
Date: Sun, 11 Dec 2005 12:47:36 +0200

Hi Ido!

It seems that your mailer (gmail ?) does not keep the "Re:" in the subject 
line and also heavily mangles the quoted texts. Please fix it, or switch to a 
different mailer for this list's communication.

On Saturday 10 December 2005 18:25, ik_5 wrote:
> > > is written in C or in something that is written in C. And I like
>
> it that way.
>

Many DOS programs were written in Turbo Pascal, and later on many Windows 
programs have been written in Delphi. But we are talking here about Linux and 
UNIX in general, not of programs of mostly historical interest or of programs 
that you'll now run under an emulation or virtualisation.

> > > should not port their programs to Windows. I and many other people
>
> have
>

I see several problems with this philosophy:

1. The very free software definition claims that the user should have "the 
freedom to run the program, for any purpose". This includes running it on 
proprietary operating systems. The Open Source Definition has a similar 
clause.

2. The issue is not Linux vs. Windows. (or any other proprietary operating 
system) The issue is free software vs. proprietary software. Making a free 
program available under Windows, is better than making the Windows users use 
an equivalent non-free program. That way, their freedom will be reduced.

3. How exactly are you going to prevent people from porting your software to 
non-open-source OSes? Are you going to make them binary only? Are you going 
to make their licensing restrict running them on non-free OSes? (which will 
in turn make *that* software non-free). Are you going to use APIs that are 
specific to free operating systems or even a particular one?

I believe you agree that the first two options are not in accordance with the 
FOSS ideology. The third option, while often necessary, can easily be 
overcome by a couple of conditionals, and if abused, will cause your software 
to be ruled out of integration with the portable mainstream programs. Plus, 
portable programming is a virtue not a vice, and one should not write 
non-portable programs on purpose.

4. It is easier to tell someone to switch to Linux after a large amount of the 
programs he's using are available there too. The best way we can ensure that 
is by making sure FOSS programs are portable to Windows as well as Linux.

5. There are many places where people work on both Windows and Linux, and need 
support for both. They are not going to introduce a Linux only solution 
there.

6. It is possible to run Linux on top or side-by-side with Windows. This can 
be achieved using Xen, VMWare, CoLinux, UserModeLinux (possibly in the future 
when it will be ported to run on top of Win32), and many other cool hacks 
like this. So what exactly have you acheived by purposely making your 
programs Linux-only?

7. The entire argument of "let's make Linux-specific tools so proprietary OSes 
will be outcompeted" sucks pretty badly, but I can't put my finger on why. In 
any case, my six previous arguments are enough.

> have a real competition that everyone will benifit from it.

[Later Text including Raves about Pascal Snipped]

---

From: "ik_5" <[email-masked]>
Date: Sun, 11 Dec 2005 17:13:10 -0000

> that you'll now run under an emulation or virtualisation.

Well, First of all I'm using FPC that is written with Pascal :)
I don't want to give a full list of programs that written in Pascal
and can run on Linux as well (I'm using few of them), so I'll give you
something else:
http://www.kanzelsberger.com/pixel/?page_id=12
(http://en.wikipedia.org/wiki/Pixel32). BTW some of the code of this
program was donated back to FPC ! for example they wrote the compiler
port for BeOS, the handle of Image headers also avilable togather with
FPC etc..

I also play this very addictive game:
http://lwars.sourceforge.net/index.php

And I also use lazarus.freepascal.org.

I will not continue giving additional programs because I see the you
all starting arguing about it and blaiming me again.

> I see several problems with this philosophy:

I see several problems with your presepsion of freedom.
For example you do not like that I'm talking about Pascal, so you try
to shout me up. Isn't that something that hurt *my* freedom ? So why
not limiting the freedom on this subject as well ?!

See the rest of the response inline.

> proprietary operating systems. The Open Source Definition has a similar 

But if by doing so, this freedom is used aginst you. For example
Saffari. As long as Apple needed KHTML as-is, they used it and gave
back to the "community", but when they could leave KHtml and use their
own based KHTML engine, they left the project alone with many excuses.

So now, all of the working hours of open source was given to
commercial use, that spit back to the community. Tomarrow Apple can
register the engine as a patent and prevent KDE of using their own
engine. So what can you do about that ?

> an equivalent non-free program. That way, their freedom will be reduced.

If people saw "open source" and not "free pgorams" (I don't see Open
source as free!) you may be right, but people see "amm... I can get
this without the need to pay" instead of "can you copy the cd you just
bought ?"

> non-portable programs on purpose.

License is one way, another is to avoid placing any code that can be
converted easly to non open source/free based OS.

> is by making sure FOSS programs are portable to Windows as well as
Linux.

"If I have all of this tools on Windows why should I move to a new OS
?" is one of the answers I got regarding this approach.

The PC history teaches us, that Electronic sheets was the reason at
the 80's to work with a PC with IBM/Microsoft DOS. It far better then
do it by hand with too many papers.

Mac teaches us, that if you give something good for graphics including
the programs for it built-in, graphics will be made with Mac.

Microsoft teaches us, that when you can place enough needed product
into one type of OS only, then people will use that OS only !

So why not to make linux/BSD/whatever OS the same thing ???

> support for both. They are not going to introduce a Linux only solution 

There are many people that uses Windows only and does not know what
Linux is. And there are few people (like my father) that only knows
Linux because thats the only OS I'm willing to support, so he does not
need Windows at all.

This are your audiences. The Windows only users, and of curse the
Linux only users. Your audience is not the dual users. Because they
will find it on their own.

> like this. So what exactly have you acheived by purposely making your 

So ?! I can have a super computer by making grids ... does it mean
that I really going to do it ? What about organisation that does not
allow to do such things. And I think that many emulators consider to
be illeagel ...

> any case, my six previous arguments are enough.

Well because it is actully gives you a competiting. Tell me if
Gnome/KDE is stop it's development when ever Microsoft finish their
desktop ui. KDE is by far, better then Windows ui, and have way to
many features that Windows users never thought that it is possible to
have. People still look at skinnable ui has the hottest thing out there...

> [Later Text including Raves about Pascal Snipped]

Funny, When people bashing Java on a conversation about Pascal it's
ok, but when there is a conversation about Pascal, it's a rave ...

---

From: Shlomi Fish <[email-masked]>
Date: Thu, 15 Dec 2005 12:39:34 +0200

Hi Ido!

I should note that your mailer breaks the quoted parts of the message, and 
puts some of the quoted parts in separate lines. Please use a different 
mailer for Hackers-IL.

Also of note is that you have many spelling and grammatical mistakes in your 
English. It makes them inredibly annoying for everyone to read. Please take 
care to check and double-check your messages.

See below for my response.

On Sunday 11 December 2005 19:13, ik_5 wrote:
> > It seems that your mailer (gmail ?) does not keep the "Re:" in the
>
> subject
>
> > line and also heavily mangles the quoted texts. Please fix it, or
>
> switch to a
>
> > > > But, the exception sort of prove the rules. If Pascal is so
>
> great, how
>
> > > > come that 15 years after I first used it, still none of the
>
> programs I
>
> > Many DOS programs were written in Turbo Pascal, and later on many
>
> Windows
>
> > programs have been written in Delphi. But we are talking here about
>
> Linux and
>
> > UNIX in general, not of programs of mostly historical interest or of
>
> programs
>

I didn't say that there were absolutely no programs written in Pascal for 
Linux or other UNIXes. It's just that for every program written in Pascal 
there are a hundred programs written in C and/or C++. (to say nothing of 
Perl, PHP, Python, etc.). And as I noted - I, and most other people, were not 
using any of them.

> ok, but when there is a conversation about Pascal, it's a rave ...

First of all, your original conversation about Pascal was labeled "How do you 
choose your programming language", so naturally it would divert into 
conversations about Java. (Plus, many discussions divert into other topics - 
it's natural).

Secondly, may I ask what is wrong with calling what you said "raves"? A rave 
is the opposite of rant:

Quoting from http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=rave :

c : to talk with extreme enthusiasm <raved about its beauty>

> > > > I actually agree with this :-) Stuff I write (say, Hspell) can
>
> be ported
>
> > > > to Windows if someone cares enough to, but I'll be damned if I
>
> do this
>
> > > > porting myself. I do not use Windows, I don't plan to ever
>
> switch to it,
>
> > > > and I am not going to spend a minute on porting my work to a
>
> system I'll
>
> > > > never use.
> > >

That was a non-sequitor. I'll still answer to it.
 
> not limiting the freedom on this subject as well ?!

I didn't try to shut you up. I just tried to inform you that I (and probably 
many other people) found this pro-Pascal propaganda annoying and useless. You 
are free to say these things, but I warned you that you are only going to 
make me (and probably many other people) annoyed.

And as part of my freedom I hold my right, not to *read* what you wrote or 
simply skip it, because I know in advance it will annoy me and will not 
contribute any useful insights.

> > 1. The very free software definition claims that the user should
>
> have "the
>
> > freedom to run the program, for any purpose". This includes running
>
> it on
>
> But if by doing so, this freedom is used aginst you. 

How so?

> For example 

So? The KHTML people could still benefit from what Apple contributed while it 
did so? And isn't Apple still using a derivative of KHTML in their products? 
(while respecting its GPL and LGPL licenses?).

> commercial use, that spit back to the community. 

What do you propose instead? Making KHTML non-free? I can think of similar 
risks for free software even if it only runs on Linux/BSDs.

> Tomarrow Apple can 

Patents are something else that is not related here. Tomorrow I can register a 
patent on the "Hello World" program and sue GNU for GNU hello. And how does 
restricting a software to run only on free operating systems will help you 
against software patents? You can issue a patent on that too.

>
> > 2. The issue is not Linux vs. Windows. (or any other proprietary
>
> operating
>
> > system) The issue is free software vs. proprietary software. Making
>
> a free
>
> > program available under Windows, is better than making the Windows
>
> users use
>

First of all let me say that I think you evaded the point here.

So? Many people see the same thing when using Linux, which all they know about 
is that it is a piece of costless software. When I first started seriously 
using UNIXes (FreeBSD, SunOS 4.1.3, and IRIX) at my work in a web-design 
shop, all I knew about GNU was that I could FTP into prep.ai.mit.edu and 
download lots of useful software which I compiled for source. I did not know 
about the four Stallmanian freedoms, or about the GPL, copyleft, etc. It was 
just gratis sourceware for me.

Many people who install Linux or who are made to use it by someone, are also 
not aware of this.

Windows users are still better off using free software instead of its 
proprietary alternatives, because that way they may become better aware of 
the free software ideology as well as be more willing to try Linux. And they 
can also contribute bug reports, bug fixes, etc. A free software developer 
should aim to have the largest number of "passive" (i.e: 
not-particularly-contributing) users, and porting the software to Windows 
help that a lot.

> > 3. How exactly are you going to prevent people from porting your
>
> software to
>
> > non-open-source OSes? Are you going to make them binary only? Are
>
> you going
>
> > to make their licensing restrict running them on non-free OSes?
>
> (which will
>
> > in turn make *that* software non-free). Are you going to use APIs
>
> that are
>
> > I believe you agree that the first two options are not in accordance
>
> with the
>
> > overcome by a couple of conditionals, and if abused, will cause your
>
> software
>
> > to be ruled out of integration with the portable mainstream
>
> programs. Plus,
>
> > 4. It is easier to tell someone to switch to Linux after a large
>
> amount of the
>
> > programs he's using are available there too. The best way we can
>
> ensure that
>
> > is by making sure FOSS programs are portable to Windows as well as
>
> Linux.
>

That's because Linux has many inherent advantages over Windows. In Linux you 
can expect the same programs to work faster, be more stable, be better, etc. 
You can also install them more easily, hack on them more easily and better, 
etc. Linux also has some stability, maintenance, feature-set, security and 
other advantages over Windows. I was told that at Microsoft conferences, 
people get psyched over new Windows features that Linux and other UNIXes has 
had for years. Linux is also free as in speech and thus, is constantly 
enhanced by the community, and also has a much better public image than 
Windows at the moment.

Porting software from UNIX to Windows is not going to make Linux less 
advantageous than Windows. But it does going to make FOSS more popular.

> > 5. There are many places where people work on both Windows and
>
> Linux, and need
>

You are evading. I said that if you want your software to be popular you have 
to make sure it runs on both Linux and Windows, or else people who have to 
use both, will probably not use it.

>
> > 6. It is possible to run Linux on top or side-by-side with Windows.
>
> This can
>
> > be achieved using Xen, VMWare, CoLinux, UserModeLinux (possibly in
>
> the future
>
> > when it will be ported to run on top of Win32), and many other cool
>
> hacks
>

You misunderstood me. What I said was that many (most?) people would be able 
to run Linux on top of Windows using these Emulators. Thus, they can enjoy 
the benefits of your Linux programs running on top of their Windows, whether 
you explicitly port it to Windows or not.

------------------------

Regards,

	Shlomi Fish