Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-13 Thread Jacques Carette

[EMAIL PROTECTED] wrote:

But... tell me please, ANYONE, who takes part in this inspiring exchange:
How many COBOL programs have you written in your life?
How many programs in Cobol have you actually SEEN?


Shudder.  In '86, I had to modify a COBOL code generator, *written in 
COBOL*.  The generated program read some data from a database and 
printed out zillions of reports; the generated program took more than 24 
hours to run, so rarely ever completed successfully, as the machines 
they ran it on was not all that reliable.  So I had to modify the 
generator to generate 'check-pointing' code, so the reporting program 
could be restarted from the last checkpoint rather than from the start.  
Report generation  was something that COBOL was rather good at; code 
generation was an entirely different matter!  That first exposure to 
(untyped) code-generation probably explains why I'm such a big fan of 
metaocaml these days...


That year, I had way more fun figuring out how call-by-name worked in 
Algol 60, by starting at the generated thunks in the Burroughs 6800 
assembly.  Nice thing about that machine was that it was a pure stack 
machine - kind of like the JVM, as a matter of fact.  The other nice 
thing about that machine is that they had completely bootstrapped it, so 
that there was only an Algol compiler for it, no user-level assembler at 
all [but a disassembler for debugging].  It had been bootstrapped 
several years back, or so I was told.


Jacques
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


RE: [Haskell-cafe] Somewhat random history question

2007-11-12 Thread Simon Peyton-Jones
| It's interesting that the article completely fails to mention hbc
| which I know they used during the GHC bootstrap.  Oh well. :)
|
| On Nov 11, 2007 2:41 PM, Richard Kelsall [EMAIL PROTECTED] wrote:
|  Andrew Coppin wrote:
|   ...if GHC is written in Haskell, how the heck did they compile GHC in
|   the first place?

Lennart, I'm sure this is my fault, and I do apologise.  If we used hbc in the 
bootstrap, I'd completely forgotten; I thought we'd just used the LML compiler, 
which is indeed credited.  (Perhaps not everyone knows that you wrote the LML 
compiler too, with Thomas Johnsson, of course.   It completely changed the 
landscape of lazy-functional-language compilers.)  What I do remember is that 
we constantly compared ghc's performance to hbc's, and took ages to catch up!

I wish we'd corrected any errors of fact before the paper was published.  (It 
was on the Web for 6 months before publication to accumulate corrections, but 
errors and omissions remain our fault.)

Simon

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-12 Thread Tony Finch
On Sun, 11 Nov 2007, [EMAIL PROTECTED] wrote:

 To be a true COBOL replacement, I think that one very important feature
 is that it is link-compatible with existing COBOL code.  You're never
 going to be able to replace a 6MLOC COBOL monster in any manner other
 than piecemeal.

AFAIK people are replacing code by writing other applications that
manipulate the same data as the legacy code but do not link with it. I
should ask my wife more about the structure of Peoplesoft. I know it's a
mixture of COBOL, PL/SQL, and Peoplecode on the server, and Java on the
client... No Haskell in it, though.

Tony.
-- 
f.a.n.finch  [EMAIL PROTECTED]  http://dotat.at/
WEST FAIR ISLE FAEROES SOUTHEAST ICELAND: SOUTHERLY VEERING NORTHWESTERLY 5 TO
7, OCCASIONALLY GALE 8 IN FAEROES AND SOUTHEAST ICELAND. ROUGH OR VERY ROUGH.
RAIN OR SHOWERS. MODERATE OR GOOD.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question

2007-11-12 Thread Lennart Augustsson
No worries.
I read the History of Haskell paper twice, but not the final version, I guess.

As far as I remember you started the bootstrapping with the ghc built
on the LML compiler.  But as hbc became available it was soon more
reliable and produced better code, so you switched to that until the
new ghc could compile itself.  That's how I remember it.

