Hacker News
2 years ago by acdha

> WB: Empire has caused many students to flunk out, and even a few divorces. I've received some angry emails over these.

This part resonated: my father had various issues over the years (we suspect undiagnosed depression but he refused care) and Empire was one of the games he'd spend days on. Growing up, it took me a while to realize that the problem wasn't the game but the personality trait which lead to that behaviour cropping up anywhere possible.

I found the mention of a Wang word processor interesting as that was one of my dad's employers. They apparently had quite a few management issues but he had some stories about one of their better salespeople — this one guy apparently had legendary expense claims but was also frequently the top performer in revenue. When word processing was a department in a business, it was often run by an older woman who'd come up through the ranks and while they had a high-sounding title they often weren't given a lot of respect by the other department heads and a lot of the other vendors more or less followed that with a take-it-or-leave-it approach. This sales guy would do things like rent a helicopter to take someone from LA to lunch on Santa Catalina to discuss a deal or see how things were working out at an existing company — simultaneously far more than the internal rules allowed but also a tiny fraction of the profits they made from a major company buying Wang hardware globally.

2 years ago by gavinray

Walter -- you've been in the game a long, long time. One of the first (the first?) commercial C++ compilers.

1. As a 20-something whose first (real) experience coding was Visual Basic in Visual Studio 2008, I'd be interested to hear your thoughts/take on "lessons we've forgotten" or things programmers nowadays think is something new, but is just an old thing being re-discovered/re-branded.

2. Also interested to hear your take on software bloat. I grew up on Windows XP, maybe it's the nostalgia, but I feel like both the responsiveness and usability of apps has declined, despite a x1000 fold increase in computer resources.

I can't help but get this sense of both awe and disgust that when I was a little kid, programs were written with so much more efficiency.

The peak of absurdism for me was when I sent both an SNES emulator and an SNES game ROM as a Discord chat message attachment to my wife the other night. The ENTIRE PROGRAM took up less space than a picture of a houseplant from my cellphone!

(Just 4MB, out of the 8MB limit for message attachments).

What're your thoughts here? Are we doomed?

--------

By the way, I <3 D.

It might not have a very big ecosystem, or huge backers, but as a LANGUAGE I can think of almost nothing I enjoy writing more.

(Though if there were an official LSP/tooling in-tree so that IDE intellisense worked when using UFCS syntax that would be life-changing. Currently, I restrict myself from using post-fix functions at all because they break Code-D's intellisense, so it's a waste of one of the best features =/ )

Maybe Stefan Koch's new "reflect" thing that spits out the JSON-looking AST can be useful for this? I'm not super knowledgeable though.

2 years ago by WalterBright

Thanks for your thoughts. I'm not sure about lessons forgotten, but there are definitely lessons never learned. One is the use of macros in programming languages. Macros are one of those great ideas that seem almost miraculous. They provide immense power to the programmer.

Unfortunately, the dahk side of macros inevitably consumes the user. The macros inevitably become so confusing, pervasive and complex that the author winds up inventing his own undocumented mess of a language, unusable for anyone else.

For example (one of my favorite anecdotes!) back in the 90s a friend of mine worked at Microsoft. A manager showed him a program written in assembler that needed a bug fixed. Several programmers had been assigned to it one after the other, and they all failed.

It seems the original implementer, who had since left the company, had invented his own macro language using MASM, Microsoft's macro assembler. Nobody could figure it out.

My friend said "I can fix that" and fixed the bug and checked it in in two hours. The manager, astonished, asked him how he figured it out. He said "I didn't figure it out. I disassembled the object code using Walter's disassembler that turns it into assembler source code, found the bug, fixed it, and checked in the new asm source code!"

2 years ago by xyzzy_plugh

> The macros inevitably become so confusing, pervasive and complex that the author winds up inventing his own undocumented mess of a language, unusable for anyone else.

This is not limited to macros, but any abstraction.

Let's step back and rewrite the quote:

> The abstractions inevitably become so confusing, pervasive and complex that the author winds up inventing his own undocumented mess of a language, unusable for anyone else.

