RE: [Haskell-cafe] Non-technical Haskell question

-------- Original Message -------- Subject: Re: [Haskell-cafe] Non-technical Haskell question From: "Keith Wansbrough"
Date: Mon, December 06, 2004 9:00 am To: "Georg Martius" Cc: "Jason Bailey" , "Jules Bean" , Haskell-Cafe@haskell.org When I compile it I get three files, an actual runnable binary (at only 5M in size), a .o file and a .hi file. I'm sure these additional files are usefull in someway and as soon as I come across the right piece of documentation everything should make sense. But as a person new to the language I'm just left wondering why.
gcc of course leaves .o files lying around, so this is no different than C.
javac often creates tens or hundreds of .class files, some with strange names like MyClass$1.class, MyClass$2.class, and so on (yes, I know what they are for), and doesn't even generate a native binary.
The original observation was that the compiler seems archaic. When asked, I gave some general comments. What I should have just said was that it was to much like a C compiler. Which, no matter how neat you think it is, is archaic. When I use javac every file that is created is necessary for the application to run. This can't be said of the ghc compiler. Having an excuse that this is way the C compiler does it or that this is the way its always been done is to poor of a reason to even argue against. If a file isn't needed then it shouldn't be left there.
I don't think the output of ghc is any more surprising than these; I'm surprised it bothers you.
Does this bother me? Not in particular, its just an indication that this is an old design.
The static vs dynamic linking question has been discussed many times. The summary is: GHC is a highly-optimising compiler, and the binary interface _necessarily_ changes with every minor revision (even patchlevel revision) of the compiler and each library. So you can't sensibly share libraries between apps. Anyway, disc is cheap.
I design and build business applications. I'm very good at this. Part of being very good at something like that is acknowledging that that there are some areas where I can't be as good.. such as compilers. The reason I say this is that if your telling me that no one here can figure out how to make it work then I will take your word for it. I'm certainly not in a position to argue :) The whole disc is cheap argument is a cop out. Certainly for a single application this is true. But your inherently limiting yourself. This means no one would consider haskell for embedded devices, or an OS, and it would even impact to a certain degree the decision to use it for a commericial product. You can see how this is reflected today in the fact that you can find almost no binary programs available for download. Programs and applications are out there but almost exclusivly as source code and yes a few of the website even mention that the binary size is the reason why they aren't making it available. (bandwith costs time and money) However this is just a view of a rank and file programmer who's new to haskell. Some of my concerns and issues are probably not valid just because I am not familiar with the language as a whole. However if there is a desire to make Haskell more accessible to the majority of programmers then the first impressions that I, and those like me have is important. Jason
HTH.
--KW 8-)

On Mon, 6 Dec 2004 azrael@demonlords.net wrote: (snip)
someone else wrote:
gcc of course leaves .o files lying around, so this is no different than C. (snip) When I use javac every file that is created is necessary for the application to run. This can't be said of the ghc compiler. Having an excuse that this is way the C compiler does it or that this is the way its always been done is to poor of a reason to even argue against. If a file isn't needed then it shouldn't be left there. (snip)
It can be useful to leave the .o files around. For instance, if you just change some source files, but not all, then you can reuse some of the old .o files instead of having to recompile everything. This gcc analogy also applies to ghc. -- Mark

azrael@demonlords.net (azrael@demonlords.net) wrote:
However if there is a desire to make Haskell more accessible to the majority of programmers then the first impressions that I, and those like me have is important.
Sure. I'm also pretty new to Haskell & ghc concerned to see Haskell used by more programmers. Applications like darcs are very important enabling newcomers to see some concrete & succesful non-academia-open-source project. Besides that, seeing the progress of projects working on the binding for gui-libraries (wxhaskell & gtk2hs) are VERY encouraging giving me hope that my investment in learning Haskell can be worthwile i.e. one is able to put together 'full-blown' application with gui interface. However, these projects are mostly done by few individuals working hard and there is also "A Bus Hits Simon Peyton Jones" problem referred during the CUFP workshop. Any idea how to make a (more organize) community effort to bring Haskell out? Sincerely, Gour -- Registered Linux User | #278493 GPG Public Key | 8C44EDCD