There's also a bunch of Prelude related code in the ghc libraries that
originates with hbc.  I've been to lazy to send any bug reports
about this.
(Just to get a line of attribution.)

  -- Lennart


On Nov 12, 2007 9:33 AM, Simon Peyton-Jones [EMAIL PROTECTED] wrote:
 | It's interesting that the article completely fails to mention hbc
 | which I know they used during the GHC bootstrap.  Oh well. :)
 |
 | On Nov 11, 2007 2:41 PM, Richard Kelsall [EMAIL PROTECTED] wrote:
 |  Andrew Coppin wrote:
 |   ...if GHC is written in Haskell, how the heck did they compile GHC in
 |   the first place?

 Lennart, I'm sure this is my fault, and I do apologise.  If we used hbc in 
 the bootstrap, I'd completely forgotten; I thought we'd just used the LML 
 compiler, which is indeed credited.  (Perhaps not everyone knows that you 
 wrote the LML compiler too, with Thomas Johnsson, of course.   It completely 
 changed the landscape of lazy-functional-language compilers.)  What I do 
 remember is that we constantly compared ghc's performance to hbc's, and took 
 ages to catch up!

 I wish we'd corrected any errors of fact before the paper was published.  (It 
 was on the Web for 6 months before publication to accumulate corrections, but 
 errors and omissions remain our fault.)

 Simon


 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question

2007-11-11 Thread Felipe Lessa
See http://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29 .

But I can't say what was the particular method used by GHC.

Cya,

-- 
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Henning Thielemann

On Sun, 11 Nov 2007, Andrew Coppin wrote:

 Somebody just asked me

 ...if GHC is written in Haskell, how the heck did they compile GHC in
 the first place?

... and what happens, if they add a new feature, use it in the compiler
itself, and then it turns out, that the implementation of the new feature
was buggy?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question

2007-11-11 Thread ajb

G'day all.

Quoting Felipe Lessa [EMAIL PROTECTED]:


But I can't say what was the particular method used by GHC.


I don't either, but here's a suggested plan of attack:

1. Write a parser for a suitable subset of Haskell, in a closely
related language (e.g. Miranda).

2. Write a front-end that translates the subset of Haskell into Miranda.
(Because the languages are so close, this is straightforward, if the
subset is chosen well.)