The key fault that trips up so many talented programmers (if not all) at least some point during their career (and hopefully not continuously, though I certainly know a few cases) is confusing convenience with simple. Convenience is almost always more complex, not simpler. Macros happen to wear their complex hearts on their sleeves.

You can address any of these problems by _addressing the problems_ you succinctly listed: documentation and usability.

Take React for example. It's an abstraction, arguably a new "language", and requires ample documentation and usability concessions to be palatable. You could accomplish this with macros as well.

But like any abstraction, the real problems arise during maintenance, and thus it becomes a Software Engineering problem -- whatever that means. This is where Software Engineering as a poorly-defined pseudo-profession has failed to demarcate itself from simple programming: the quality, maintenance and longevity of living code bases.

The masses unfortunately still don't see the forest for the trees, so I agree that it's something we've never seemed to learn, if perhaps using a broader definition.

2 years ago by gavinray

Thanks for taking the time to reply Walter, genuinely appreciate it!

  > "Unfortunately, the dahk side of macros inevitably consumes the user. The macros inevitably become so confusing, pervasive and complex that the author winds up inventing his own undocumented mess of a language, unusable for anyone else."
Yes! Modern languages have all adopted this approach it seems, trading macros for proper compile-time expressions. Rust uses "#[feature]" I believe, pretty sure Zig and Nim has something for this as well.

I am very sparing even when using mixins/template mixins in D -- the second you do, it ratchets the debugging difficulty up to "11" and becomes am order of magnitude harder to reason about program state.

Great power, great responsibility. I'm an "avoid at all costs" kind of guy, unless you can really justify it.

If C++ didn't have macros (which invariably get abused, along with templates) I think I might not hate it so much. Let us pray that the "constexpr" idea they "borrowed" from you may slowly fix this a little over time ;)

I went through a phase earlier in my dev career where I thought "Metaprogramming is so powerful and cool!", and I've put that behind me now. I just want boring, easy-to-read + maintain, predictable code.

Ironically I used to poke fun at Java and .NET but I've come to appreciate the "stupidity". "Dumb" is easy to understand, "dumb" is easy to maintain. "Clever" is bad.

  > "My friend said "I can fix that" and fixed the bug and checked it in in two hours. The manager, astonished, asked him how he figured it out. He said "I didn't figure it out. I disassembled the object code using Walter's disassembler that turns it into assembler source code, found the bug, fixed it, and checked in the new asm source code!""
Ha!

I suppose while I'm at it, I ought to thank you for all the Digital Mars tools that myself and many others still use today:

https://www.digitalmars.com/ctg/ctg.html

The Digital Mars tools for working with PE/COFF files and libs/binaries are indispensable. I suppose they've helped many tens of thousands of people.

2 years ago by bakul

> My friend said "I can fix that" and fixed the bug and checked it in in two hours. The manager, astonished, asked him how he figured it out. He said "I didn't figure it out. I disassembled the object code using Walter's disassembler that turns it into assembler source code, found the bug, fixed it, and checked in the new asm source code!"

Nice! But this trick doesn't work when a bad program is written in a HLL! I once speeded up a C++ program that took 3 minutes & was in the critical path for 40-50 engineers. It was badly written and the logic was spread all over the place. It was not fixable so I took the easy way out. I looked at its inputs+outputs, fed various smaller samples to figure out the IO logic and reimplemented it from scratch. The new program ran in 0.5 seconds. It wasn't a difficult problem but nobody wanted to touch the program because it was so badly written.

I think the moral is that bad programmers will misuse whatever features they have access to. The "dark side" is less that of the feature in question and more in the lack of early intervention and proper training! People need to be taught how to use power tools responsibly & judiciously. If you take away all the power tools for the fear of misuse, you will only see mediocre work. Or worse.

2 years ago by germandiago

Haha! Yes, every time I hear Lisp and Macros... really, you have to be careful with them. I would say it should be the last resort, and really careful when using them.

2 years ago by nailxx

Hello! Came here just to say thank you for my happy professional childhood. I used to closely follow D development since DMD was 0.48. It introduced me to some basic concepts: module system, cow, unit tests, invariant checks, which were somewhat foreign to C++ devs at the time.

I remember how all the mailing list waited for 1.0 finally after 0.99 and… oooow… “announcing DMD 0.100” :)