Well, looking at perl/python/PHP (as in LAMP), I would say the trick is to pick an application area and make it extreemely easy to use the language in that area, as well as trivial to install and maintain the language support. Of course the fact that perl/python/php all picked web-services (active web pages) just as the internet took off may have helped. So as is usual in computing - use your crystal ball to find out what the next big thing is, then make sure Haskell has a cool domain-specific-embedded language that is easy to use for that application domain ready, and then make sure everyone knows about it. Keean. Gour wrote:
azrael@demonlords.net (azrael@demonlords.net) wrote:
However if there is a desire to make Haskell more accessible to the majority of programmers then the first impressions that I, and those like me have is important.
Sure. I'm also pretty new to Haskell & ghc concerned to see Haskell used by more programmers.
Applications like darcs are very important enabling newcomers to see some concrete & succesful non-academia-open-source project.
Besides that, seeing the progress of projects working on the binding for gui-libraries (wxhaskell & gtk2hs) are VERY encouraging giving me hope that my investment in learning Haskell can be worthwile i.e. one is able to put together 'full-blown' application with gui interface.
However, these projects are mostly done by few individuals working hard and there is also "A Bus Hits Simon Peyton Jones" problem referred during the CUFP workshop.
Any idea how to make a (more organize) community effort to bring Haskell out?
Sincerely, Gour

On 2004-12-06, Gour
Applications like darcs are very important enabling newcomers to see some concrete & succesful non-academia-open-source project.
Besides that, seeing the progress of projects working on the binding for gui-libraries (wxhaskell & gtk2hs) are VERY encouraging giving me hope that my investment in learning Haskell can be worthwile i.e. one is able to put together 'full-blown' application with gui interface.
However, these projects are mostly done by few individuals working hard and there is also "A Bus Hits Simon Peyton Jones" problem referred during the CUFP workshop.
Any idea how to make a (more organize) community effort to bring Haskell out?
I'd rather it didn't until a few warts were fixed. OTOH, it may be too late already, barring a Haskell 2. -- Aaron Denney -><-

Aaron Denney wrote:
On 2004-12-06, Gour
wrote: Any idea how to make a (more organize) community effort to bring Haskell out?
I'd rather it didn't until a few warts were fixed. OTOH, it may be too late already, barring a Haskell 2.
Does Python not have warts? Or Pearl, or Java, or C#? I don't think that a few warts prevent a language from becoming a "success". But you may be right that it is too late... Haskell is getting old! Sometimes I think that for a language to "succeed" it must do so in its infancy. Perhaps the thing to do is create a new language with a new name, but base it entirely on Haskell's semantics, then equip it with just one really good library to solve well just one important niche problem, and see what happens. If it is seen as a shiny new silver bullet in just one niche area, it might take off like a rocket. -Paul Time flies like an arrow. Fruit flies like an apple.

On Tue, Dec 07, 2004 at 01:58:59PM -0500, Paul Hudak wrote:
Aaron Denney wrote:
I'd rather it didn't until a few warts were fixed. OTOH, it may be too late already, barring a Haskell 2.
Does Python not have warts? Or Pearl, or Java, or C#? I don't think that a few warts prevent a language from becoming a "success".
Of course not. My point was not how to get Haskell to take off, but that I'd rather one with fewer warts did than one with more. A misfeature in a popular language sticks around forever. I think Haskell is slowly accellerating, and will reach "widely known about" status fairly soon.
But you may be right that it is too late... Haskell is getting old! Sometimes I think that for a language to "succeed" it must do so in its infancy.
Perl didn't really take off until perl 4. Java had a huge marketing engine behind it. Python did take off relatively quickly, though.
Perhaps the thing to do is create a new language with a new name, but base it entirely on Haskell's semantics, then equip it with just one really good library to solve well just one important niche problem, and see what happens. If it is seen as a shiny new silver bullet in just one niche area, it might take off like a rocket.
And it lets the biggest warts be fixed. -- Aaron Denney -><-

