Live data from Hacker News

Real Programmers Don't Use Pascal (1982)

web.mit.edu

81–90 of 94 posts

Re: Real Programmers Don't Use Pascal (1982)

#81
post #54

Earlier quoted context omitted.

I think this is a reference to an old joke about "God is Real, unless declared as Integer" since in Pascal Real and Integer are data types.

The joke is actually about FORTRAN, where variables don't have to be declared, and is implicitly declared as Integer if it's first letter is in the range I-N and otherwise implicitly declared as the type Real (usually 32-bit floating point). Thus the variable GOD will implicitly be of type real. Pascal have the same type names, but does not allow implicit declarations.

Oh, interesting. I suspected it might be from an older language, but i expected Algol, not FORTRAN :-P.

Personally i associate it with Pascal because i first saw it on an IRC channel's topic back in the mid-90s :-).

Re: Real Programmers Don't Use Pascal (1982)

#82

Perhaps how much of MATLAB is influenced by Pascal,etc, but it is particularly clumsy and inelegant, as if it stuck in the 80's, not to mention proprietary, I wait for the day when we can move out of it.

Have you checked out Octave? They target (bug-for-bug?) compatibility with MATLAB, so most pure MATLAB code will port over with no edits necessary. It's also a GNU project

Re: Real Programmers Don't Use Pascal (1982)

#83

"Real programmers aren't afraid of GOTO"

GOTO is still a legit way to cleanly break out of nested loops. I cringe whenever I hear normie programmers lament on how blanketly bad it is.

> break out of nested loops

-deeply- nested loops at that.

I once was on a thread in a forum discussing state machines, and somewhere in the convo the use of GOTO popped up. I wasn't for it, but somebody made mention of how it could be used to implement a state machine very compactly.

Then he showed his code - it was done in PBASIC. I saved a copy of that code, because it was very, very elegant. While I knew there were certain very niche cases for GOTO, I never thought that a state machine would qualify. For me, it does now.

I don't have the code handy, but it reminded me of Duff's device, if you know what that is - just done in BASIC - and not as a SWITCH-CASE of course...

Re: Real Programmers Don't Use Pascal (1982)

#84

Real programmers don't actually use any language, as their time is best spent in forums and chat rooms arguing with non-real (integer?) programmers why they aren't real programmers.

Actually, integers are a subset of the real numbers. I think you mean complex numbers with a non-zero imaginary component.

In Pascal Real’s aren’t necessarily a superset of Integer’s (both can be four bytes, with, for example, 2^30+1 representable as an Integer, but not as a Real)

Re: Real Programmers Don't Use Pascal (1982)

#85
post #67

Donald Knuth wrote TeX in Pascal. I think he chose it because it was the language most widely available at the time in universities where people wanted to use TeX; many were already using Pascal for teaching. (The first version had been written in SAIL, because it was the language available at the Stanford AI Lab where he had computer access.) Because Pascal did not have good support for strings and variable-length a…

Very interesting to hear Knuth augmented Pascal significantly to suit himself. Can I ask where you found that? I'd love to read more.

Re: Real Programmers Don't Use Pascal (1982)

#86
post #81

Earlier quoted context omitted.

The joke is actually about FORTRAN, where variables don't have to be declared, and is implicitly declared as Integer if it's first letter is in the range I-N and otherwise implicitly declared as the type Real (usually 32-bit floating point). Thus the variable GOD will implicitly be of type real. Pascal have the same type names, but does not allow implicit declarations.

Oh, interesting. I suspected it might be from an older language, but i expected Algol, not FORTRAN :-P. Personally i associate it with Pascal because i first saw it on an IRC channel's topic back in the mid-90s :-).

If it's a stupid programming joke, you can probably blame it on FORTRAN. COBOL programmers don't have senses of humor.

Re: Real Programmers Don't Use Pascal (1982)

#88

> Real Programmers use FORTRAN. Ahem. No. Real Programmers use machine code. http://www.catb.org/jargon/html/story-of-mel.html

> Real Programmers wrote in machine code. Not FORTRAN. Not RATFOR. Not, even, assembly language. Machine Code. Raw, unadorned, inscrutable hexadecimal numbers. Directly. Reading that brings back one of the best memories of my childhood.

The first Real Programmers used decimal, and programmed on the plugboards and portable function tables of the ENIAC. See https://en.wikipedia.org/wiki/ENIAC .

The next Real Programmers programmed in octal, and sometime made mistakes balancing their checkbook by doing octal instead of decimal mathematics. See https://www.agnesscott.edu/lriddle/women/hopper.htm .

You'll notice that Hopper and the ENIAC programmers are women. Programming at this time was seen as a woman's job.

Then it became seen as a career for men. The early women programmers were overlooked; the ENIAC programmers weren't named in the early photos, and believed to be models - 'Refrigerator Ladies'. See http://mentalfloss.com/article/53160/meet-refrigerator-ladie... .

As computers became more powerful, hex became the de facto. Much of the 'heroic literature of the olden days' comes from this era, so we view history through a decidedly - to quote the link text - "macho" lens.

While it's certainly an enjoyable story, if we repeat it without the context, we continue to obscure the work of the first Real Programmers, and we propagate the false implication that "Real Programming" is intertwined with concepts of masculinity.

Re: Real Programmers Don't Use Pascal (1982)

#89
post #63
post #35

Earlier quoted context omitted.

Real programmers set up their own bouncer relays

Oh please, actual Real Programmers, just picked up the phone and whistled at 9.6kb/s.

Most old POTS phone switches still had the older pulse interface, so you dialed by hitting the hangup button really fast. The new fancy frequency encoding from 300-3300Hz was faster but not proper hacking anymore, you needed extra HW for this. Doable, but generating pulses was much easier.

Re: Real Programmers Don't Use Pascal (1982)

#90
post #85
post #67

Donald Knuth wrote TeX in Pascal. I think he chose it because it was the language most widely available at the time in universities where people wanted to use TeX; many were already using Pascal for teaching. (The first version had been written in SAIL, because it was the language available at the Stanford AI Lab where he had computer access.) Because Pascal did not have good support for strings and variable-length a…

Very interesting to hear Knuth augmented Pascal significantly to suit himself. Can I ask where you found that? I'd love to read more.

Sure! The entire source code of TeX has been published as a book called TeX: The Program, which is Volume B of Knuth's Computers and Typesetting series (the TeX and METAFONT manuals and source code, and the definitions of the Computer Modern fonts): https://cs.stanford.edu/~knuth/abcde.html#abcde The major part of the book (just the program itself, without the book's 1-page preface, 2-page bibliography, 6-page instructions on how to read the program, mini-indices on each two-page spread, 1-page diagram of approximate memory requirements, and hand-tweaked typesetting) are also available in any TeX distribution or online e.g. http://texdoc.net/texmf-dist/doc/generic/knuth/tex/tex.pdf

It is written using a system called WEB, and Knuth calls the idea literate programming — see article at http://www.literateprogramming.com/knuthweb.pdf and the WEB manual at http://texdoc.net/texmf-dist/doc/generic/knuth/web/webman.pd...

All this is somewhat hard to read for most modern programmers IMO. In my free time I hope to make these more readable, and I've started with simply reading and annotating the simplest of the programs written in WEB: https://shreevatsa.github.io/tex/program/pooltype/ https://shreevatsa.github.io/tex/program/tangle/ — if anyone reading this is interested let me know (create an issue on the GitHub repo or something).

Post reply on HN