I was 17 at my first job ever, it was in gamedev, and I promised everyone that D would be the next thing after that clunky C++ in two (maybe three) years. That’s how we should make games \m/

Sadly, it didn’t come to that extent (marketing?). But I am glad to visit dlang.org from time to time and see it evolve, and Walter Bright still rocks, 20 years after.

2 years ago by simonh

Thanks for such a great game. I remember playing Empire on my Amiga back in the late 80s, it didn't have any of the fancy 3D graphics of my other games but I still played Empire the most. I still play a clone of it frequently on my iPad.

2 years ago by WalterBright

Graphics are great for initial attraction to a game, but it's the gameplay that keeps one's interest.

It's similar to movies. Special effects are momentarily interesting, but it's the plot that overwhelmingly matters.

2 years ago by JKCalhoun

And characters.

2 years ago by pixelgeek

I have tried that game. I find it a bit too difficult to play without a keyboard. Or just too slow. I am still, after all these years, used to rapidly moving units with the keyboard

2 years ago by juanuys

Hi Walter, thanks for your time!

Do you play many games nowadays? Which ones?

What do you think is going to be the next big gaming breakthrough? Or the next big genre/theme? (E.g. for economics, it was F2P/IAP, never of which I'm a fan of. Also, city building + survival is really big right now.)

2 years ago by WalterBright

The itch to write a better language & compiler than anyone else is more compelling!

But I am attracted to full motion simulators that would, say, enable me to drive an F1 car without risk or much investment.

2 years ago by fb03

If you're into that, I highly recommend you looking up Force Dynamics (a friend of mine) for high quality affordable driving simulators that are really close to actually driving the Real Thing (TM)

https://www.force-dynamics.com/

2 years ago by Shorel

Don't forget this very important design issue of motion systems:

https://www.youtube.com/watch?v=ttCXkfjnvvc

Some motion systems are simulating the 'motion' of the car, when they should be simulating the 'forces' on the driver.

For example sustained acceleration to the left because of heavy cornering should generate sustained tilt, so you feel heavier to the left.

The only issue is that the max acceleration that can be simulated is 1G. So a larger acceleration is either clipped or all accelerations are scaled.

My favourite concept is this one: https://www.yawvr.com/

2 years ago by pwdisswordfish0

The Computer History Museum really needs to do an interview with Walter to add to their oral histories series. pls halp.

2 years ago by mad_ned

You may not have played the game Empire, but if you've played any computer wargame, you've played something influenced by it. I'm very honored to have had the chance to discuss the development of Empire with Walter!

As mentioned in the article, he is a sometimes-reader of Hacker News, so if people have any follow-up questions, we may just get lucky and have him drop by to answer a few.

2 years ago by undefined
[deleted]
2 years ago by syngrog66

I loved Empire Deluxe so much (by Baldwin & Bright) -- my favorite in the series -- that I once wrote my own private clone. in C and OpenGL. even drew all the bitmap icons and tile graphics myself. went nuts adding extra unit types. now gathering dust on a "disk" somewhere. Tell myself some rainy day I'll resurrect it...

2 years ago by mindcrime

Great interview! I've always thought it was really neat that Walter posts here semi-frequently, and it's really fascinating to get even more of a peek into the mind of such a creative individual.

Now I really need to get serious about starting a project in D so I can learn it properly...

2 years ago by WalterBright

I still have plenty of critics :-)

2 years ago by B1FF_PSUVM

Perhaps from people with a grudge about those sleepless "one more turn" nights ;-)

I take it as vaccination against World of Warcraft, etc.

Thanks, Walter

2 years ago by WalterBright

You're most welcome!

2 years ago by wolverine876

> My interest in Empire is not so much playing it anymore, it's devising a better computer strategy. I'm a lot more experienced in how to do such things today, and the temptation is strong to go do it. But I need to focus on my compiler stuff.

Please, karma grant me this wish: ...

2 years ago by dang

Here's Walter's comment which the OP refers to at the beginning:

https://news.ycombinator.com/item?id=28658090

Daily Digest

Get a daily email with the the top stories from Hacker News. No spam, unsubscribe at any time.