Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
I7: Two questions, both of which probably require dipping into I6...
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Roger  
View profile  
 More options Nov 12, 8:59 am
Newsgroups: rec.arts.int-fiction
From: Roger <roger.helge...@gmail.com>
Date: Thu, 12 Nov 2009 05:59:31 -0800 (PST)
Local: Thurs, Nov 12 2009 8:59 am
Subject: I7: Two questions, both of which probably require dipping into I6...
...but I'm not sure.

I'm looking to do two things:

1) Printing the kind of an object. So for instance:

[code]
The Underwater Gallery is a room. "Whoozits and whatsits galore adorn
this room."

A whoozit is a kind of thing. A whatsit is a kind of thing.

The fork is a whoozit in the Underwater Gallery. The comb is a whatsit
in the Underwater Gallery. The toothbrush is a whatsit in the
Underwater Gallery.

After printing the name of something:
        say " ([the kind of the noun])".
[/code]

Now, that won't compile, but you get the idea. And no, I'm not making
a Little Mermaid game, that's just an example. ;)

2) Can you convert object names to a text token somehow? I7 doesn't
seem to be able to handle any kind of implicit conversion but I'm
hoping that I can somehow access the name of an object and store that
in a different text variable. Yes? No?

Thanks in advance.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Victor Gijsbers  
View profile  
 More options Nov 12, 10:17 am
Newsgroups: rec.arts.int-fiction
From: Victor Gijsbers <vic...@lilith.gotdns.org>
Date: Thu, 12 Nov 2009 16:17:20 +0100
Local: Thurs, Nov 12 2009 10:17 am
Subject: Re: I7: Two questions, both of which probably require dipping into I6...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Roger wrote:
> 1) Printing the kind of an object. So for instance:

My huge kind-related feature request might make it into Inform 7 one day
:), but in the meantime, let me present to you this code by Mike Tarbert
with some minor addition by me. It does a lot more than you're asking
for here, but that might save you from re-inventing the wheel (I don't
know what you're trying to do).

Kind regards,
Victor

"Kind Variables Test" by Mike Tarbert

Section - New Phrases to Compare

To decide if (X - an object) is identical to (Y - an object):
  (- Identical({X},{Y}) -).

To decide if (x - an object) is the same kind as (y - an object):
(- ({x}.i7_kind()=={y}.i7_kind()) -).

Section - New Phrases to Determine / Say

To decide what number is the level (n - a number) parent kind of (x - an
object):
(- kindof ({n},{x}); -).
Include (-
[ kindof n x;
   return x.&i7_kind-->n;
]; -).

To decide what number is the kind of (x - an object):
        let k be the level 0 parent kind of x;
        decide on k.

To decide what number is the parent kind of (x - an object):
        let k be the level 1 parent kind of x;
        decide on k.

To say kind name of (n - a number):
(- print (I7_Kind_Name) {n}; -)

To say the level (n - a number) parent kind of (x - an object):
(- print (I7_Kind_Name) {x}.&i7_kind-->{n}; -).

To say kind of (x - an object):
        say the level 0 parent kind of x.

To say the parent kind of (x - an object):
        say the level 1 parent kind of x.

Section - Victor's Additions

The thingummy is a thing.

To say whether (x - an object) is the same general kind as (y - an object):
        let d be 0;
        let e be the level 0 parent kind of thingummy;
        repeat with counter running from 0 to 100:
                let a be the level 0 parent kind of x;
                let b be the level counter parent kind of y;
                if b is e, break;
                if a is b, now d is 1;
        repeat with counter running from 0 to 100:
                let a be the level 0 parent kind of y;
                let b be the level counter parent kind of x;
                if b is e, break;
                if a is b, now d is 2;
        if d is 0, say "[The noun] and [the second noun] are not of the same
kind.";
        if d is 1, say "[The noun] and [the second noun] are both of the kind
[kind of noun].";
        if d is 2, say "[The noun] and [the second noun] are both of the kind
[kind of second noun].".

General comparing is an action applying to two things. Understand
"gcompare [thing] with [thing]" as general comparing.

Carry out general comparing:
        say whether the noun is the same general kind as the second noun.

Section - Example

Stored-kind is a number that varies.

Storing is an action applying to one thing. Understand "store [a thing]"
as storing.
Carry out storing:
        now Stored-kind is the kind of the noun;
        say "Ok, [the noun]'s kind is stored. ([Stored-kind] - [kind name of
stored-kind], kind of [the parent kind of noun]).".

