The origin of the Hugo programming language
Moderators: Ice Cream Jonsey, joltcountry
- Ice Cream Jonsey
- Posts: 30184
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
The origin of the Hugo programming language
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.
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!
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
- pinback
- Posts: 17919
- Joined: Sat Apr 27, 2002 3:00 pm
- Contact:
- Tdarcos
- Posts: 9556
- Joined: Fri May 16, 2008 9:25 am
- Location: Arlington, Virginia
- Contact:
Re: The origin of the Hugo programming language
I include Pinback's comment to this message by reference as if set forth fully herein.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.
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 sayingYou can go further
Code: Select all
K = K+I I=I+1
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 You can reduce it further with
Code: Select all
K = K+I I=I+1
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":) .)
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."
Not screaming and crying like his passengers."
- Ice Cream Jonsey
- Posts: 30184
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
Re: The origin of the Hugo programming language
Ben and I disagreed on that point! We totally disagreed. Clearly, Ben is a hapless lunatic living in a world he never made.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
I think it's pretty good for a language found on the goddamn street.
the dark and gritty...Ice Cream Jonsey!
- Tdarcos
- Posts: 9556
- Joined: Fri May 16, 2008 9:25 am
- Location: Arlington, Virginia
- Contact:
Re: The origin of the Hugo programming language
I mean, seriously, even in Basic, even a 10-year-old writing a simple program knows the difference betweenIce Cream Jonsey wrote:Ben and I disagreed on that point! We totally disagreed. Clearly, Ben is a hapless lunatic living in a world he never made.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
I think it's pretty good for a language found on the goddamn street.
Code: Select all
100 A=5
110 IF A=5 THEN
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.
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."
Not screaming and crying like his passengers."
- RealNC
- Posts: 2301
- Joined: Wed Mar 07, 2012 4:32 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.
if (x = malloc(n * sizeof *x))
If "=" would mean something different inside an if statement, the above code wouldn't work anymore.
- pinback
- Posts: 17919
- Joined: Sat Apr 27, 2002 3:00 pm
- Contact:
- Flack
- Posts: 9090
- Joined: Tue Nov 18, 2008 3:02 pm
- Location: Oklahoma
- Contact:
- Ice Cream Jonsey
- Posts: 30184
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
holy shit... LOL
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
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
- Ice Cream Jonsey
- Posts: 30184
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
- pinback
- Posts: 17919
- Joined: Sat Apr 27, 2002 3:00 pm
- Contact:
Re: The origin of the Hugo programming language
This has been in C since day one. What are--- what were you talking about?Tdarcos wrote:The use of ++ and -- as either a preincrement/predecrement or postincrement/postdecrement operator was an absolutely brilliant idea
When you need my help because I'm ruining everything, don't look at me.
- Tdarcos
- Posts: 9556
- Joined: Fri May 16, 2008 9:25 am
- Location: Arlington, Virginia
- Contact:
Re: The origin of the Hugo programming language
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.pinback wrote:This has been in C since day one. What are--- what were you talking about?Tdarcos wrote:The use of ++ and -- as either a preincrement/predecrement or postincrement/postdecrement operator was an absolutely brilliant idea
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.
- Tdarcos
- Posts: 9556
- Joined: Fri May 16, 2008 9:25 am
- Location: Arlington, Virginia
- Contact:
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.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.
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.
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."
Not screaming and crying like his passengers."