About HugoOnTheWeb

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

User avatar
Tdarcos
Posts: 9341
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

About HugoOnTheWeb

Post by Tdarcos »

<s>Webhugo</s> HugoOnTheWeb is the name I'm using for the system which will run Hugo .hex files from a website. This thread will cover any issues regarding the subject, in case Jonsey doesn't see it in the thread on Caltrops.

Jonsey, go visit http://webhugo.in-the-matter-of.com (or anyone else who wants to look( and tell me what you think of the cheesy menu system. I decided to do both a drop-down and a list so people could use whichever they liked.

Note the message at the bottom of the screen.

Also, pages that would be dangerous to access directly (especially if important POST data was missing) are access guarded; you can't run them directly.

Anyway, now that I've got the menuing system working correctly, it's time to start having the system load and execute the code. It does some of this directly. I came to my senses when I realized that if someone is running a 200K file, I do not want to be transmitting the entire file in POST data, it would be a huge amount of data going over the wire.

From what I'm seeing it will be a PHP application rather than a javascript one except for a few things it will use javascript for at the local display level. This might change if I can figure out that there's a good reason to set it up to run locally and I can arrange it.

----
The singing group Oliver are probably half-naked. They say that even when the sun comes a singing, they'll still be waiting for their jean. Not their pair of jeans, just their jean.
Last edited by Tdarcos on Fri May 25, 2012 6:45 am, edited 1 time in total.
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

Hugellae

Post by Hugellae »

FYI, that name is already in use here:

http://transwebtools.com/webhugo/index.html

and has been for years.

User avatar
Flack
Posts: 8832
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Post by Flack »

He'll just have to go with his backup name, "Windows 7"
"I failed a savings throw and now I am back."

User avatar
Ice Cream Jonsey
Posts: 28923
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

"Unix"
the dark and gritty...Ice Cream Jonsey!

User avatar
Tdarcos
Posts: 9341
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

Hugellae wrote:FYI, that name is already in use here:

http://transwebtools.com/webhugo/index.html

and has been for years.
Yeah, he's been real busy regularly working on this since he last updated his page October 26, 2004. Hell, I could walk when he claimed he started working on this!

Okay, I can change the name to HugoOnTheWeb or HugoWeb if you feel you need something that's not going to be confused with his (essentially defunct) work. Let me know. Right now I can leave it as WebHugo since it doesn't matter what the name is, the name is just a shorthand for "The Web-based interpreter for the Hugo Programming Language" but isn't used as part of the system other than for display purposes.

Also, it looks like it will end up being a Javascript application, I figured out how to allow it to process commands. The next step is to translate the interpreter code into Javascript. There are a lot of things I don't have to worry about like code segment management because I'm not working in a 64-K environment the way DOS was, and I don't have to do memory management and other things.

There are, I think, some differences between C and Javascript and so I'll work on it from the standpoint of being a javascript application.

It's amazing, even in a small program like this, how many false starts, rework and discarded assumptions you end up with. I have about ten php pages for various pieces of the work that are basically superfluous now. They would have been used for some things but won't be of any use now.
Last edited by Tdarcos on Fri May 25, 2012 6:58 am, edited 1 time in total.
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

User avatar
Tdarcos
Posts: 9341
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

I actually have a game selection system and a stabilized game input system running. Next step is to change the game window to allow color selection, but I want to figure a way to do that without damaging the fact that the ability to send a command via pressing ENTER works okay.

I haven't heard any comments about what you think of the way it does input.
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

Hugellae

Post by Hugellae »

Command field allows and executes HTML (FF, IE)

This code: http://www.catswhocode.com/blog/6-html- ... -crash-ie6

