The best way to implement a text adventure in C would be to implement a simple lisp interpreter in C and then implementing the actual game in a lisp DSL. Lisp lends itself surprisingly well to this, and defining game logic declaratively instead of imperatively is much more intuitive. Here are a few examples:
I haven’t used lisp is 30 years, so help me understand/remember why this would be easier than say C++ or any other language with object inheritance and virtual functions. Is there something else about it?
OO is absolutely the wrong paradigm for interactive fiction. Writing a text adventure has been my favorite way to experiment with a new language for decades now, and I’ve gone down the OO rabbit hole too many times. For this use case, you want something more like an ECS, so that a single entity can be more than one kind of thing at the same time. Consider a talking robotic vehicle. It is an object in the world: the player can interact with it from the outside. It is a room, with contents: the player can be inside it. It is an NPC: the player can speak with it. Trying to accommodate that in an OO inheritance hierarchy has always tied my code—and brain—in knots. An ECS-like architecture can handle it easily.
Sorry but Inform6, which itself is a distant cousin on methodology against ZIL and ZIL itself to Lisp, it's far better than CL for these kind of games.
The English (and Spanish library -grammar, object and token translations- with INFSP6) it's something else. Among Inform Beginners' Guide, with DM4.pdf you can set anything, even new grammars, or a Tetris, if you want to dwell into low-level Inform6 functions.
Inform6 gives you literal game objects and attributes for free. The most literal OOP language ever. And the generated ZMachine games/ROMs will run from a m68k Amiga to an Iphone.
I started my first company based on Delphi, which itself was based on Turbo Pascal. Wirth was a great inspiration, and his passing is no small loss.
May his work keep inspiring new programmers for generations to come.
One of his quotes: "Whereas Europeans generally pronounce my name the right way ('Ni-klows Wirt'), Americans invariably mangle it into 'Nick-les Worth'. This is to say that Europeans call me by name, but Americans call me by value."
He was indeed! I wrote my bachelors thesis on bringing modularity to a language for monitoring real time systems and his work, especially on MODULA-2, was a huge source of inspiration.
From what I understand, it has nothing to do with morality or hurting Russia. The banking sanctions make it impossible to do financial transactions with the country, which effectively puts an stop on business relations.
Why do you bring Iran or NK into this? Let's get it straight: Until now, the only counties who have actually tried genocide on industrial scale, have performed inhumane tests on live subjects of other cultures or used Nukes on civilian targets have been mostly western. Heck, they were literally wiping each other out right until 75 years ago. They are also the ones actively ganging up and invading others TODAY. What delusion suddenly caused you to think it is again 'others' who are trying to wipe you out?
Huh? I guess that depends on your definition of western I guess, since Japan certainly had no issues genociding, testing chemical and biological weapons, and all that other stuff on a wide swath of Eastern Asia? Russia isn’t generally considered by anyone I’ve run across as a ‘Western’ country either, and they had (still may have) a massive program.
Near as I can tell, every industrialized power has gone through the phase.
The comment about nukes is weird, since I believe the US is the only power to ever nuke someone in anger - and near as I can tell, plausibly used it as little as possible and in self defense (though we could talk ourselves blue in the face on that point).
Nothing would have stopped the US from carpet nuking Japan for instance at the time, except some minor logistical hiccups.
My comment about Iran and NK is specifically because they’re consistently isolated by (and start fights/ideologically align themselves opposite) the bulk of countries.
They’ve been, and continue to encourage being ‘others’. I pointed out, they still have no incentive to wipe any groups out/start targeted plagues, wouldn’t start something like this, so why would anyone else?
What are you even talking about? Not only is Iran a nation-state, it is probably one of the first nation-states to exist. The Name of the country itself is close to 2000 years old, and the language they speak is at least 1400 years old. They have had a continuous culture for millennia, and identify themselves as a nation, by name, culture and mostly the language.
I think it's reasonable to debate the language aspect (that's why my original comment focused on religion, which at least appears to be more homogenous in surveys).
Apparently ~1/2 of Iranian citizens claim Farsi as their mother tongue, with many citizens claiming Turkic dialects, Kurdish, and "Linguistically-Iranian languages" that are not Farsi (in my mind, this is comparable to Gaeilge, Scots, Welsh within the UK).
Then again, I'm sure that identifying as an atheist or non-Shia Muslim in Iran is not in most citizens' best interests, regardless of their underlying beliefs.
I don't have a point or conclusion, I do think it's a reasonable thing to discuss. Ultimately, "nation" is an human construct, the and the people who have the authority to claim it are the Iranian people.
The Kurds (who compose a significant minority within Iran) would reject the nationalities "Iranian" or "Persian", I think; even more so than Catalans, Basque, or Galcian peoples would reject "Spanish". I don't know if other minorities comprising Iran would, too. It's an interesting question to ponder, though.
Anyways, thank you all for this pedantic stroll, it made me learn more about this part of the world than I probably would have, otherwise. :P
Iran is an industrial country. That's why Venesuela's economy crumbled after a year of sanctions and Iran's has endured decades: They produce a huge amount of their needs locally.
It also has the most sophisticated healthcare system in the Middle East. It may not be as good as Western Europe, but it competes, or may exceed, the eastern Europe.
To understand where Iran stands, you can consult [1] and get surprised that its output is not only more than the whole ME combined, but exceeds some countries in Europe.
Go is a significantly simpler language than Rust, and has a garbage collector. You can learn Go in a weekend, and experiment with it in a couple more.
Rust on the other hand has a steep learning curve which will take at least a couple of months to get good at.
So if I were you, I'd start by learning Go, seeing if it fit my needs, and then learning Rust later on if I had a use case that Go wasn't a good fit for.
I’m not familiar with Rust’s tooling but i’m wondering whether the dev workflow involves explicit manual recompilation? Eg. in Haskell modern workflows are about conversing with the compiler real-time ie. make a type error and it is immediately pointed out and thus explicit recompilation is not part of it anymore. I’d be mildly surprised is something like this does not exists for Rust.
Rust is a compiled language, so you will have to recompile. Incremental compilation helps to a certain degree.
There is IDE tooling that helps with a lot of issues you may encounter, but in the end, you still have to recompile to run your code. Same applies to Go as well.
I have never find this a shortcoming of any language, but YMMV.
So is Haskell. What I'm saying is that in 2020 the dev workflow is not: code, compile, run, repeat. Thanks to modern tooling it is now a near-instant feedback loop of: code, red wiggly line(s), fix, repeat. Ie. real-time conversation with the compiler.
rust-analyzer brings this to the table, but it's a pretty recent development. The RLS existed for a while before that, and gave a basic version of this story, but it was much slower.
According to the article, 260 people are writing code for systems with strict specifications that do not change much over time. That's a significant constraint on the externalities they deal with.
In contrast, most commercial programmers write an order of magnitude more code for systems far less defined with more unpredictable externalities, with shorter deadlines.
There is no magic in the world. Everything has a reason, and it's often not (just) due to incompetence or stupidity.