(Note: You now effectively have a working implementation of a subset of
Haskell, since you can reuse Miranda's typechecker and run-time environment.
However, it's written in Miranda.)

3. Now start writing a simple Haskell compiler in the subset of Haskell
that you have, using the implementation to do the heavy lifting.  You
can use other external tools as part of the compilation process, too
(e.g. C compiler, Perl script, whatever).  Keep going until the simple
compiler can compile the implementation.

4. Test.  A lot.  When you're satisfoed, you have successfully
bootstrapped, and can ditch your reliance on Miranda.

5. Implement a larger subset of Haskell.  Test, rinse and repeat.

Cheers,
Andrew Bromage
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question

2007-11-11 Thread Bulat Ziganshin
Hello Andrew,

Sunday, November 11, 2007, 12:12:50 PM, you wrote:

 ...if GHC is written in Haskell, how the heck did they compile GHC in
 the first place?

by any other haskell compiler/interpreter

-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Neil Mitchell
Hi

  ...if GHC is written in Haskell, how the heck did they compile GHC in
  the first place?

GHC was not the first Haskell compiler, hbc was the main compiler at
some point, so I suspect they used hbc. There was also lazy ML which I
suspect was used to bootstrap hbc - but I'm not sure of the details.

 ... and what happens, if they add a new feature, use it in the compiler
 itself, and then it turns out, that the implementation of the new feature
 was buggy?

GHC can be compiled with GHC 5.0 (or something around there). If they
add a new feature, they don't use it in GHC for years and years.

Thanks

Neil
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Brent Yorgey

 GHC can be compiled with GHC 5.0 (or something around there). If they
 add a new feature, they don't use it in GHC for years and years.


*Can* be compiled with GHC 5.0, or *is* compiled?
http://haskell.org/ghc/docs/6.8.1/html/users_guide/release-6-8-1.html says
that the pointer tagging in 6.8.1 improves most code by 10-15%, and as a
result the compiler is also faster, implying that ghc-6.8.1 is used to
compile itself.  I'm just curious.

-Brent
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Neil Mitchell
Hi

  GHC can be compiled with GHC 5.0 (or something around there). If they
  add a new feature, they don't use it in GHC for years and years.
 

 *Can* be compiled with GHC 5.0, or *is* compiled?

Can. If a feature goes horribly wrong, or a build is entirely broken
in some subtle but fundamental way that isn't noticed for ages, then
could go back to GHC 5 and bootstrap off that. In reality, its
bootstrapped with itself in stages.

Thanks

Neil
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Duncan Coutts
On Sun, 2007-11-11 at 07:43 -0500, Brent Yorgey wrote:
 
 GHC can be compiled with GHC 5.0 (or something around there).
 If they add a new feature, they don't use it in GHC for years
 and years.
 
 *Can* be compiled with GHC 5.0, or *is* compiled?

Can.

The version it is compiled with it always itself because it does a two
stage bootstrap.

I think for 6.8.x the minimum bootstrap version is now 6.0 or 6.2.

Duncan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question

2007-11-11 Thread Richard Kelsall

Andrew Coppin wrote:
...if GHC is written in Haskell, how the heck did they compile GHC in 
the first place?


The paper A History of Haskell: Being Lazy With Class by Paul Hudak,
John Hughes, Simon Peyton Jones and Philip Wadler is a good read.

http://research.microsoft.com/~simonpj/papers/history-of-haskell/index.htm

A snippet

GHC was begun in January 1989 at the University of Glasgow, as soon
as the initial language design was fixed. The first version of GHC was
written in LML by Kevin Hammond, and was essentially a new front end to
the Chalmers LML compiler. This prototype started to work in June 1989,
just as Peyton Jones arrived in Glasgow to join the burgeoning
functional programming group there. The prototype compiler implemented
essentially all of Haskell 1.0 including views (later removed), type
classes, the deriving mechanism, the fullmodule system, and binary I/O
as well as both streams and continuations. It was reasonably robust
(with occasional spectacular failures), but the larger Haskell prelude
stressed the LML prelude mechanism quite badly, and the added complexity
of type classes meant the compiler was quite a lot bigger and slower
than the base LML compiler.
...
GHC proper was begun in the autumn of 1989, by a team consisting
initially of Cordelia Hall, Will Partain, and Peyton Jones. It was
designed from the ground up as a complete implementation of Haskell in
Haskell, bootstrapped via the prototype compiler. The only part that was
shared with the prototype was the parser, which at that stage was still
written in Yacc and C. The first beta release was on 1 April 1991 (the
date was no accident), but it was another 18 months before the first
full release (version 0.10) was made in December 1992.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Stefan O'Rear
On Sun, Nov 11, 2007 at 11:07:29AM +, Neil Mitchell wrote:
 Hi
 
   ...if GHC is written in Haskell, how the heck did they compile GHC in
   the first place?
 
 GHC was not the first Haskell compiler, hbc was the main compiler at
 some point, so I suspect they used hbc. There was also lazy ML which I
 suspect was used to bootstrap hbc - but I'm not sure of the details.

Hbc didn't need to be bootstrapped because it isn't written in Haskell -
it's written in Lazy ML.  Lazy ML would need to be bootstrapped, but
since it has (almost?) the same syntax as Standard ML, I suspect the
first versions of lml were written in SML.  (Can you clarify,
L. Augustsson?)

Stefan


signature.asc
Description: Digital signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Dan Piponi
This isn't a question specific to ghc. In general, the process of
bootstrapping compilers and porting them to new platforms can be
described by T-diagrams. When I did a web search on T-diagrams the
first hit I found,
http://proglang.informatik.uni-freiburg.de/teaching/compilerbau/2004/T-diagrams.pdf
seemed to summarise them well.
--
Dan

On Nov 11, 2007 1:20 AM, Henning Thielemann
[EMAIL PROTECTED] wrote:

 On Sun, 11 Nov 2007, Andrew Coppin wrote:

  Somebody just asked me
 
  ...if GHC is written in Haskell, how the heck did they compile GHC in
  the first place?

 ... and what happens, if they add a new feature, use it in the compiler
 itself, and then it turns out, that the implementation of the new feature
 was buggy?
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Andrew Coppin

Dan Piponi wrote:

This isn't a question specific to ghc.


Most certainly not. ;-) (Well, except that I asked where did GHC come 
from, which is pretty GHC-specific.)