On Tue, 7 Dec 2004, Paul Hudak wrote:
But you may be right that it is too late... Haskell is getting old! Sometimes I think that for a language to "succeed" it must do so in its infancy.
This is also my impression.
Perhaps the thing to do is create a new language with a new name, but base it entirely on Haskell's semantics, then equip it with just one really good library to solve well just one important niche problem, and see what happens.
It seems important to me that this library has very simple functionality but which is needed every day. Word processors, spreadsheets, web browsers, cd players, games and so on are much more popular than mathematical software. :-] On the other hand Niklaus Wirth had not the success of Pascal with later languages, like Modula and Oberon. So he decided to return to the name ComponentPascal for the newest developments ...

Paul Hudak (paul.hudak@yale.edu) wrote:
Does Python not have warts? Or Pearl, or Java, or C#? I don't think that a few warts prevent a language from becoming a "success".
I agree.
But you may be right that it is too late... Haskell is getting old! Sometimes I think that for a language to "succeed" it must do so in its infancy.
Let's take e.g. Ruby - it's also over 10-year and is just gaining wider acceptance.
Perhaps the thing to do is create a new language with a new name, but base it entirely on Haskell's semantics, then equip it with just one really good library to solve well just one important niche problem, and see what happens. If it is seen as a shiny new silver bullet in just one niche area, it might take off like a rocket.
However, RAA (Ruby Application Archive) counts 1291 project in 218 categories. Many programmers are switching from either Perl or Python (I had to unsubscribe from the mailing lists 'cause the traffic increased tremendously). What is so special in Ruby in comparison with e.g. Perl & Python? otoh, SF counts 91,889 projects (OK, many are dead) & 968,206 users. That is the whole army and I'm sure that filling the library-gaps, providing more documentation & printed books (what Pickaxe book did for the spreading of the Ruby, besides 20+ printed books in Japanese) covering (more) advanced features of the language (some kind of follow-up for your & Thompson's book) suited for the 'average-open-source-programmers' can bring lot of newcomers to the Haskell camp in order to solve general problems - "Haskell is a general purpose, purely functional programming language", isn't it? What other alternative one has in the lazy-functional camp? So, if there is already a wonderful one, why neglect the child? Let's help it to grow. Haskell is getting old, but it is still too young .. :-) Sincerely, Gour -- Registered Linux User | #278493 GPG Public Key | 8C44EDCD

Haskell is still a very dynamic language - there is still much room for it to grow and improve. In that sense, it is still young. Perl and Python and Ruby have hit middle age - no more growing, just more bulk accumulating around the middle. Matt On Wednesday, December 8, 2004, at 08:06 AM, Gour wrote:
Paul Hudak (paul.hudak@yale.edu) wrote:
Does Python not have warts? Or Pearl, or Java, or C#? I don't think that a few warts prevent a language from becoming a "success".
I agree.
But you may be right that it is too late... Haskell is getting old! Sometimes I think that for a language to "succeed" it must do so in its infancy.
Let's take e.g. Ruby - it's also over 10-year and is just gaining wider acceptance.
Perhaps the thing to do is create a new language with a new name, but base it entirely on Haskell's semantics, then equip it with just one really good library to solve well just one important niche problem, and see what happens. If it is seen as a shiny new silver bullet in just one niche area, it might take off like a rocket.
However, RAA (Ruby Application Archive) counts 1291 project in 218 categories.
Many programmers are switching from either Perl or Python (I had to unsubscribe from the mailing lists 'cause the traffic increased tremendously).
What is so special in Ruby in comparison with e.g. Perl & Python?
otoh, SF counts 91,889 projects (OK, many are dead) & 968,206 users. That is the whole army and I'm sure that filling the library-gaps, providing more documentation & printed books (what Pickaxe book did for the spreading of the Ruby, besides 20+ printed books in Japanese) covering (more) advanced features of the language (some kind of follow-up for your & Thompson's book) suited for the 'average-open-source-programmers' can bring lot of newcomers to the Haskell camp in order to solve general problems - "Haskell is a general purpose, purely functional programming language", isn't it?
What other alternative one has in the lazy-functional camp?
So, if there is already a wonderful one, why neglect the child? Let's help it to grow.
Haskell is getting old, but it is still too young .. :-)
Sincerely, Gour
-- Registered Linux User | #278493 GPG Public Key | 8C44EDCD
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

mattr wrote:
Haskell is still a very dynamic language - there is still much room for it to grow and improve. In that sense, it is still young.
Perl and Python and Ruby have hit middle age - no more growing, just more bulk accumulating around the middle.
Or in Perl's case, a seriously ambitious redesign: http://dev.perl.org/perl6 Note that among the features being added are lazy lists, generators and currying, to add to the stuff Perl 5 has which lets you do sort-of-functional programming. Haskell gets mentioned fairly often in some of the discussions, but that might be because I'm the one who keeps mentioning it :-)