Checking is an action applying to one thing.  Understand "check [a
thing]" as checking.
Carry out checking:
        let x be the kind of the noun;
        if x is the stored-kind, say "Is ";
        otherwise say "Not ";
        say "a direct kind of [kind name of stored-kind].".

Comparing is an action applying to two things. Understand "compare
[thing] with [thing]" as comparing.
Carry out comparing:
        say "Identical to: ";
        if the noun is identical to the second noun, say "Yes.";
        otherwise say "No.";
        say "Same kind as: ";
        if the noun is the same kind as the second noun, say "Yes -- ";
        otherwise say "No -- ";
        say "([kind of noun] and [kind of second noun]).".

The Lab is a room. A coin is a kind of thing. In the lab are three
coins. The can is a thing in the lab. The hat is a wearable thing in the
lab.
A penny is a coin in the lab. A dime is a coin in the lab.
A German coin is a kind of coin.
A pfennig is a German coin in the lab. A mark is a German coin in the lab.

John is a man in the lab.

test compare with "compare coin with coin / compare coin with can /
compare hat with can / compare coin with penny / compare penny with dime
/ compare dime with pfennig / compare pfennig with coin / compare
pfennig with mark / compare hat with mark".

test store with "store coin / check hat / check coin / check penny /
check pfennig / store mark / check penny / check coin / check pfennig".

test all with "test compare / test store".
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr8JwAACgkQoiOrMwvIZLy5OwCfaxYws9zkWtDo/6HUIMgx+nQs
OcEAn3/mU6kWjVO/RCSK2Edy7Lww7+tB
=33My
-----END PGP SIGNATURE-----


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Plotkin  
View profile  
 More options Nov 12, 10:37 am
Newsgroups: rec.arts.int-fiction
From: Andrew Plotkin <erkyr...@eblong.com>
Date: Thu, 12 Nov 2009 15:37:24 +0000 (UTC)
Local: Thurs, Nov 12 2009 10:37 am
Subject: Re: I7: Two questions, both of which probably require dipping into I6...

Here, Roger <roger.helge...@gmail.com> wrote:

> 2) Can you convert object names to a text token somehow? I7 doesn't
> seem to be able to handle any kind of implicit conversion but I'm
> hoping that I can somehow access the name of an object and store that
> in a different text variable. Yes? No?

Do you need to? It will always be cheaper to store the object itself,
and then print out its name when desired.

If you do want to do this, the conversion would be:

  let T be an indexed text;  [create a local variable]
  let T be "[obj]";          [set it]

...a little strange, because "let" is being used in two senses. You'd
set an indexed-text property or global the same way.

--Z

--
"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
*


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
M8R-dn7l8w@mailinator.com  
View profile  
 More options Nov 12, 11:10 am
Newsgroups: rec.arts.int-fiction
From: "M8R-dn7...@mailinator.com" <M8R-dn7...@mailinator.com>
Date: Thu, 12 Nov 2009 08:10:30 -0800 (PST)
Local: Thurs, Nov 12 2009 11:10 am
Subject: Re: I7: Two questions, both of which probably require dipping into I6...
On 12 Nov, 14:59, Roger <roger.helge...@gmail.com> wrote:

I can see Victor has already answered this, but fwiw, this is what I
came up with:

<code>
The Workshop is a room. The table is a supporter in the workshop. The
toolbox is an open container on the table. In the toolbox is a
spanner. The mechanic is a woman in the workshop.

After printing the name of something: say " ([the kind of the item
described])";

Every turn: say "The kind of the noun was [the kind of the noun]."

Test me with "go north / i / x me".

To say the/-- kind of (item - an object): (- PrintKindOf({item}); -).

Include (-
[ PrintKindOf obj;
        if (obj provides IK_0) print (I7_Kind_Name)KindHierarchy-->((obj.IK_0)
*2);
        else print "nothing";
]; -).
</code>


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roger  
View profile  
 More options Nov 12, 12:49 pm
Newsgroups: rec.arts.int-fiction
From: Roger <roger.helge...@gmail.com>
Date: Thu, 12 Nov 2009 09:49:52 -0800 (PST)
Local: Thurs, Nov 12 2009 12:49 pm
Subject: Re: I7: Two questions, both of which probably require dipping into I6...
Thanks all, the answers given have been very helpful (exactly what I
needed).

