Compilation problems with 6L02

I finally got Kerkerkruip to compile to I6, but the I6 compiler then throws fatal errors. Does anyone have any tips where to search for the culprit of this?

[code]auto.inf(2030): Error: Expected new constant name but found gestalt_Sound2

Constant gestalt_Sound2
auto.inf(2032): Error: Expected routine name but found glk_schannel_pause
[ glk_schannel_pause
auto.inf(45): Error: No such constant as “BC_0”
auto.inf(709): Error: No such constant as “CONSTANT_PACKED_TEXT_STORAGE”
auto.inf(902): Error: No such constant as “InformLibrary”
auto.inf(958): Error: No such constant as “T_SL_Location”
auto.inf(959): Error: No such constant as “T_SL_Score_Moves”[/code]
I guess some of it has to do with Glulx sound, but I’m very unsure about the rest.

I’ve got one! I’m trying to update Sand-dancer, which implements a radio that can be tuned to a frequency. This used to work like this:

A frequency is a kind of value. 100.9kHz specifies a frequency. 100.9 kHz specifies a frequency. 100.9 specifies a frequency with parts integer and decimal.

Tuning it to is an action applying to one thing and one frequency. Understand "tune [thing] to [frequency]" as tuning it to.

To catch a command like >TUNE RADIO TO 99, I had this bit:

Understand "tune [thing] to [number]" as coarse tuning. Coarse tuning is an action applying to one thing and one number. Carry out coarse tuning: try tuning the noun to the frequency with integer part number understood decimal part 0.

test me with "tune radio to 101.3Khz / turn radio to 101.3 KHZ / tune radio to 101.3 / tune radio to 101 / tune radio to 101Khz / tune radio to 101 khz"

However, this no longer works, because you can’t define a unit with the specification “100.9” any more: that’s now a recognized thing, a real number. Fine: but now my Carry out coarse tuning rule doesn’t work, because I can’t label the parts of the number. I feel like there’s perhaps now some built-in way to reference the constituent components of a real number, but I haven’t found it yet in the docs.

You could probably just get rid of all of this noise by using a real number as the frequency? Real numbers can be understood and everything; I think this would do well enough for you. Or do you not want to give the player this much power? Is equality for real numbers too unreliable? In any case, you can just set a real number property to be a number and it should work correctly.

For the radio case, something like this:

Dialing is an action applying to one real number.
Understand "dial [real number]" as dialing.

Carry out dialing:
	let N be ( real number understood * 10 ) to the nearest whole number;
	say "You dial [the real number understood] ([N]).";

Then key the radio response to N, which will be 1010, 1013, etc. If the player enters “101.29” it will be rounded to 1013.

Here’s an interesting problem report I got with Scope Caching:

The offending text is in a section of Scope Caching that replaces part of Epistemology, which is why the report blames Epistemology. But what’s interesting to me is what the report is saying: the After Reading a Command rulebook is now based on nothing. I don’t think that was even possible in 6G60.

In happier news, I see that this bug has been fixed:

… so I can remove the workaround code from Scope Caching.

On the other hand, my own computer is now too old to run 6L02, so I want to make sure that Scope Caching Version 2 is still available. It’s on github currently - is there a handy way to have github “bookmark” an old version, or should I copy version 2 to a more permanent place?

On the third hand, maybe looping over scope is faster in 6L02, and scope caching isn’t even needed? Can anyone tell me that? Zarf?

There are two key rules in Lost Items that make use of Scope Caching, and I can’t figure out whether I can do them without it. (I wish I’d written comments about when these rules fire!) Here’s one of them:

After deciding the scope of the player when we are looking for lost items: Now everything is not lost; Repeat with item running through marked invisible things: Follow the did we lose rules for item; if the outcome of the rulebook is the we did outcome: now item is lost; Place item in scope, but not its contents;
This code runs a rulebook on almost every thing in the game, in order to determine if it is eligible for the message “you can’t see [the item] anymore.” In addition, it only applies to things that haven’t already been added to scope. My gut is telling me I do need Scope Caching for this, but maybe someone can tell me if there’s actually a clever way to avoid using it. Anyone?

I got one of these on an extension. Just made the rule that was listed it both places two rules, one of which "follow"ed the other.

As far as I know, 6L02’s only speedup is in rulebook execution and maybe text handling. The basic model of scope hasn’t changed.

Create a tag. I don’t remember how to do this in the github interface. On the command line, it’s “git tag -a TAGNAME” and then “git push --tags”.