Let's Play/Read: Inform 7 manuals (Done for now)

That’s not what I got.

I tried out:

Lab is a room.

Fooing is an action applying to nothing.
Understand "foo" as fooing.
Instead of fooing:
	showme the meaning of the verb contain;
	showme the meaning of the verb provoke;

Test me with "foo".

And I got:

Lab

>foo
"meaning of the verb contain" = relation of objects: containment relation
"meaning of the verb provoke" = relation of objects: never-holding relation

Now, don’t get me wrong, I really didn’t except equality relation or never-holding relation. I expected something that indicated no meaning at all. Maybe nothing relation if it has to be a relation of some sort and nothing cannot be used? Otherwise, how do you know if the verb really doesn’t have meaning, as opposed to having a meaning of never-holding relation?

EDIT (2024-04-04): Filed a documentation bug.

I ran into another odd situation with this idea as well.

I tried a variant on some Chapter 13 sample code to test listing on verb meanings:

Lab is a room.

Suspicion relates various people to one person.
The verb to suspect means the suspicion relation.
The verb to mistrust means the suspicion relation.
The verb to distrust means the suspicion relation.
The verb to be suspicious of means the suspicion relation.

Fooing is an action applying to nothing.
Understand "foo" as fooing.
Instead of fooing:
	showme the list of verbs meaning the suspicion relation;

Test me with "foo".

And I got:

Lab

>foo
"list of verbs meaning the suspicion relation" = list of verbs: {verb suspect, verb mistrust, verb distrust}

The to be suspicious of verb isn’t showing up.

EDIT (2024-04-04): Filed a bug on this issue.

I filed bugs on those two previous issues I ran into. See the edited version of my last two posts if the bug reports are of interest.

The reason I have been digging into WI §14.9 Verbs as values so much is because it answers a question I posed in an earlier post, which was trying to differentiate between a verb defined like this:

To achieve is a verb.

And a verb defined like this:

Suspicion relates various people to one person.
The verb to suspect means the suspicion relation.
The verb to be suspicious of means the suspicion relation.

The answer is in WI §14.9 Verbs as values. The first type of verb is meaningless and the second type of verb is meaningful.

So, that’s great! I’m very happy I learned that and also, possibly, tracked down a bug or two in the process.

Which leaves me with my final problem which I am hoping I can get some help on. It is something that might be related to in one of the bugs I just filed: the problem of reporting the meaning of the verb to be suspicious of. I can’t figure out how to print its meaning.

I tried all of the following permutations:

showme the meaning of the verb to be suspicious of;
showme the meaning of the verb be suspicious of;
showme the meaning of the verb suspicious of;
showme the meaning of the verb suspicious;
showme the meaning of the verb be suspicious;
showme the meaning of the verb to be suspicious;

Every one causes a compiler error.

I even tried to get “super-creative” with:

showme the meaning of the verb are suspicious of;

But that just causes an internal error (I’ll file a bug on that after finishing this initial posting).

So, does any know how to see the meaning of the verb to be suspicious of? Is it the multiple words that are confusing the compiler? Could it be related to this potential bug?

EDIT (2024-04-06): Filed a bug on the internal error issue.

You can’t. Values of kind verb aren’t created for user-created verbs beginning with “to be” unless they begin “to be able to”. You can use 'em in your code, but runtime has no idea they exist.

1 Like

This does seem very useful when the name of the kind also happens to be a good synonym for every possible instance of the kind.

“Thing” or “supporter” both seem like bad examples. “Device” or “container” are a bit better. But I often find myself adding the synonyms of “man”, “woman”, “person” and/or “animal” to multiple instances of those specific kinds, so they are probably the best examples.

I imagine the following code would have saved me some extra synonym work:

Understand "person" as a person.
Understand "man" as a man.
Understand "woman" as a woman.
Understand "animal" as an animal.

Unless I am missing some sort of Inform 7 quirk or side effect by doing this.

Same here! I didn’t even know this functionality existed.

At a high level seems to be analogous to using To say to abstract complex string generation, except, in this case it is used to help encapsulate complex Understand assertions.

I’m definitely going to be using this in the near future.

1 Like

They are not easy to understand and it is even harder to comprehend the problems that they solve.

Whenever I run into a situation like this, my assumption is, eventually, I will run into some real life code that other developers have written – most likely, based on the feedback this post has already received, in other people’s extensions – and, at that point, I will at least have seen the chapter on Actions, so it won’t be a complete surprise. Then, I know I have a reference to Actions and I also have an example of how they are used in real life. And, eventually, maybe I will have a similar pattern of a problem and I can apply what I have learned to make my own solution.

Don’t get me wrong, it’s not easy for me to do this. I have a personality type that wants to understand everything immediately. It takes a lot of mental willpower to push against my natural tendencies and realize that certain learning situations require an iterative process to fully comprehend. But if I take the time to identify those situations up front, it is easier for me to move on, knowing that in the near future, the grok is coming. :thinking: :exploding_head: :smiley:

1 Like

This is an abstract question, but does anyone know where the original rulebooks and rules design came from, historically? Was it influenced by other languages or systems? It feels like a mix of triggered cascading events and multimethod run time triaging, with an extremely precise preamble language. I’m not sure I have seen anything quite like it in one place and, when other people ask me what makes Inform 7 powerful, it would be nice to have another programming language analogy to explain the rulebooks system with less rambling.

@zarf suggested rules to Graham. He wrote up some notes here

https://eblong.com/zarf/rule-language.html

I have a simple process that allows me to almost never think about this complex rule ordering process:

  1. Name every rule and define them in the source code in the order I expect them to run.
  2. Assume that 99% of the time, Inform 7 rule ordering will agree with my expectations, or be close enough that it doesn’t matter.
  3. For the 1% of the time the Inform 7 rule order causes problems, add a comment to that effect and rearrange a rule or two to match my expected source code order. For example:
[Don't let Inform decide the rule order. Put them in the source code order.]
The can't empty a person rule is listed before the can't empty a non-container rule in the check emptying rulebook.

The resulting sentence is a bit long, but once I fix it, I can just look at the source code to know the approximate order.

1 Like