Andrew: I was more curious than anything. I guess I could just use the
printed name property, eh?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ron Newcomb  
View profile  
 More options Nov 12, 1:26 pm
Newsgroups: rec.arts.int-fiction
From: Ron Newcomb <psc...@yahoo.com>
Date: Thu, 12 Nov 2009 10:26:54 -0800 (PST)
Local: Thurs, Nov 12 2009 1:26 pm
Subject: Re: I7: Two questions, both of which probably require dipping into I6...
On Nov 12, 9:49 am, Roger <roger.helge...@gmail.com> wrote:

> Thanks all, the answers given have been very helpful (exactly what I
> needed).

> Andrew: I was more curious than anything. I guess I could just use the
> printed name property, eh?

Printed Name was certainly the first thing that came to my mind.

Also, yay to Victor & whaz-his-email for the nifty code.  Victor you
really ought to wrap that up as an extension.

-R


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Tarbert  
View profile  
 More options Nov 12, 5:47 pm
Newsgroups: rec.arts.int-fiction
From: Mike Tarbert <miketarb...@embarqmail.com>
Date: Thu, 12 Nov 2009 17:47:31 -0500
Local: Thurs, Nov 12 2009 5:47 pm
Subject: Re: I7: Two questions, both of which probably require dipping into I6...

Victor Gijsbers wrote:

> My huge kind-related feature request might make it into Inform 7 one day
> :),

I have it on (ahem) *very* good authority that the I7 kinds mechanism is
being rewritten, presumably for the next release. While I have
absolutely no details, it's my hope that Victor's requests (which he was
kind enough to share with me a while back) will be incorporated in some
manner. :)

In the short - term, packaging up the code upthread as an extension
might turn out to be a waste of time as it will almost certainly not
work with the upcoming release. If Victor's suggestions are implemented,
there will be syntax to do what Roger needs built - into Inform. If not,
it's my plan to update the code as necessary and release that as an
extension. Also, Roger, if you're working on a long - term project, I
would put the code above in a separate, easily identifiable section so
it can be easily edited / excised later.

with fingers crossed and baited breath (whatever that means),
Skinny Mike


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Aikin  
View profile  
 More options Nov 12, 6:44 pm
Newsgroups: rec.arts.int-fiction
From: Jim Aikin <midigur...@gmail.com>
Date: Thu, 12 Nov 2009 15:44:51 -0800
Local: Thurs, Nov 12 2009 6:44 pm
Subject: Re: I7: Two questions, both of which probably require dipping into I6...

Mike Tarbert wrote:

> with fingers crossed and baited breath (whatever that means),
> Skinny Mike

The correct spelling is "bated breath." As in "abate," as in "hold back"
or "restrain."

--JA


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roger  
View profile  
 More options Nov 12, 6:56 pm
Newsgroups: rec.arts.int-fiction
From: Roger <roger.helge...@gmail.com>
Date: Thu, 12 Nov 2009 15:56:35 -0800 (PST)
Local: Thurs, Nov 12 2009 6:56 pm
Subject: Re: I7: Two questions, both of which probably require dipping into I6...
On Nov 12, 5:47 pm, Mike Tarbert <miketarb...@embarqmail.com> wrote:

Actually I hope to be done with this project in less than a week. It's
just a silly little thing but it uses a lot of non-standard stuff so
I've been pushing the envelope of my ever-increasing knowledge of I7
(and I6).

But thank you for the heads up! It's good to know that kinds are being
rewritten. I'm hoping that common properties can apply to different
kinds in this future release (like a "bonus" property that can apply
to multiple kinds - another issue I'm having but have managed to work
around for now).

And again thank you to everyone who provided code, advice, and
information.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Temple  
View profile  
 More options Nov 12, 7:01 pm
Newsgroups: rec.arts.int-fiction
From: "Erik Temple" <ek.tem...@gmail.com>
Date: Thu, 12 Nov 2009 18:01:30 -0600
Local: Thurs, Nov 12 2009 7:01 pm
Subject: Re: I7: Two questions, both of which probably require dipping into I6...

On Thu, 12 Nov 2009 17:56:35 -0600, Roger <roger.helge...@gmail.com> wrote:
> I'm hoping that common properties can apply to different
> kinds in this future release (like a "bonus" property that can apply
> to multiple kinds - another issue I'm having but have managed to work
> around for now).

