I was poking around the Inform source last night, looking at the veneer code and remembering that some of the message passing it does does not work on v3 story files.
I was wondering if it’s simply because the check_arg_count function added in v5 doesn’t exist in v3?
But since v3 supports initial values for parameters, couldn’t we implement a cheesy version of check_arg_count by having the functions initialize locals to (say) 0xFEFE or some other “unlikely” value and then test against that to see if a parameter was present?
To whoever fixed my tagging, thank you. Also, how do you flag a post as a “Solution”? Do you edit your original post, or click somewhere on the post that is the solution?
EDIT - not sure how I missed this before, but the “ Solution” checkbox that appears under every reply until you tick one seems to be the ticket.
EDIT 2 - Now I’m confused. Some other threads where I asked questions don’t have the Solution tick box. Weird.
EDIT 3 - looks like posts “lock” after some length of time (and you can’t edit them further) which makes sense, and that’s probably when the Solution tick box no longer appears.
About that constrained, although the complicating factor is I want to author on a similarly constrained platform as well.
My platform of choice is either a Raspberry Pi Pico (256k RAM, 2M of code+readOnly data) or possibly an ESP32 variant (also about that much). I’m not expecting authoring to work on an Apple ][ though.
Don’t punish yourself. Do all your authoring on a modern platform (Linux, Mac, Windows) and deploy to constrained 8- and 16-bit platforms if you wish. You can also use the web-based borogove.
LOL, fair point. I have seriously questioned how much “development” I want to do on a handheld device.
I have this glorious vision of being able to fill my spare moments typing away on a tiny keypad, making my magnum opus better every day.
In practice, however, I’ll probably fill my spare moments either here or on boardgamegeek.
Oh, hey, I recognize that avatar! I’ve poked through several of your PunyInform git repo’s, thank you for making the code available. In your submarine game, I’m curious why there are several parsing constructs that try to skip past all the synonyms for “submarine” or “dead bodies” etc?
I just noticed that borogove is using a pretty old compiler and libraries if you’re using Inform 6, so it’s probably best to use a desktop or laptop with the latest compiler and library, as there are more optimisation options with these..
Maybe setup an environment where you can code on your portable device, and have it contact a server for compilation, or just update your source code on the go, but compile when you get back to a “normal” computer.
The devices in question intentionally don’t have internet support, so that I can’t be constantly distracted by things like intfiction.org.
Also, I’m a programmer by trade. My backup plan (in the late 80’s) was creative writing, but programming turned out to be far more lucrative for me. I’ve always been fascinated by interactive fiction though. I wrote a really simple “authoring system” when I was a teenager (similar to one published in an ancient ZX81 programming book… even simpler than the Scott Adams format) and have “bounced off” of more complex ideas until I discovered TADS in the 90’s. I think there’s still a contribution in the ifarchive for TADS footnotes I contributed ages ago.
Anyway, it’s probably a silly endeavor that will go nowhere but you might see a finished .z3 story from me in time for next year’s competition.
The short version is that the object-oriented features were only added to Inform after version 3 support had been effectively abandoned—the library had just gotten too heavy for version 3 to be useful. Later, new libraries like PunyInform were developed, and people discovered that the version 3 compiler was broken (as in it couldn’t produce version 3 files any more), because it hadn’t been tested through the last several changes.
So version 3 support was fixed in the compiler, for use with libraries like PunyInform, and in theory PunyInform could make message-passing work on version 3 if it wanted. (You can kind of get around the lack of @call_vs2 by pushing all your arguments onto the stack, then popping them off again.) But the object-oriented features of Inform are a big part of why the default library doesn’t work on version 3 any more, so there hasn’t been much demand for it.
Note that message passing works for z3 with PunyInform, with limitations. You can send a message with 0 or 1 arguments only. E.g. Coinstack.add_coins(5); works fine. The dynamic object creation/destruction system can’t be used. Since PunyInform wasn’t designed to handle groups of identical objects, making dynamic object creation work never seemed like a high priority.
You can’t use the stack for passing arguments, since every stack frame has its own private part of the stack. What we’ve done in a few places in PunyInform, is use global variables to pass values.