Page 1 of 1

The origin of the Hugo programming language

Posted: Wed Sep 12, 2012 9:51 pm
by Ice Cream Jonsey
A lot of people don't know this, but Kent didn't actually make the language. He is a crack developer and he can compile the source, but here is what really happened.

Back in 1995, Roody and I had gone to Las Vegas. We were trying to find the pinball hall of fame, but we got lost. (This was before the pinball hall of fame was moved to be closer to the strip.)

We actually just fuckin' found the language. It was behind one of those discount Vegas diners. Grumplebox or something, can't remember. It was on four floppy disks and came with "sample.hug". sample.hug looked nothing like it does now -- it was mostly just a bunch of misspelled nouns and arrays that set everything to "0" or "butt".

So there you go. We got it to Kent and he sort of adopted it, but the real truth of the matter is, we just found it.

Posted: Wed Sep 12, 2012 10:11 pm
by Roody_Yogurt
1995 was a good time.

Posted: Thu Sep 13, 2012 9:19 am
by pinback
Don't piss down my back and tell me it's raining.

Posted: Thu Sep 13, 2012 4:45 pm
by Bainespal
I think this explains some things.

Re: The origin of the Hugo programming language

Posted: Thu Sep 13, 2012 5:55 pm
by Tdarcos
Ice Cream Jonsey wrote:A lot of people don't know this, but Kent didn't actually make the language. He is a crack developer and he can compile the source, but here is what really happened.
I include Pinback's comment to this message by reference as if set forth fully herein.

Clearly it borrows a great deal from the C language, with some very interesting changes that, if they had been put into C would have made it a much better language than it is.
  • * Like the use of the = sign in comparisons exclusively as a comparator. Some people like the idea that = is always used as an assignment operator, but I think there is no good reason to do an assignment in an if statement. Every other language that uses = in comparisons and = in assignment knows enough to tell the difference and people have no problem knowing the difference.
  • * Camel Case does not make an identifer case sensitive. This, more than anything else, was the brain-dead moronic stupidest idea in what otherwise might have been not just a good language, but a great one. There was no good reason to have C make identifiers case sensitive and a lot of good reasons not to.
  • * The use of ++ and -- as either a preincrement/predecrement or postincrement/postdecrement operator was an absolutely brilliant idea, since a lot of people have to do this, and in some cases, allowing the operator after using the current value of the variable saves adding another statement, so that instead of saying

    Code: Select all

    K = K+I
    I=I+1
    
    You can go further

    Code: Select all

     K = K + I++
  • * Which brings up another thing (which might not be in Hugo), the = operators to allow a variable to be arithmetically modified through the operator, so in the above case we can have

    Code: Select all

    K = K+I
    I=I+1
    
    You can reduce it further with

    Code: Select all

    K += I++
    
  • * And, of course, both borrow from ALGOL 60 for the loop variable construct. FORTRAN-based langauges including PL/1 use the word "DO" for this construct, but ALGOL 60-based languages including Basic, C, Hugo, Pascal and others, use "FOR". (Then you get Cobol that uses "PERFORM UNTIL":) .)

Re: The origin of the Hugo programming language

Posted: Thu Sep 13, 2012 6:11 pm
by Ice Cream Jonsey
Tdarcos wrote:Like the use of the = sign in comparisons exclusively as a comparator. Some people like the idea that = is always used as an assignment operator, but I think there is no good reason to do an assignment in an if statement. Every other language that uses = in comparisons and = in assignment knows enough to tell the difference and people have no problem knowing the difference
Ben and I disagreed on that point! We totally disagreed. Clearly, Ben is a hapless lunatic living in a world he never made.

I think it's pretty good for a language found on the goddamn street.

Re: The origin of the Hugo programming language

Posted: Fri Sep 14, 2012 3:29 am
by Tdarcos
Ice Cream Jonsey wrote:
Tdarcos wrote:Like the use of the = sign in comparisons exclusively as a comparator. Some people like the idea that = is always used as an assignment operator, but I think there is no good reason to do an assignment in an if statement. Every other language that uses = in comparisons and = in assignment knows enough to tell the difference and people have no problem knowing the difference
Ben and I disagreed on that point! We totally disagreed. Clearly, Ben is a hapless lunatic living in a world he never made.

I think it's pretty good for a language found on the goddamn street.
I mean, seriously, even in Basic, even a 10-year-old writing a simple program knows the difference between

Code: Select all

100  A=5
110  IF A=5 THEN
And realizes that = in the second statement means a comparison, not an assignment.