This is already implemented (in 5Z71 at least; I'm not sure how long ago  
it became possible). I'm doing it in my WIP. Maybe you should post the  
code that's giving you trouble?

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Tarbert  
View profile  
 More options Nov 12, 7:07 pm
Newsgroups: rec.arts.int-fiction
From: Mike Tarbert <miketarb...@embarqmail.com>
Date: Thu, 12 Nov 2009 19:07:25 -0500
Local: Thurs, Nov 12 2009 7:07 pm
Subject: Re: I7: Two questions, both of which probably require dipping into I6...

Jim Aikin wrote:
> Mike Tarbert wrote:

>> with fingers crossed and baited breath (whatever that means),
>> Skinny Mike

> The correct spelling is "bated breath." As in "abate," as in "hold back"
> or "restrain."

> --JA

Ah... thanks, Jim -- I thought it had something to do with fish. ;)

SM


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roger  
View profile  
 More options Nov 12, 7:10 pm
Newsgroups: rec.arts.int-fiction
From: Roger <roger.helge...@gmail.com>
Date: Thu, 12 Nov 2009 16:10:38 -0800 (PST)
Local: Thurs, Nov 12 2009 7:10 pm
Subject: Re: I7: Two questions, both of which probably require dipping into I6...
On Nov 12, 7:01 pm, "Erik Temple" <ek.tem...@gmail.com> wrote:

> On Thu, 12 Nov 2009 17:56:35 -0600, Roger <roger.helge...@gmail.com> wrote:
> > I'm hoping that common properties can apply to different
> > kinds in this future release (like a "bonus" property that can apply
> > to multiple kinds - another issue I'm having but have managed to work
> > around for now).

> This is already implemented (in 5Z71 at least; I'm not sure how long ago  
> it became possible). I'm doing it in my WIP. Maybe you should post the  
> code that's giving you trouble?

Hmm... Well I already edited it out of my code, actually...I'll see if
I re-assemble the issue I was having by tomorrow.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ron Newcomb  
View profile  
 More options Nov 12, 7:22 pm
Newsgroups: rec.arts.int-fiction
From: Ron Newcomb <psc...@yahoo.com>
Date: Thu, 12 Nov 2009 16:22:46 -0800 (PST)
Local: Thurs, Nov 12 2009 7:22 pm
Subject: Re: I7: Two questions, both of which probably require dipping into I6...
On Nov 12, 2:47 pm, Mike Tarbert <miketarb...@embarqmail.com> wrote:

Awesome.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Snacky Pete  
View profile  
 More options Nov 12, 7:26 pm
Newsgroups: rec.arts.int-fiction
From: Snacky Pete <snackyp...@hotmail.com>
Date: Thu, 12 Nov 2009 19:26:32 -0500
Local: Thurs, Nov 12 2009 7:26 pm
Subject: Re: I7: Two questions, both of which probably require dipping into I6...
On Thu, 12 Nov 2009 15:44:51 -0800, Jim Aikin <midigur...@gmail.com>
wrote:

>Mike Tarbert wrote:

>> with fingers crossed and baited breath (whatever that means),
>> Skinny Mike

>The correct spelling is "bated breath." As in "abate," as in "hold back"
>or "restrain."

>--JA

TEACHER!

;)


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Tilford  
View profile  
 More options Nov 30, 4:05 am
Newsgroups: rec.arts.int-fiction
From: Mark Tilford <ralphmerri...@gmail.com>
Date: Mon, 30 Nov 2009 09:05:28 GMT
Local: Mon, Nov 30 2009 4:05 am
Subject: Re: I7: Two questions, both of which probably require dipping into I6...
On 2009-11-12, Andrew Plotkin <erkyr...@eblong.com> wrote:

> Here, Roger <roger.helge...@gmail.com> wrote:

>> 2) Can you convert object names to a text token somehow? I7 doesn't
>> seem to be able to handle any kind of implicit conversion but I'm
>> hoping that I can somehow access the name of an object and store that
>> in a different text variable. Yes? No?

> Do you need to? It will always be cheaper to store the object itself,
> and then print out its name when desired.

Perhaps the object's name might change.

PHOTOGRAPH THE WHITE CUBE
PAINT THE CUBE BLUE
EXAMINE POLAROID PHOTOGRPAH

should describe a white cube, not a blue one.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google