However, it seems the general point of confusion is that writing (say) a 
minimally-working C compiler intuitively seems quite easy (after all, 
C is an extremely low-level language), whereas the constructs in Haskell 
bear no resemblence to any machine-level constructs, and it seems 
unthinkable that you could possibly write such a compiler in anything 
but Haskell itself.



In general, the process of
bootstrapping compilers and porting them to new platforms can be
described by T-diagrams. When I did a web search on T-diagrams the
first hit I found,
http://proglang.informatik.uni-freiburg.de/teaching/compilerbau/2004/T-diagrams.pdf
seemed to summarise them well.
  

Ooo... interesting.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Andrew Coppin

Neil Mitchell wrote:

Hi

  

bear no resemblence to any machine-level constructs, and it seems
unthinkable that you could possibly write such a compiler in anything
but Haskell itself.



Hugs is written in C.
  


Really? :-.

Well anyway, I didn't say it can't be done - I said it *looks* like it 
can't be done. ;-)


(Seriously, how big is Hugs? It must be quite large...)

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Neil Mitchell
Hi

  bear no resemblence to any machine-level constructs, and it seems
  unthinkable that you could possibly write such a compiler in anything
  but Haskell itself.
 
 
  Hugs is written in C.
 

 Really? :-.

Really :-)

 (Seriously, how big is Hugs? It must be quite large...)

56111 lines, with an additional 5917 for the WinHugs bit.

Thanks

Neil
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question

2007-11-11 Thread Lennart Augustsson
It's interesting that the article completely fails to mention hbc
which I know they used during the GHC bootstrap.  Oh well. :)

On Nov 11, 2007 2:41 PM, Richard Kelsall [EMAIL PROTECTED] wrote:
 Andrew Coppin wrote:
  ...if GHC is written in Haskell, how the heck did they compile GHC in
  the first place?

 The paper A History of Haskell: Being Lazy With Class by Paul Hudak,
 John Hughes, Simon Peyton Jones and Philip Wadler is a good read.

 http://research.microsoft.com/~simonpj/papers/history-of-haskell/index.htm

 A snippet

 GHC was begun in January 1989 at the University of Glasgow, as soon
 as the initial language design was fixed. The first version of GHC was
 written in LML by Kevin Hammond, and was essentially a new front end to
 the Chalmers LML compiler. This prototype started to work in June 1989,
 just as Peyton Jones arrived in Glasgow to join the burgeoning
 functional programming group there. The prototype compiler implemented
 essentially all of Haskell 1.0 including views (later removed), type
 classes, the deriving mechanism, the fullmodule system, and binary I/O
 as well as both streams and continuations. It was reasonably robust
 (with occasional spectacular failures), but the larger Haskell prelude
 stressed the LML prelude mechanism quite badly, and the added complexity
 of type classes meant the compiler was quite a lot bigger and slower
 than the base LML compiler.
 ...
 GHC proper was begun in the autumn of 1989, by a team consisting
 initially of Cordelia Hall, Will Partain, and Peyton Jones. It was
 designed from the ground up as a complete implementation of Haskell in
 Haskell, bootstrapped via the prototype compiler. The only part that was
 shared with the prototype was the parser, which at that stage was still
 written in Yacc and C. The first beta release was on 1 April 1991 (the
 date was no accident), but it was another 18 months before the first
 full release (version 0.10) was made in December 1992.

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Brandon S. Allbery KF8NH


