12

Some years ago, I discovered an obscure programming language called Haskell. This language is mind-blowingly powerful; I can barely believe it even exists. But what's even more shocking is, it was apparently invented in 1990.

Not only that, but it's based on an even older language called Miranda, which apparently dates to 1985. And that in turn is based on something called ML, which goes all the way back to 1973.

Like most people, I spent most of the 1980s learning to use BASIC on an 8-bit home microcomputer. I spent many, many sleepless nights typing in code that would just barely make the machine do something interesting.

It boggles my mind that decades before that, a bunch of greybeards locked away in a secret buncker somewhere were designing these insanely powerful programming languages.

I have to ask... in 1973, what sort of hypothetical future computer would have actually been able to run something this powerful?

23
  • 22
    LISP was invented in 1958 …
    – Janka
    Feb 7, 2020 at 21:54
  • 2
    Refal is even older; its runtime engine is very small, and it was used on mainframes with as little as a few dozen Kb of RAM accessible to a user process. No magic there.
    – Leo B.
    Feb 8, 2020 at 0:24
  • 5
    And besides Lisp, we have APL in 1966, Smalltalk in 1972, Prolog in 1972, and they all ran on existing machines, not on future hypothetical computers.
    – dirkt
    Feb 8, 2020 at 7:34
  • 3
    Your premise of a world where 'BASIC is the only programming language' is flawed - BASIC was a relatively late arrival (1964) and was intentionally simplified for (as the name says) Beginners. People designing new languages in academia did not have viewpoints constrained by BASIC. Feb 9, 2020 at 16:40
  • 4
    Since when is Haskell considered "obscure"? Its probably considered the most typical functional programming language and is used widely when discussing functional programming. It had tremendous influence on later programming languages and still is a great language. Basically everyone who has at least some formal programming education will at some point learn about it.
    – Polygnome
    Feb 9, 2020 at 20:14

3 Answers 3

24

8-bit home micros were not powerful computers when they first appeared. They were inexpensive enough that individuals could buy them, and almost everything else took second place to price.

In 1973, there were early versions of UNIX running on DEC PDP-11 machines, and a wide variety of 24-bit to 36-bit machines with proprietary operating systems. None of them had GUIs, which soak up a lot of the power of modern computers. They could definitely run an ML implementation; you might not be able to handle such big problems as on a modern machine, and it would certainly be slower, but it would work. The difference was the price: something in the region of $50,000, rather than $500 or less for a home computer in the next decade.

As an example, the original ML implementation was written in LISP on a DEC PDP-10, a 36-bit machine often used for multi-user systems, such as universities. This was a big machine, costing $500,000 or more for a complete installation, but widely capable by the standards of the time.

8
  • 5
  • 7
    People have a mistaken impression that "non-micro" computers were big and slow compared to microcomputers. Big, yes, but slow, not so much. It wasn't until Intel's 80486 that microcomputers started offering performance even remotely competitive with that of "real" computers. What made microcomputers revolutionary was their size and price. For mathematical computations, even the 1960s computers that went to the Moon were faster than commonplace desktop machine a decade later (though its RAM capacity was a limited to minimize weight).
    – supercat
    Feb 7, 2020 at 23:29
  • 2
    @supercat I'm dubious about your statement "Big, yes, but slow, not so much. It wasn't until Intel's 80486 that microcomputers started offering performance even remotely competitive with that of "real" computers." Micro CPUs starting with the 8088/8087 were very fast compared to mini- and mainframe computers on computationally expensive operations. It was (and still is, for mainframes) IO operations which ate micros for lunch. For example, an IBM 4341 with 6MB RAM and 1.5 MIPS could easily support 70 simultaneous interactive database users.
    – RonJohn
    Feb 8, 2020 at 7:21
  • 1
    @RonJohn, I don't know. I was employed by a university computer science department when the original IBM-PC hit the market, and I don't remember anybody rushing to buy them for scientific or engineering number crunching. But maybe that too was because of I/O: As fashion accessories, 9-track tapes made you look like way more of a serious player than 5 1/4 inch floppies ever could do. Feb 8, 2020 at 21:11
  • 1
    It's very hard to compare performance of a generic machine to one that is built to a strict application requirement, the Apollo computers were precisely as powerful as they needed to be.
    – crasic
    Feb 9, 2020 at 15:27
11

I believe those languages were generally developed at universities, which at the time (the mid 1970's to early 90's) typically started the era using home-build systems, eventually moving into minicomputers running VMS or Unix in their CS departments. These systems were typically used because they were relatively cheap. CS departments needed computers, but didn't have mainframe money (unlike these same schools' alumni outreach departments, which brought in money and thus got nice expensive usually-IBM mainframes. But I digress..)

For example, the ultimate grandparent of Haskell was David Turner's research at the University of Kent at Canterbury. His functional language interpreters originally ran on homebrew computers at the department, but were ported to Unix from where they became research languages used by students. It was first monetized as Miranda on Unix systems.

The first actual Haskell (1.0) compiler was written by Lennart Augustsson of Chalmers University, on top of his existing LML (Lazy ML) compiler, which appears to have run on Unix. The next two were Yale Haskell, and Gopher, both university-ish projects. Yale Haskell was written in CMU Common Lisp (so Unix). Gopher was a student's fun side project, and actually ran on a 386 PC off a single floppy disk (one assumes under DOS).

If you're interested, Paul Hudak, John Hughes, Simon Peyton Jones, and Philip Wadler have written a great paper on the history of Haskell.

5

Well, those languages were running on real computers. Except that they weren't microcomputers but supercomputers (see the works of Seymour Cray).

Those computers were extremely expensive and had much more memory than the 1980s microcomputers. An individual just couldn't afford it. It was shared between students/researchers. Also had more evolved storage devices, not just standard audio cassettes.

All that allowed to develop and use compiled languages. Note that compiled languages are possible on microcomputers (there are Z80 & 6502 C compilers for instance, even if they are cross-compilers, not native) but the code takes a lot of memory. On a microcomputer, programs are generally BASIC + assembly for memory reasons (assembly being used for speed in game main loops, BASIC being used for menus, score, management, where operations were'nt time-critical).

BASIC is not as advanced as the languages you're mentionning, but it's also extremely cheap memory-wise, with tokens only taking 1 byte of memory, and interpreted by the ROM. It also provided easy access to computer hardware (input, graphics, sound), and all usually fitted in 48+16 Kb RAM. It's really not the same scale as for specialized supercomputers, even if those were older (the cray 1 clock was 80MHz, most home computers clock were a few MHz in comparison)

I was mentionning 6502 and z80 compilers, but those are relatively recent, and only runned from a more powerful machine. A native C compiler (or other language) for a 8-bit home machine (single processor, 64k RAM) is extremely unlikely and would be slow & impractical. Even assemblers weren't so common at that time (BBC micro had one, though). People used to enter hex opcode in DATA sections instead...

The first 8-bit microcomputers were just a cut-down, home version of its ancestors, affordable to everyone. Only when the 16/32 bit computers appeared that it became possible to use more evolved languages.

1
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Chenmunka
    Feb 10, 2020 at 9:22

Not the answer you're looking for? Browse other questions tagged .