Live data from Hacker News

A talk with Walter Bright about Empire

madned.substack.com

31–40 of 102 posts

Re: A talk with Walter Bright about Empire

#31
post #21

Earlier quoted context omitted.

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.

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/

It's sad that we still don't have an idea how to produce high g-forces in a simulator.

The feeling of going with a car through a turn at 2g is incomparable to the simulators we have. Never mind F1 cars that can corner and brake at up to 5g.

Re: A talk with Walter Bright about Empire

#33

Earlier quoted context omitted.

> 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 fo…

Disagree. There are abstractions and there are abstractions. Macros are too big of a footgun of an abstraction. Because they can change the syntax of the language, they can hide functionality in non-obvious ways and they're just another band-aid on top of the languages limitations (the two latter points are especially true for C). And more often than not they're worse than just writing using the languages capabilitie…

> another band-aid on top of the languages limitations

Those limitations are real though, and getting in peoples way. I'd also add most language designers would not consider C macros as "real" macros.

Think of abstractions as power tools, you want to use the least powerful one that solves the problem so you don't lose a hand. If you're cutting a string you pull out some scissors, if you're cutting a 10 foot thick steel rod, you grab some hydraulic shears; so it goes with abstractions.

Most people never need macros, the abstraction equivalent of hydraulic shears, because most of the time your problem isn't that difficult. That doesn't mean those problems aren't out there or that macros shouldn't exist.

Re: A talk with Walter Bright about Empire

#34
post #2

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.

[deleted]

Re: A talk with Walter Bright about Empire

#35

Earlier quoted context omitted.

> 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 fo…

Disagree. There are abstractions and there are abstractions. Macros are too big of a footgun of an abstraction. Because they can change the syntax of the language, they can hide functionality in non-obvious ways and they're just another band-aid on top of the languages limitations (the two latter points are especially true for C). And more often than not they're worse than just writing using the languages capabilitie…

There are macros, and there are macros.

You've used C and Rust macros. Have you seen Common Lisp macros?

I've read a fair amount of Common Lisp code written by other people, and every time I had difficulty understanding something, it was invariably plain CL, and not a macro.

Maybe C programmers just have difficulty exercising restraint when writing their macros. Or perhaps the design of the language and the macro system (which is basically just text pre-processing) don't mesh well together.

Regardless, I haven't noticed macros being a footgun in CL. Sure, there are doubtless people out there who have abused it (and will continue to do so) - but that's true for every language feature; meanwhile, it doesn't seem like macros themselves are actually a problem, in the sense that they're particularly easy to abuse compared to the rest of the language (a distinction that I might give to C raw pointers, for instance).

If anything, (good - CL) macros are easier to understand than many other features, because they're (usually) referentially transparent functions with a clearly defined input and output that runs once at compile-time, on known data, which you can manually expand and inspect, and they tend to rarely interact with other features of the language. With rare (but useful) exceptions, macros don't involve networking, async, threads, dynamic environments, databases, stack limits, or any of the other strands in the spider-web complexity that tends to make programming hard.

Re: A talk with Walter Bright about Empire

#36

Earlier quoted context omitted.

> 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 fo…

Disagree. There are abstractions and there are abstractions. Macros are too big of a footgun of an abstraction. Because they can change the syntax of the language, they can hide functionality in non-obvious ways and they're just another band-aid on top of the languages limitations (the two latter points are especially true for C). And more often than not they're worse than just writing using the languages capabilitie…

At one point, I decided to unwind all my use of macros in C. I was actually very happy with the result. My code was much better.

Re: A talk with Walter Bright about Empire

#37

Earlier quoted context omitted.

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 aut…

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 expressio…

They're certainly indispensable to me! Some of them I wrote for the purpose of understanding the file format. Writing a pretty-printer is a great way to understand.

Re: A talk with Walter Bright about Empire

#38

Walter here! AMA!

Hey Walter. I played a lot with the DOS version of the game that Mark Baldwin worked on (perhaps also a later windows version, although I probably just played the DOS version on Windows). Two things that struck me as "off" at the time were the way calculating the distance when moving units wasn't as consistent or intuitive as it could be when moving diagonally because the board consisted of squares, and that multiple…

A hex grid certainly addresses that problem, but since I was limited to text, squares it was!

The one unit per square comes about because it is very difficult to see a "stack" of units in one location. It also made combat trivial, just move into the opposing force's square. No special commands needed.

This wound up working fine, and I was always reluctant to mess with game rules that worked.

Re: A talk with Walter Bright about Empire

#39
post #21

Earlier quoted context omitted.

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/

It's sad that we still don't have an idea how to produce high g-forces in a simulator. The feeling of going with a car through a turn at 2g is incomparable to the simulators we have. Never mind F1 cars that can corner and brake at up to 5g.

It can be done, you'd just need a big playground for the machine - about the size of an F1 track!

Re: A talk with Walter Bright about Empire

#40

Walter here! AMA!

Hello Walter! I'm interested in programming languages and the design of compilers. I'm relatively novice to programming, but languages have long captured my imagination. Three questions for you: Do you have a blog where I can read about your compiler escapades? have you any advice for the aspiring novice? which is your favorite language, and why?

> where I can read about your compiler escapades?

I don't really have a blog, but when I do write an article I'll link to it on twitter:

https://twitter.com/WalterBright

A collection of articles I wrote a while ago:

https://www.digitalmars.com/articles/index.html

Presentations:

http://www.walterbright.com/

And, of course, the Emperor who will get mad and put another continent under iron control if he's not mentioned:

https://twitter.com/classicempire

Post reply on HN