On Nov 11, 2007, at 12:16 , Andrew Coppin wrote:

However, it seems the general point of confusion is that writing  
(say) a minimally-working C compiler intuitively seems quite easy  
(after all, C is an extremely low-level language), whereas the  
constructs in Haskell bear no resemblence to any machine-level  
constructs, and it seems unthinkable that you could possibly  
write such a compiler in anything but Haskell itself.


Er?  Languages evolve too; Haskell has several antecedents suitable  
to bootstrapping it, admittedly with varying levels of pain:  LML,  
Miranda, if you really wanted to you could do it in Scheme or SML  
(and even Prolog, but keep the Excedrin bottle handy).


And as already noted, Hugs is written in C.  Again, headache- 
inducing, but remember that any Turing-equivalent language can be  
used to implement any other if you're willing to do the work.   
Expressiveness certainly makes it easier, but nothing (other than  
sanity...) stops you from writing a Haskell compiler in, say, COBOL.


--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon universityKF8NH


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Brent Yorgey
 Expressiveness certainly makes it easier, but nothing (other than
 sanity...) stops you from writing a Haskell compiler in, say, COBOL.


*I* would stop you.  Friends don't let friends write in COBOL.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Felipe Lessa
On Nov 11, 2007 7:00 PM, Brent Yorgey [EMAIL PROTECTED] wrote:
  Expressiveness certainly makes it easier, but nothing (other than
  sanity...) stops you from writing a Haskell compiler in, say, COBOL.
 

 *I* would stop you.  Friends don't let friends write in COBOL.

+1 QOTW   =)

-- 
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Andrew Coppin

Brent Yorgey wrote:


Expressiveness certainly makes it easier, but nothing (other than
sanity...) stops you from writing a Haskell compiler in, say, COBOL.


*I* would stop you.  Friends don't let friends write in COBOL.


That's the funniest thing I've read today. You literally just woke my 
mum up by making my laugh. Thanks! :-D


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread jerzy . karczmarczuk
Andrew Coppin writes: 


Brent Yorgey wrote:


Expressiveness certainly makes it easier, but nothing (other than
sanity...) stops you from writing a Haskell compiler in, say, COBOL. 



*I* would stop you.  Friends don't let friends write in COBOL.


That's the funniest thing I've read today. You literally just woke my mum 
up by making my laugh. Thanks! :-D


I would be the last who wanted to spoil such a good joke.
But... tell me please, ANYONE, who takes part in this inspiring exchange: 


How many COBOL programs have you written in your life?
How many programs in Cobol have you actually SEEN? 

Jerzy Karczmarczuk 



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Brandon S. Allbery KF8NH


On Nov 11, 2007, at 17:26 , [EMAIL PROTECTED] wrote:


Andrew Coppin writes:

Brent Yorgey wrote:
Expressiveness certainly makes it easier, but nothing (other  
than
sanity...) stops you from writing a Haskell compiler in, say,  
COBOL. *I* would stop you.  Friends don't let friends write in  
COBOL.
That's the funniest thing I've read today. You literally just woke  
my mum up by making my laugh. Thanks! :-D


I would be the last who wanted to spoil such a good joke.
But... tell me please, ANYONE, who takes part in this inspiring  
exchange:

How many COBOL programs have you written in your life?
How many programs in Cobol have you actually SEEN?


I've maintained an accounting system and a material requirements  
planning system written in COBOL.  I've written various random things  
including a Newton's Method program (because I was taking an entry  
level computing-for-math course which bored me out of my skull ---  
wasn't allowed to place out of it, and already knew all of it, so I  
got my revenge by submitting assignments in random languages).