Pascal, on the other hand, does something a bit elegant to solve the problem, = is always a comparator, they use becomes, := for assignment. Wirth simply chose a different symbol the way Kernigan and Richie chose = to always mean assignment and == for comparison. I think wirth's solution to the problem, if you needed to be able to distinguish between = as assignment and = as comparison and don't want to have the compiler figure it out, is a better choice, but it's a matter of taste how you do it. It would have been far better if C had done it backward, always use = for comparison and == for assignment if they couldn't figure out how to separate the difference (a function Basic interpreters and compilers did back in 1966.)

I think Wirth would have had a better argument on using a dual symbol for assignment, Pascal was designed as a single-pass language and the compiler was able to scan the program once. So the compiler had to be simpler and thus maybe the tradeoff had to be made. I don't think C compilers were ever one pass.

But it still an important point that 4 years before C existed, the ability to distinguish between = as comparison and = as assignment had been solved in Basic.

Posted: Fri Sep 14, 2012 4:35 am
by RealNC
"=" must not be overloaded to mean two different things. It's very easy to do what BASIC did, but it's a bad idea to do it. In C, every expression has a value, and so this must work without the compiler hijacking you:

if (x = malloc(n * sizeof *x))

If "=" would mean something different inside an if statement, the above code wouldn't work anymore.

Posted: Fri Sep 14, 2012 7:27 am
by pinback
What RealNC said. If you want your language more like BASIC, it says more about where you are as a programmer.

Posted: Fri Sep 14, 2012 8:36 am
by Flack
The bigger question here is, what was Robb doing on his hands and knees handling someone else's floppy disk in a Las Vegas alley out behind a restaurant named "Grumplebox," which literally means "unhappy vagina"?

Posted: Fri Sep 14, 2012 9:10 am
by RealNC
Looking for quarters?

Posted: Fri Sep 14, 2012 10:43 am
by Ice Cream Jonsey
I was looking, yes, for quarters.

holy shit... LOL

Posted: Sat Feb 06, 2016 7:22 am
by misterman83
Looking for quarters behind an angry vagina in Vagus? Sorry, Rob, there's no escaping that one.
On a much more vagina-less note, I highly doubt that Hugo was found "on the goddamned street". Even if it was, I'm pretty sure Kent had the skill to turn it into a powerful, flexible IF programming language. If you and Kent didn't find it, I'm pretty sure that it would've turned out more like AGT or ALAN 2.0. (On a side note, I'm going to send an email to Thomas Nilson; I'm going to ask if he found ALAN in an abandoned strip club in Vagus. That makes more sence than "I fucking loved cobol, and I was bored as hell; so I made ALAN".) LOL :D

Posted: Sat Feb 06, 2016 11:43 am
by Ice Cream Jonsey
I feel a lot of people are having multiple problems with the story of the origin of Hugo.

Re: The origin of the Hugo programming language

Posted: Sun Feb 07, 2016 12:18 pm
by pinback
Tdarcos wrote:The use of ++ and -- as either a preincrement/predecrement or postincrement/postdecrement operator was an absolutely brilliant idea
This has been in C since day one. What are--- what were you talking about?

Re: The origin of the Hugo programming language

Posted: Mon Feb 08, 2016 3:31 pm
by Tdarcos
pinback wrote:
Tdarcos wrote:The use of ++ and -- as either a preincrement/predecrement or postincrement/postdecrement operator was an absolutely brilliant idea
This has been in C since day one. What are--- what were you talking about?
Yeah, it was in C from when the language was first defined in K&R around 1969 or '70, it's one of the things C did really right.

The original target for the C compiler was the PDP-11, so ++ and -- can be implemented as a single machine in all four options, pre-, post-, increment, decrement. Since the 11 is a stack machine you can push and pop calculation results via registers or memory fairly efficiently.

Posted: Mon Feb 08, 2016 6:29 pm
by RealNC
It's a glorified assembly dialect if you ask me. Real Men use languages where changing a value translates into 2MB of machine instructions.

Posted: Tue Feb 09, 2016 11:40 am
by Tdarcos
RealNC wrote:It's a glorified assembly dialect if you ask me. Real Men use languages where changing a value translates into 2MB of machine instructions.
Of course it is. C is basically a very high level assembly language. That is the reason it has become so popular because it provides what is the equivalent of a non-machine-specific assembler.

But there's nothing new here. I've known that C was essentially assembler disguised as a third generation programming language for, oh, about thirty years. That it did so with more success is probably due to it having better public relations than some other attempts to do this, like BLISS, or PL/I.