input into the command field crashes IE8 and 9 (by crash, I mean leads to a page that reads:

"Cannot start game - nothing specified
You must specify a game to execute. I will redirect you to the main page so you may do so. ")

User avatar
Tdarcos
Posts: 9341
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

Hugellae wrote:Command field allows and executes HTML (FF, IE)

This code: http://www.catswhocode.com/blog/6-html- ... -crash-ie6

input into the command field crashes IE8 and 9 (by crash, I mean leads to a page that reads:

"Cannot start game - nothing specified
You must specify a game to execute. I will redirect you to the main page so you may do so. ")
Thank you. I was trying to get the input routine working and forgot to parse out HTML. I work in Firefox and I don't always test IE as often as I should.

But maybe you have a solution. I need a text input field that can be processed by a javascript function without triggering a submit event. But the problem I have is that apparently an input field won't work in a page outside of a form block, and once you have a form block if the field is struck with enter it generates a submit event. The processing of the event is supposed to return a false causing the submit to be cancelled.

This works correctly in Firefox but trips in IE. I'd like to find a way to have a text field that can pass its value to a javascript program, activates on enter and doesn't trigger a submit event.

By the way, how do you run both IE8 and IE9? Are you using two different computers? My understanding is that because IE is integrated into the system you can only run one version of IE on a system.
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

Bainespal
Posts: 151
Joined: Fri Jul 09, 2010 8:59 am

Post by Bainespal »

Thanks for doing this! We've needed a web interpreter since forever, so this will be great breakthrough.

The file selection and command input interfaces appear to work okay on Chrome.

I assume you're getting the list of games from the IF Archive?

I'm sure it's too early to comment on design, but I don't have a problem with the input/command prompt being separated from the main display window. I kind of prefer it that way; it's how MUD clients work. However, I wonder how it will integrate with Hugo's display properties, specifically, with games that try to design their own windows. But even if the web runner only works for text games, it will be a great breakthrough.

I like the scrollback buffer. I don't know if it will be possible to integrate it with the main design window in the future, but even if it has to be separate, it's good that the feature is already in development.

I'm glad to see this. :)

User avatar
Tdarcos
Posts: 9341
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

Bainespal wrote:Thanks for doing this! We've needed a web interpreter since forever, so this will be great breakthrough.

The file selection and command input interfaces appear to work okay on Chrome.
The only problem - as I said in a long obscenity-filled tirade in another message - is that it doesn't work in Internet Explorer. Everyone says that if you have a submit event with a return false it cancels the submit, which is what I want to do. Internet Explorer is not following this, and nobody ever said this doesn't work with IE.
I assume you're getting the list of games from the IF Archive?
Yeah, I just grabbed a few files for testing purposes so that I could see what was happening and analyze what was going on.
I'm sure it's too early to comment on design, but I don't have a problem with the input/command prompt being separated from the main display window. I kind of prefer it that way; it's how MUD clients work. However, I wonder how it will integrate with Hugo's display properties, specifically, with games that try to design their own windows. But even if the web runner only works for text games, it will be a great breakthrough.
The problem I had was that for a javascript application, if I just kept writing new lines on the screen it eventually causes the screen to have too much material and the scroll bars pop up, so the user then has to scroll down after every input. Keeping about the last 10 or so lines of input/response and having a full scrollback buffer seemed a good compromise.
I like the scrollback buffer. I don't know if it will be possible to integrate it with the main design window in the future, but even if it has to be separate, it's good that the feature is already in development.

I'm glad to see this. :)
I'm glad you liked it. However, if I can't get the EXPLETIVE DELETED Internet Explorer to allow me to have a javascript program that can process typed in information without causing the submit even to be triggered, I'm going to have to abandon it and go to a straight PHP application.

I can't abandon 75% of the people using the Internet just because Chrome and Firefox work correctly and IE does not.
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

User avatar
Ice Cream Jonsey
Posts: 28923
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

As far as I am concerned, abandon IE.
the dark and gritty...Ice Cream Jonsey!

Hugellae

Post by Hugellae »

Not sure where you're getting this '75% of the internet' thing in re: IE. That hasn't been true since around 2005:

http://www.w3schools.com/browsers/browsers_stats.asp

Also, as has mentioned before: jQuery.

User avatar
Tdarcos
Posts: 9341
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

Hugellae wrote:Not sure where you're getting this '75% of the internet' thing in re: IE. That hasn't been true since around 2005:

http://www.w3schools.com/browsers/browsers_stats.asp

Also, as has mentioned before: jQuery.
I don't need to. I went to a page on doing form validation in Javascript, and the exact same page works perfectly on firefox and on IE. So it's something I'm doing in the way I specify parameters or something. I'm not sure what it is, but I will find out.

And the point is, I don't need jQuery or any of these over-complicated frameworks, (unless it's got a built-in routine to pass to in order to get what I want done.) Now, if it's a pure issue of getting IE to handle the procedure call, I suspect something is wrong in what I'm doing.

I just don't know if I need all the overhead of a framework like jQuery unless its got a lot of features I'd have to put in for the rest of the system anyway. I'll take a look at it.
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

User avatar
Tdarcos
Posts: 9341
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

Hugellae wrote:Also, as has mentioned before: jQuery.
Using a framework is great if you can use the functionality. I used jQuery once when I was implementing an AJAX registration server, when the user typed in the selected username, it sent a background request to see if it was available. If it was, the username was changed to green and an OK message was shown, otherwise it changed to red and UNAVAILABLE was shown.

I used it as a cookbook, and I have absolutely no idea how or why it works.

But anyway, I tried using an example with jQuery. Works in Firefox, fails in IE. Not sure why it doesn't seem to work.

I will build a brand-new example and try that.

UPDATE: Did that, and found that IE does have some programmer tools. Discovered that a variable I was using was not declared. Firefox is not strict on this; Internet Explorer is.

So now I can go back and start implementing the system using Javascript.
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

User avatar
Tdarcos
Posts: 9341
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

I lost about a week

Post by Tdarcos »

Because I got a really nasty cold last week, I lost about a week of programming time. Hopefully I have factored it into the original estimate when I took the task on when I gave Jonsey the estimated time over in the thread on Caltrops.

At least it's not a critical issue, I mean, if I'm delayed an extra week it's not going to make a significant difference.

I just knew I wasn't feeling up to doing coding while I was on major occasions hacking, choking and coughing up pieces of lung - or at least, sometimes it felt that way - I did other things. Like finish my latest cooking video.

I was chafing at the bit that I couldn't do any programming last week but I knew I just wasn't up to it.
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

Post Reply