COBOL has its place.  Compiler design is *not* it.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon universityKF8NH


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Brent Yorgey
 I would be the last who wanted to spoil such a good joke.
 But... tell me please, ANYONE, who takes part in this inspiring exchange:

  How many COBOL programs have you written in your life?
  How many programs in Cobol have you actually SEEN?


My current project at work has a bunch of legacy COBOL code that is still
actively maintained.  Thankfully, it is not maintained by me, but I've
looked at a lot of it.

I'm glad to hear that you found my joke inspiring!

-Brent
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread ajb

G'day all.

Quoting [EMAIL PROTECTED]:


But... tell me please, ANYONE, who takes part in this inspiring
exchange: How many COBOL programs have you written in your life?


As you well know, only one COBOL program has ever been written.  The
rest are just modifications of it.

Actually, a more interesting problem is what you'd replace COBOL with,
and how you'd go about it.  Wouldn't it be nice if there was a modern
language that you could write or rewrite new parts of your COBOL
application in, and it all worked seamlessly with what you already had?

Cheers,
Andrew Bromage
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Henning Thielemann

On Sun, 11 Nov 2007 [EMAIL PROTECTED] wrote:

 G'day all.

 Quoting [EMAIL PROTECTED]:

  But... tell me please, ANYONE, who takes part in this inspiring
  exchange: How many COBOL programs have you written in your life?

 As you well know, only one COBOL program has ever been written.  The
 rest are just modifications of it.

 Actually, a more interesting problem is what you'd replace COBOL with,
 and how you'd go about it.  Wouldn't it be nice if there was a modern
 language that you could write or rewrite new parts of your COBOL
 application in, and it all worked seamlessly with what you already had?

Do you think of something like ABAP?
 http://en.wikipedia.org/wiki/ABAP
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Bernie Pope


On 12/11/2007, at 4:32 AM, Neil Mitchell wrote:


Hi


bear no resemblence to any machine-level constructs, and it seems
unthinkable that you could possibly write such a compiler in  
anything

but Haskell itself.



Hugs is written in C.



Really? :-.


Really :-)


(Seriously, how big is Hugs? It must be quite large...)


56111 lines, with an additional 5917 for the WinHugs bit.


If I remember correctly, the early versions of the Clean compiler  
were written in C. Then at some stage they re-wrote it in Clean.


Cheers,
Bernie.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Bernie Pope


On 12/11/2007, at 9:26 AM, [EMAIL PROTECTED] wrote:

But... tell me please, ANYONE, who takes part in this inspiring  
exchange:

How many COBOL programs have you written in your life?
How many programs in Cobol have you actually SEEN?


I saw a lot of COBOL when I worked for a stock broking company.

I was a lowly main frame printer operator, so I didn't have anything  
to do with the code except print it out.


Cheers,
Bernie.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread ajb

G'day all.

I asked:


Actually, a more interesting problem is what you'd replace COBOL with,
and how you'd go about it.  Wouldn't it be nice if there was a modern
language that you could write or rewrite new parts of your COBOL
application in, and it all worked seamlessly with what you already had?


Henning Thielemann replied:


Do you think of something like ABAP?
 http://en.wikipedia.org/wiki/ABAP


I'd like to respond with some combination of:

 * I never try to think of ABAP.
 * No, I said modern language.

But the fact is, I know nothing about ABAP apart from having heard of it
once.  Not that this has ever stopped us having strong opinions, right?

To be a true COBOL replacement, I think that one very important feature
is that it is link-compatible with existing COBOL code.  You're never
going to be able to replace a 6MLOC COBOL monster in any manner other
than piecemeal.

Cheers,
Andrew Bromage
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread jerzy . karczmarczuk

Henning Thielemann:

[EMAIL PROTECTED] wrote:
Quoting [EMAIL PROTECTED]: 

 ... tell me please: How many COBOL programs have you written in 
 your life? 


