In Inform 7, is it possible to use a second noun construct with "pull"? - inform7

I'll eat my hat if I get a good answer to this...I suspect that although I'm a rank beginner in Inform 7, and I'm guessing this isn't that hard, there are probably not many people here who are familiar with Inform 7. Still, nothing ventured...
I'm trying to create a custom response to a "pull" action. Unfortunately, I think the "pull" action doesn't normally expect a second noun. So I'm trying something like this:
The nails are some things in the Foyer. The nails are scenery.
Instead of pulling the nails:
If the second noun is nothing:
say "How? Are you going to pull the nails with your teeth?";
otherwise:
say "I don't think that's going to do the job."
But while this compiles, and the first part works, the "I don't think..." section is never called...the interpreter just responds "I only understood you as far as wanting to pull the nails." Do I have to create my own custom action for this? Overwrite the standard pull action? Am I missing something simple that will allow me to get this to work?

Have you extended “pull” from the Standard Rules to accept a second noun? As I understand it(*), the standard “pull” doesn't know about “with”. I guess something along the lines of:
Pulling it with is an action applying to two things.
Understand "pull [something] with [something preferably held]" as pulling it with.
Instead of pulling the nails:
say "How? Are you going to pull the nails with your teeth?";
Instead of pulling the nails with something:
say "I don't think that's going to do the job."
*: Warning: I don't understand it at all, and have no idea what I've talking about. :-) I've avoided version 7 of Inform as some kind of Chomskyian nightmare...

Related

Discarding (but not trashing) stories in Pivotal Tracker

I can't figure out how to "discard but keep" a story... I was thinking reject was the answer, but I'm not so sure since when I reject it, the story still sits in my current column with a restart button visible.
Sometimes I go down the wrong track, create a Story (feature) that I realize later I don't need or want. However, I don't want to trash it - I'd like to keep it for future reference, but I want it to go away somewhere - not sit in my current column forever.
Does anyone know how to do this?
Pivotal Support explains just exactly why nobody posted an answer...
Short Answer:
not possible
Long Answer (from Pivotal Support):
Unfortunately there's not a way to archive stories in Tracker and as you've discovered, the reject button doesn't remove stories from
Current.
In these cases we recommend creating a label describing the situation
(“on-hold”, “not reproducible”, won't fix", etc.) to apply to such
stories, and then move the story to the bottom of the Icebox along
with a concise comment explaining the decision (you must "unstart" the
story before it can be moved to the Icebox). You can also use a
release marker in the icebox to separate stories like this from
others, as in the attached screenshot.​
Here is a post by Pivotal themselves that explains what they do with such stories.
https://twitter.com/pivotaltracker/status/337950414244810753
Basically, they mark as duplicate, won't fix, won't implement, etc. After, they set the story points to 0. Then they accept the story so it is still able to be searched on their project. The story points as 0 is important so that accepting the story doesn't increase your velocity for work that essentially wasn't done.
The post is a little old (3 years at time of writing, with 1 year old update), but I haven't found a better way thus far.

When would you use 'Real' translation messages in Symfony2?

The Symfony documentation says:
Using Real or Keyword Messages This example illustrates the two
different philosophies when creating messages to be translated:
$translated = $translator->trans('Symfony2 is great');
$translated = $translator->trans('symfony2.great');
< snip >
The choice of which method to use is entirely up to you, but the "keyword" format is often recommended.
http://symfony.com/doc/current/book/translation.html
So when would you use 'Real' messages?
You really have to decide for yourself. It's a bit a matter of taste and a bit a matter of your translation workflow.
Real messages are good when you don't want the overhead of maintaining an additional translation file (for the origin language). Furthermore, if you forget to translate some of the messages, you'd still see a valid message in the origin language. It's also somewhat easier to translate from an original message rather than a keyword.
Keywords are better when messages are changing often, especially with long texts. You abstract away the purpose of a message from the actual text.
EDIT: there's one more scenario when you could argue that real messages are better than keys - when your website only supports one language but with multiple variations - like en_GB, en_US. Most of the messages will be the same, only few will vary. So most of the messages could be left as they are, and only the ones which are actually different between GB and US put into a translation files. It would require much less work compared to an approach with using keys (of course, assuming your messages don't change very often).
One usecase for the real format I could come up with is when messages are created by users via the UI — it would be silly to force them to come up with keywords for each phrase they want to translate.
I haven't had such a need yet, so I always use the keyword format.
For the most part I agree with #Jakub Zalas' answer, however, the last line is a bit off.
Keywords are better when messages may ever change - not just when changing often. This is outlined as well in the docs themselves:
The second method is handy because the message key won't need to be changed in every translation file if you decide that the message should actually read "Symfony2 is really great" in the default locale.
If the message changes and you haven't used a key but the message as key you have to change any code using this message to reflect that change. More places to change are more potential bugs. We have the ability to build in leverage by using message keys.
Real messages has no big interest. IMO you can use them if you are sure your application will always be mono-language and you want to gain a few minutes in development.
Keyword trans has the interest that if you have to translate your website, you'll see immediately if a translation is missing.
To facilitate translations, I personnaly use JMSTranslationBundle

Classic ASP - Detect line number and file from which a function is called?

Our application is made in good (?) ol' classic ASP. Not ideal but it works and it's pretty stable - has been for 10-15 years. It is not particularly well documented in places, such as where a 'translation' (client-controlled piece of text) appears. All we have against a translation is a clientid and translationid, neither of which are particularly helpful. I've tried searching the (10s of thousands of lines of) core code for gettrans(1) (translation 1) and can see that doing this for another 3100 is going to be a nightmare, not to mention inaccurate as there are many functions which are called with a transid passed into them, and then they call gettrans(transid).
My last thought on this matter is the possibility that we could maybe detect, from gettrans, where a function is called from - not just the line number but the file name of the include (thankfully the includes are named usefully so figuring out where a translation is used should not be too hard!). I highly doubt that it would be possible to get the include name on the basis that includes are processed before ASP, but I'll settle for the overall filename and then we can combine the includes to get to the line of code and log the include file name.
I very much doubt this is possible and can't find anything on SO or Google. Does anyone know of any way to achieve this, or have any pointers on what I might try? Thanks in advance.
Regards,
Richard
Most you can achieve is getting the currently executing script, which can be obtained by:
Dim currentPage
currentPage = Request.ServerVariables("SCRIPT_NAME")
When inside included page it will give you the "parent" page.
However getting "callee" information is not possible with classic ASP as far as I know, so you will have to add another parameter to the function being called then change all calls to pass the parameter in order to identify where it comes from. Looks like someone did something similar and called it ASP Profiler, use it at your own risk of course. (Never tried myself)

How to mark "seen" RSS entries?

So I have played with the idea of making a specialized RSS-reader for some time now, but I have never gotten around to it. I have several project that could benefit from reading feeds in one way or another.
One project for this is an RSS-bot for an IRC-channel I'm on. But I havent quite wrapped my mind around how I can "mark as read" a story, so that it doesn't spit out all the stories in the feed everytime it runs.
Now, I haven't read the specs extencively yet either, so there might be some kind of unique ID I could use to mark the entry as read using a database of some kind. But is this the right way to do it?
From reading the specs for RSS 2.0 at ttp://cyber.law.harvard.edu/rss/rss.html#hrelementsOfLtitemgt it seems each item has a GUID which you can use to know which articles have been read or not.

Printing checks in .Net from blank stock (Not pre-printed checks)

I would like to take blank secure stock paper and convert it in to a check.
I know you can get magnetic toner and print MICR.
The question is
What is the actual font to use or should i get a package and send the data to it to print the check?
Has anybody done it successfully without having to resort to pre-printed checks.
etc..
Given the potential cost of getting this wrong, my first approach would be to buy something in that could do this.
You get something that should work straight away rather than having to develop it and, more importantly, support for when it goes wrong.
Disclaimer - I haven't done any research on this to find out what packages (if any) are out there.
This company sells fonts, paper and MICR fonts. http://www.micrfonts.com/about-micr.htm

Resources