intfiction.org
https://www.intfiction.org/forum/

Glk extension idea: Out-of-band messaging
https://www.intfiction.org/forum/viewtopic.php?f=38&t=25352
Page 1 of 1

Author:  Dannii [ Fri Jan 12, 2018 11:09 pm ]
Post subject:  Glk extension idea: Out-of-band messaging

Have you ever wished you could send logging messages before the Glk window system is initialised? Or that it was easier and more reliable to display error messages in your Glk-using VM?

I've had questions like this when working on my Emglken project. Git by default uses printf to display errors, which adds a huge amount of code to the Emscripten compiled Javascript. Glulxe on the other hand creates a new window for error messages, and in the Glk library I'm developing opening new windows is an asynchronous action, meaning almost the entire Glulxe codebase would have severe performance issues.

So I had the idea of defining a few additional functions for sending logging and error messages out-of-band, ie, outside the Glk window system. These functions would be fast and safe to call at all times.

Read the draft specification here.

As it is modelled on GlkOte, there are three severity levels, and I added a function for cancelling warnings because GlkOte does, even though I'm not too sure when that would be useful.

Thoughts and question?

Author:  Draconis [ Sat Jan 13, 2018 11:58 am ]
Post subject:  Re: Glk extension idea: Out-of-band messaging

I like the idea! I'm remembering the headache of debugging problems that occurred before the main window opened; functions like this would make it so much easier.

Author:  Dannii [ Sat Jan 13, 2018 11:49 pm ]
Post subject:  Re: Glk extension idea: Out-of-band messaging

For Inform 7 texts with substitutions, what is the most natural type of Glk API? Should I add buffer (ie, pointer + length) functions for that?

Author:  Draconis [ Sat Jan 13, 2018 11:58 pm ]
Post subject:  Re: Glk extension idea: Out-of-band messaging

It seems like using the stream should be sufficient for that? Just switch on the message stream and use the usual printing functions.

Author:  Dannii [ Sun Jan 14, 2018 12:11 am ]
Post subject:  Re: Glk extension idea: Out-of-band messaging

Maybe. I couldn't remember if Inform 7 normally buffers it first or not.

Page 1 of 1 All times are UTC - 6 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/