As you well know, only one COBOL program has ever been written.  The
rest are just modifications of it. 


Actually, a more interesting problem is what you'd replace COBOL with,
and how you'd go about it.  Wouldn't it be nice if there was a modern
language that you could write or rewrite new parts of your COBOL
application in, and it all worked seamlessly with what you already had?


Do you think of something like ABAP?


A nice mixture of Cobol, SQL, a Report Writer language...
Gents, we can continue for years, not knowing where we are going with this
discussion. 


I must say that I got a little nervous. Two days of speculation on what
this awful GHC has been bootstrapped from, as if the fellows who *did it*
couldn't be asked directly! They read this list, and laugh... 


Then a ha_ha_ha over the the corpse of Cobol. OK, perhaps not a corpse...
Plenty of people, and some companies, like Fujitsu, still predict a bright
future for this language. God bless them. 


Obviously, a primitive, hierarchic database approach to programming is
something very far from compilation issues. 


But, frankly, if you permit a serious remark: I think that there will be
a serious breakthrough in the Haskell popularity in the Great World, when
Haskell is applied to the construction of a fabulous, optimized ... 

... COBOL compiler. 

Or Fortran, or SQL, or Basic. Or whatever, all *BUT* Haskell. 

== 


I have an anecdote for you. Real one. (An anecdote is *not* a joke).
During my studies we had to make a small plastic box for some electronic
circuit (it was hundred years ago, don't forget...)
We bought some pieces of something related to polymethyl methacrylate (for
profans: plexiglas, acrylite, whatever). Awful stuff. Too brittle!
But, but, we found for it a fabulous usage! When dissolved in some solvent
manufactured from ether + acetone + some other tasty beverage, it
transformed into a viscous substance which was a *wonderful*, ideal glue,
for gluing these damn pieces together. 


So, the lesson we learnt was the following:
we got a substance whose main application was to make out of it a glue
to glue itself. 


Since the boss of the Lab would not appreciate the high level philosophical
issue related to our observation, we had to find some other usage of this
glue, so we glued his chair to the floor. After this hundred years they
still look for the culprit. 

Jerzy Karczmarczuk 



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Michael Vanier



Bernie Pope wrote:


On 12/11/2007, at 4:32 AM, Neil Mitchell wrote:


Hi


bear no resemblence to any machine-level constructs, and it seems
unthinkable that you could possibly write such a compiler in anything
but Haskell itself.



Hugs is written in C.



Really? :-.


Really :-)


(Seriously, how big is Hugs? It must be quite large...)


56111 lines, with an additional 5917 for the WinHugs bit.


If I remember correctly, the early versions of the Clean compiler were 
written in C. Then at some stage they re-wrote it in Clean.


Cheers,
Bernie.



You could say they cleaned it up.

Mike

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Michael Vanier

I have a copy of COBOL for Dummies which I bought as a joke and have never 
dared read.

Mike

[EMAIL PROTECTED] wrote:

Andrew Coppin writes:

Brent Yorgey wrote:


Expressiveness certainly makes it easier, but nothing (other than
sanity...) stops you from writing a Haskell compiler in, say, COBOL.

*I* would stop you.  Friends don't let friends write in COBOL.


That's the funniest thing I've read today. You literally just woke my 
mum up by making my laugh. Thanks! :-D


I would be the last who wanted to spoil such a good joke.
But... tell me please, ANYONE, who takes part in this inspiring exchange:
How many COBOL programs have you written in your life?
How many programs in Cobol have you actually SEEN?
Jerzy Karczmarczuk

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Bernie Pope


On 12/11/2007, at 4:08 PM, Michael Vanier wrote:


Bernie Pope wrote:


If I remember correctly, the early versions of the Clean compiler  
were written in C. Then at some stage they re-wrote it in Clean.


You could say they cleaned it up.


It was a dirty job, but now it is self cleaning.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe