I talk a lot about Prolog but really what I want is just a language I can write an Infocom / SHRDLU style adventure game / text-based AI simulation in.
My problem is I have high expectations for a language because I want to do what seems to me to be very simple things:
* have the world obey rules, so all actions cause consequences
* rules that can be changed at runtime
* game AIs can read these rules and make plans
* save/ load the game state to/from disk
Turns out getting these is HARD.
@natecull ... erlang will do that ...
@jankoekepan Theoretically any Turing-complete language can do anything, but, ...
Ruleset - check. Have evaluation by parameter call, no problem.
Changing rules - check. Erlang can reference functions lambda-style, among other things.
AI rule reference - check, depending for sanity's sake on how you implement the rules.
Save/load - check. Easy.
@jankoekepan Yes! That's exactly what I need.
The need to represent a DSL succinctly in the core grammar/syntax of the language, unfortunately, rules out a LOT of languages because their core syntax tends to get in the way of building succint DSLs.
Lisp is about the only thing left standing.
A large motivation of this strange odyssey was my experience writing 'Planner' for Inform 7 ( http://inform7.com/extensions/Nate%20Cull/Planner/source.html ) which....
yeah, I just gave up on I7 after this because, the syntax of the language was just so absolutely hostile to what I was trying to do.
But the IF community got stuck on I7 and...
Well, maybe I'll just try again from scratch, this time in Node.js.
I would still go with Erlang, because you can call a function by a set of references (say, to world state, rule state and AI state), and then retrieve the AI's actions as a function return value, while having things like matching patterns determine on the receiving end what should be done with the data received.
Server run by the main developers of the project It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!