The origin of the Hugo programming language

Hugo programming discussion. http://www.generalcoffee.com/hugo
Hugo By Example: http://hugo.gerynarsabode.org/index.php?title=Main_Page
Roody Yogurt's Hugo Blog: http://notdeadhugo.blogspot.com

Moderators: Ice Cream Jonsey, AArdvark

User avatar
Ice Cream Jonsey
Posts: 21944
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

The origin of the Hugo programming language

Post by Ice Cream Jonsey » Wed Sep 12, 2012 9:51 pm

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.
the dark and gritty...Ice Cream Jonsey!

Roody_Yogurt
Posts: 2005
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Post by Roody_Yogurt » Wed Sep 12, 2012 10:11 pm

1995 was a good time.

User avatar
pinback
Posts: 13402
Joined: Sat Apr 27, 2002 3:00 pm
Contact:

Post by pinback » Thu Sep 13, 2012 9:19 am

Don't piss down my back and tell me it's raining.
Above all else... We shall go on... And continue!

Bainespal
Posts: 151
Joined: Fri Jul 09, 2010 8:59 am

Post by Bainespal » Thu Sep 13, 2012 4:45 pm

I think this explains some things.

User avatar
Tdarcos
Posts: 5602
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Re: The origin of the Hugo programming language

Post by Tdarcos » Thu Sep 13, 2012 5:55 pm

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":) .)
"We don't try, to understand, the New York Times affect on man."
- The Bee Gees, Night Fever

User avatar
Ice Cream Jonsey
Posts: 21944
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Re: The origin of the Hugo programming language

Post by Ice Cream Jonsey » Thu Sep 13, 2012 6:11 pm

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.
the dark and gritty...Ice Cream Jonsey!

User avatar
Tdarcos
Posts: 5602
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Re: The origin of the Hugo programming language

Post by Tdarcos » Fri Sep 14, 2012 3:29 am

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.
"We don't try, to understand, the New York Times affect on man."
- The Bee Gees, Night Fever

User avatar
RealNC
Posts: 1462
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC » Fri Sep 14, 2012 4:35 am

"=" 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.

User avatar
pinback
Posts: 13402
Joined: Sat Apr 27, 2002 3:00 pm
Contact:

Post by pinback » Fri Sep 14, 2012 7:27 am

What RealNC said. If you want your language more like BASIC, it says more about where you are as a programmer.
Above all else... We shall go on... And continue!

User avatar
Flack
Posts: 6161
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Post by Flack » Fri Sep 14, 2012 8:36 am

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"?
"Jack Flack always escapes." -Davey Osborne

User avatar
RealNC
Posts: 1462
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC » Fri Sep 14, 2012 9:10 am

Looking for quarters?

User avatar
Ice Cream Jonsey
Posts: 21944
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey » Fri Sep 14, 2012 10:43 am

I was looking, yes, for quarters.
the dark and gritty...Ice Cream Jonsey!

misterman83

holy shit... LOL

Post by misterman83 » Sat Feb 06, 2016 7:22 am

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

User avatar
Ice Cream Jonsey
Posts: 21944
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey » Sat Feb 06, 2016 11:43 am

I feel a lot of people are having multiple problems with the story of the origin of Hugo.
the dark and gritty...Ice Cream Jonsey!

User avatar
pinback
Posts: 13402
Joined: Sat Apr 27, 2002 3:00 pm
Contact:

Re: The origin of the Hugo programming language

Post by pinback » Sun Feb 07, 2016 12:18 pm

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?
Above all else... We shall go on... And continue!

User avatar
Tdarcos
Posts: 5602
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Re: The origin of the Hugo programming language

Post by Tdarcos » Mon Feb 08, 2016 3:31 pm

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.

User avatar
RealNC
Posts: 1462
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC » Mon Feb 08, 2016 6:29 pm

It's a glorified assembly dialect if you ask me. Real Men use languages where changing a value translates into 2MB of machine instructions.

User avatar
Tdarcos
Posts: 5602
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos » Tue Feb 09, 2016 11:40 am

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.
"We don't try, to understand, the New York Times affect on man."
- The Bee Gees, Night Fever

Post Reply