On 2004-12-06, Gour
However, these projects are mostly done by few individuals working hard and there is also "A Bus Hits Simon Peyton Jones" problem referred during the CUFP workshop.
Any idea how to make a (more organize) community effort to bring Haskell out?
I think the two main things to do that would be: 1. Write Haskell code that has a wide appeal (example: darcs) 2. Fix Haskell weaknesses Haskell weaknesses are things I've mentioned here before, and refer generally to documentation and breadth of the standard library (or ease of finding/installing additional packages). The Cabal people are working on the library problem. I am too, by writing a bunch of code and also integrating a bunch of other code. (Once Cabal/Hackage is more mature, this integration could probably be split out.) Others have written a lot of good code; the HaXML, XML-RPC, Peter Simons' projects, Ian Lynagh's code, etc. all contain a lot of code with wide practical use. All of these projects would welcome more coders, I believe. Three of us also have a very rough start on a hands-on, practical introduction to Haskell aimed at the experienced imperative programmer. -- John

John Goerzen (jgoerzen@complete.org) wrote:
I think the two main things to do that would be:
1. Write Haskell code that has a wide appeal (example: darcs)
Agree. One individual wrote an application of the (very) general interest 'educating' programmers about Haskell's adequacy as a general programming language (there are now several people contributing to the project and some are even learning Haskell because of that :-)
2. Fix Haskell weaknesses
Haskell weaknesses are things I've mentioned here before, and refer generally to documentation and breadth of the standard library (or ease of finding/installing additional packages).
This one requires, imho, some organized effort to be really successful.
The Cabal people are working on the library problem. I am too, by writing a bunch of code and also integrating a bunch of other code.
I recently found out about your library and hope to be able to use it effectively when my skills become more developed.
Three of us also have a very rough start on a hands-on, practical introduction to Haskell aimed at the experienced imperative programmer.
This is *very* important - bringing new people from the imperative (I do not mean they should be 'converted' at any cost :-) camp by showing them how Haskell can be very elegant solution for solving general programming problems and than one does not require to hold a Ph.D. in a CS to be qualified to program in Haskell. There is plenty of theoretical work in the form of different papers, thesis etc. dealing with the plethora of Haskell-related subjects, but to 'bring Haskell to the masses', we need some more practicality. Hoping that Haskell community can recognize that more programmers can benefit them, so let's welcoem them. Sincerely, Gour -- Registered Linux User | #278493 GPG Public Key | 8C44EDCD

On Wed, 8 Dec 2004 19:27:56 +0100, Gour
Three of us also have a very rough start on a hands-on, practical introduction to Haskell aimed at the experienced imperative programmer.
This is *very* important - bringing new people from the imperative (I do not mean they should be 'converted' at any cost :-) camp by showing them how Haskell can be very elegant solution for solving general programming problems and than one does not require to hold a Ph.D. in a CS to be qualified to program in Haskell.
A year or so a go I started a tutorial series with the intent of doing just this. However I only got past a very rough first draft of the first tutorial that, quite frankly, was rubbish, and I didn't have time to finish it. There is still the "why should you care" article available at http://www.haskell.org/complex but the rest of my ambitious project was put on ice. Anyway, I'm currently working on an article for a Swedish print magazine on Haskell (similar to the one linked above, but less argumentative) that's due out at the end of January 2005. Hopefully that will contribute to spark the interest of a few imperative programmers to try Haskell out. I think that's a pretty good way to go about it. If you calmly list the benifits of Haskell, with a few tutorial-ish examples, and get that published in a print magazine (which the mainstream programmers read) I think that could convince quite a few people to give it a try. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862

On Thu, Dec 09, 2004 at 02:34:09AM +0100, Sebastian Sylvan wrote:
Anyway, I'm currently working on an article for a Swedish print magazine on Haskell (similar to the one linked above, but less argumentative) that's due out at the end of January 2005. Hopefully that will contribute to spark the interest of a few imperative programmers to try Haskell out. I think that's a pretty good way to go about it. If you calmly list the benifits of Haskell, with a few tutorial-ish examples, and get that published in a print magazine (which the mainstream programmers read) I think that could convince quite a few people to give it a try.
It does indeed help. The Dutch edition of c't published an article on Clean in the march edition of 2003, which seems to have lead to some new influx on the Clean mailinglists. Doei, Arthur. -- /\ / | arthurvl@cs.uu.nl | Work like you don't need the money /__\ / | A friend is someone with whom | Love like you have never been hurt / \/__ | you can dare to be yourself | Dance like there's nobody watching

azrael@demonlords.net wrote:
The original observation was that the compiler seems archaic. When asked, I gave some general comments. What I should have just said was that it was to much like a C compiler. Which, no matter how neat you think it is, is archaic. Archaic doesn't mean that it's bad. :)
When I use javac every file that is created is necessary for the application to run. This can't be said of the ghc compiler. Having an excuse that this is way the C compiler does it or that this is the way its always been done is to poor of a reason to even argue against. If a file isn't needed then it shouldn't be left there. But given the speed of compilation with ghc I'm very happy to have a compilation cache (the .o files) around.
One can argue that the whole concept of a compiler is archaic. What you are interested in is running your program. That it it happens in several steps (compile time, link time, run time) is just an implementation artefact. This holds for javac too. -- Lennart

azrael@demonlords.net wrote:
When I use javac every file that is created is necessary for the application to run. This can't be said of the ghc compiler. Having an excuse that this is way the C compiler does it or that this is the way its always been done is to poor of a reason to even argue against. If a file isn't needed then it shouldn't be left there. [...] Does this bother me? Not in particular, its just an indication that this is an old design.
As Mark Carroll said, the .o and .hi files are there to support separate compilation. GHC supports separate compilation because it's useful. Believe me, Haskell is the last language to do something just because everyone else does it. :-) The javac approach isn't better, just different. If the next version of GHC could produce portable bytecode files, that would be a good thing (except that it would make GHC even more complicated than it already is). If the next version of GHC could *only* produce portable bytecode files, that would be a bad thing, since it would lose functionality (while gaining other functionality). Your newer-is-better premise makes little sense. Haskell is a far "newer" language than Java; many aspects of Haskell's design are no older than Haskell, while nearly all aspects of Java's design have been around in other languages for decades. You might as well be arguing that Java is better because it's based on older, proven technology. Better yet, suppress the urge to compare Haskell and Java at all; after all, the more different they are, the more worthwhile it is to learn both! Once you're reasonably adept at programming in different languages, then you can start thinking about ways to combine the advantages of each. -- Ben

Ben Rudiak-Gould wrote <snip>
Your newer-is-better premise makes little sense. Haskell is a far "newer" language than Java; many aspects of Haskell's design are no older than Haskell, while nearly all aspects of Java's design have been around in other languages for decades. You might as well be arguing that Java is better because it's based on older, proven technology. Better yet, suppress the urge to compare Haskell and Java at all; after all, the more different they are, the more worthwhile it is to learn both! Once you're reasonably adept at programming in different languages, then you can start thinking about ways to combine the advantages of each.
-- Ben
Interestingly enough not once did I indicate that newer is better or that there was a problem with haskell language. All I said is that the compiler seemed archaic. I will say that it probably comes from my background. I'm sure that if I had started off with C/C++ and moved on to Haskell or that if I started with Haskell first then I would probably see things differently. Jason

azrael@demonlords.net wrote:
The original observation was that the compiler seems archaic. When asked, I gave some general comments. What I should have just said was that it was to much like a C compiler. Which, no matter how neat you think it is, is archaic.
Hmmm, using the number of files generated from a source program as a measure of the "coolness" of a programming language or its compiler is extremely strange. There's nothing I could care less about if the language itself fulfills my needs. Do you care about the strange intermediate files VisualStudio produces? The contents of you CVS or .svn subdirectories? I'm quite happy being able to ignore these things...
When I use javac every file that is created is necessary for the application to run. This can't be said of the ghc compiler. Having an excuse that this is way the C compiler does it or that this is the way its always been done is to poor of a reason to even argue against. If a file isn't needed then it shouldn't be left there.
Using Java class files as a "good" example is strange again: Java *does* inline code, namely primitive constants, without leaving any traces of that fact in the class file. That's part of the reason why every recompilation checker for Java can only do an approximate job without actually *doing* the compilation. GHC handles this much better. Cheers, S.

On Mon, 6 Dec 2004, Sven Panne wrote:
azrael@demonlords.net wrote:
The original observation was that the compiler seems archaic. When asked, I gave some general comments. What I should have just said was that it was to much like a C compiler. Which, no matter how neat you think it is, is archaic.
Hmmm, using the number of files generated from a source program as a measure of the "coolness" of a programming language or its compiler is extremely strange. There's nothing I could care less about if the language itself fulfills my needs. Do you care about the strange intermediate files VisualStudio produces? The contents of you CVS or .svn subdirectories? I'm quite happy being able to ignore these things...
What's unfortunate here is probably that the files are lying around in the same directory as the sources. E.g. the build system of Modula-3 uses a directory structure like this: Project LINUXLIBC6 - object files and other generated files for Linux SOLgnu - object files and other generated files for Solaris src - sources, Makefiles and other data This way not only generated files are out of scope in every day programming but it is also absolutely no pain to develop for several platforms simultaneously. The disadvantage is clearly that a programmer has to conform to this structure, but this could also be considered as advantage. But one could consider it as an disadvantage that is more complicated to work with many but small programs.

On Tue, Dec 07, 2004 at 11:30:11AM +0100, Henning Thielemann wrote:
What's unfortunate here is probably that the files are lying around in the same directory as the sources. E.g. the build system of Modula-3 uses a directory structure like this:
Project LINUXLIBC6 - object files and other generated files for Linux SOLgnu - object files and other generated files for Solaris src - sources, Makefiles and other data
This way not only generated files are out of scope in every day programming but it is also absolutely no pain to develop for several platforms simultaneously. The disadvantage is clearly that a programmer has to conform to this structure, but this could also be considered as advantage. But one could consider it as an disadvantage that is more complicated to work with many but small programs.
This is exactly what autoconf/automake gives you, it works for haskell (almost) just as well as it does for C code. In any case, this seems like the domain of a separate tool like hmake, ghc is just one of several haskell compilers, there is nothing about the language itself that requires the specific file droppings ghc leaves. (not that I mind them) John -- John Meacham - ⑆repetae.net⑆john⑈

When I compile it I get three files, an actual runnable binary (at only 5M in size), a .o file and a .hi file. I'm sure these additional files are usefull in someway and as soon as I come across the right piece of documentation everything should make sense. But as a person new to the language I'm just left wondering why. [..] javac often creates tens or hundreds of .class files, some with strange names like MyClass$1.class, MyClass$2.class, and so on (yes, I know what they are for), and doesn't even generate a native binary.
[..]
When I use javac every file that is created is necessary for the application to run. This can't be said of the ghc compiler. Having an excuse that this is way the C compiler does it or that this is the way its always been done is to poor of a reason to even argue against. If a file isn't needed then it shouldn't be left there.
This isn't really true for Java either. You surely don't intend to distribute your app as a bunch of .class files - you distribute the .jar file. The .class files are just intermediate files that javac leaves lying around; and javac isn't even capable of building the .jar itself! You have to use a separate utility. Just think of ghc as a combined javac and jar, the .o files as .class files, and the executable as a .jar. In fact, this is how ghci treats .o files - it loads them as needed, in a way not that different from the Java VM (except that of course .o files are native, not bytecode). Anyway, this has already descended into advocacy, and I'll stop here. --KW 8-)
participants (20)
-
Aaron Denney
-
Arthur van Leeuwen
-
azrael@demonlords.net
-
Ben Rudiak-Gould
-
Gour
-
Gour
-
Gour
-
Henning Thielemann
-
Jason Bailey
-
John Goerzen
-
John Meacham
-
Keean Schupke
-
Keith Wansbrough
-
Lennart Augustsson
-
Mark Carroll
-
Matthew Walton
-
mattr
-
Paul Hudak
-
Sebastian Sylvan
-
Sven Panne