Milestone

9 views
Skip to first unread message

Todd Sundsted

unread,
Apr 30, 2012, 8:33:37 AM4/30/12
to MOO Talk
This will probably seem un-climactic, but I finally hit a goal with
Stunt | Improvise that I've been aiming at since I started.

This weekend I added HTTP long-polling to Improvise and got the whole
thing to the point where it's possible to run a high-quality, web-
based MOO with nothing but a server and a core database. (If someone
knows how to do this in MOOcode with LambdaMOO/LambdaCore, then bravo!
-- I wish I would have known, because it would have saved me a _lot_
of work. I think I could have pulled it off with GammaMOO and its in-
MOO connections, but by the time I figured that out I was too far gone
with Stunt.)

If a browser supports Flash, the client will use a direct socket
connection. Otherwise, it switches to long-polling. In either case,
authentication is via the web, connections are truly logged-in, and
it's completely legacy code compatible (if the verb code uses
`notify()' it can send output to the browser).

It works with every browser I've tested with (which, in full
disclosure, isn't very many) including Safari on the iphone -- which
means I can now mobile MOO.

Minimizing infrastructure and steps required for a web-based MOO is
IMHO an important prerequisite for adding new members to the MOO
community.

With that out of the way, I'm turning my attention to building a nice
browser-based UI.

Todd

Luke-Jr

unread,
Apr 30, 2012, 9:16:07 AM4/30/12
to MOO-...@googlegroups.com
On Monday, April 30, 2012 8:33:37 AM Todd Sundsted wrote:
> This weekend I added HTTP long-polling to Improvise and got the whole
> thing to the point where it's possible to run a high-quality, web-
> based MOO with nothing but a server and a core database. (If someone
> knows how to do this in MOOcode with LambdaMOO/LambdaCore, then bravo!
> -- I wish I would have known, because it would have saved me a _lot_
> of work. I think I could have pulled it off with GammaMOO and its in-
> MOO connections, but by the time I figured that out I was too far gone
> with Stunt.)
>
> With that out of the way, I'm turning my attention to building a nice
> browser-based UI.

I guess you missed the webserver I wrote for GammaMOO...
http://kids.moo.mud.org/ is 100% MOO-driven.

Josh Benner

unread,
Apr 30, 2012, 9:21:57 AM4/30/12
to Luke-Jr, MOO-...@googlegroups.com
Traditional webservers are short-connection. I think Todd is talking about long connects (think comet and the like). If I understand him, it means you could implement an open-connection interface to the MOO in JavaScript without the need for an intermediary service.

-- 
Josh Benner

--
You received this message because you are subscribed to the Google Groups "MOO Talk" group.
To post to this group, send email to MOO-...@googlegroups.com.
To unsubscribe from this group, send email to MOO-talk+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/MOO-talk?hl=en.

michael munson

unread,
Apr 30, 2012, 9:32:54 AM4/30/12
to Todd Sundsted, MOO Talk
I use a nodeJS application using socket.io to deal with the browser communication as it gracefully tries a bunch of different methods (websockets, flash socket, XHR polling, etc.) The node app serves up the client (initial HTML/JS) and pipes output of the MOO back to the client through JSON.

The MOO does part of it... it has a regexp that looks for ANSI tags (that is to say the ASCII ansi escape sequences) in text outgoing to someone it knows is a webclient, and parses them to form a markup in a JSON object for the client that looks like this:
[{"style":{"color":"#800000"},"type":"span","value":"This text is red"}," This text is not. ",{"style":{"color":"#800080"},"type":"span","value":"This text is dark purple."}]

which the HTML client then decodes as HTML using jQuery.css()

It works pretty well but the client isn't what I'd call ready for primetime yet.


Todd

Luke-Jr

unread,
Apr 30, 2012, 10:17:35 AM4/30/12
to MOO-...@googlegroups.com, Josh Benner
On Monday, April 30, 2012 9:21:57 AM Josh Benner wrote:
> Traditional webservers are short-connection. I think Todd is talking about
> long connects (think comet and the like). If I understand him, it means
> you could implement an open-connection interface to the MOO in JavaScript
> without the need for an intermediary service.

Yes, that's what my webserver does. ;)

It even uses the standard player:tell interface for webapplications.

Luke

Shan Hollen

unread,
Apr 30, 2012, 10:46:46 AM4/30/12
to MOO-...@googlegroups.com
Bravo, Todd. Excellent, excellent stuff. I've been thinking about
porting my core and db to Stunt for a while, and am now ready to make
the move. I have to add some built-ins to Stunt before I can run my
db. I wish I could do it via Plastic, but it shouldn't be a huge job
anyway.

Thanks to you, and everyone, for your continuing fantastic work on MOO.

-Shan

Todd Sundsted

unread,
Apr 30, 2012, 12:21:14 PM4/30/12
to MOO Talk
I'm glad to see the feedback and discussion!

Luke, package that thing up!

All, if you want to try it live, you can hit it at http://stunt.io:8888/

Any feedback on breakage is appreciated. Let me know specific browser
versions and environments, please. I'm writing some MOO tutorial
material there, so ignore the mess. I added the lambdacore package,
so players have access to a few more VR verbs now.

Todd

Josh Benner

unread,
Apr 30, 2012, 1:47:32 PM4/30/12
to Todd Sundsted, MOO Talk
Typing @quit makes all subsequent commands fail. :P

-- 
Josh Benner

Todd Sundsted

unread,
Apr 30, 2012, 2:08:40 PM4/30/12
to MOO Talk
At least it didn't close the browser! :-)


On Apr 30, 1:47 pm, Josh Benner <joshben...@gmail.com> wrote:
> Typing @quit makes all subsequent commands fail. :P
>
> --
> Josh Benner
>
>
>
> On Monday, April 30, 2012 at 12:21 PM, Todd Sundsted wrote:
> > I'm glad to see the feedback and discussion!
>
> > Luke, package that thing up!
>
> > All, if you want to try it live, you can hit it athttp://stunt.io:8888/
>
> > Any feedback on breakage is appreciated. Let me know specific browser
> > versions and environments, please. I'm writing some MOO tutorial
> > material there, so ignore the mess. I added the lambdacore package,
> > so players have access to a few more VR verbs now.
>
> > Todd
>
> > On Apr 30, 10:17 am, "Luke-Jr" <l...@dashjr.org (http://dashjr.org)> wrote:
> > > On Monday, April 30, 2012 9:21:57 AM Josh Benner wrote:
>
> > > > Traditional webservers are short-connection. I think Todd is talking about
> > > > long connects (think comet and the like). If I understand him, it means
> > > > you could implement an open-connection interface to the MOO in JavaScript
> > > > without the need for an intermediary service.
>
> > > Yes, that's what my webserver does. ;)
>
> > > It even uses the standard player:tell interface for webapplications.
>
> > > Luke
>
> > --
> > You received this message because you are subscribed to the Google Groups "MOO Talk" group.
> > To post to this group, send email to MOO-...@googlegroups.com (mailto:MOO-...@googlegroups.com).
> > To unsubscribe from this group, send email to MOO-talk+u...@googlegroups.com (mailto:MOO-talk+u...@googlegroups.com).

Luke-Jr

unread,
Apr 30, 2012, 6:06:10 PM4/30/12
to MOO-...@googlegroups.com
On Monday, April 30, 2012 12:21:14 PM Todd Sundsted wrote:
> Luke, package that thing up!

Here's a release from 2008... I guess I should make a new one that works with
the current GammaMOO.
http://luke.dashjr.org/programs/gammamoo/download/webserv-0.0.1.moo

Paul Rayner

unread,
Apr 30, 2012, 6:24:57 PM4/30/12
to Todd Sundsted, MOO Talk
Todd,
 2 observations/questions?
 
  1. I use enCore MOO - does your code innovation mean we could do away with a Java applet to display content?
  2. You talk about "adding new members to the MOO
    community" - my observation would be that has never been a better time. Across the world, there's an enormous push to again teach kids programming, and newspapers report large numbers of adults joining in as well. Languages like Python are taking off - it sems to me MOO could be well placed to capitalise! A shortage of learning materials is a problem I'm trying to adress for my students.
Paul
 

Todd

--
You received this message because you are subscribed to the Google Groups "MOO Talk" group.
To post to this group, send email to MOO-...@googlegroups.com.
To unsubscribe from this group, send email to MOO-talk+u...@googlegroups.com.

Todd Sundsted

unread,
May 1, 2012, 6:43:02 AM5/1/12
to MOO Talk
Paul,

2) I think a _lot_ about the educational aspect of MOOs. I've
recently reached out to a handful of friends who are not closely
connected to MOO to see if they understand what I'm doing with Stunt.
One of those is a professor at the University of Alabama in Tuscaloosa
who has been involved in educational outreach throughout his academic
career. I'm interested in his feedback on exactly this aspect.

1) Yes, if the purpose is to act as a terminal (I'd check myself, but
I've disabled Java in my browser :-). Although there are other
aspects that would need to be addressed. Stunt doesn't support
Unicode, in particular.

Todd


On Apr 30, 6:24 pm, Paul Rayner <prayner.ba...@gmail.com> wrote:
> Todd,
>  2 observations/questions?
>
>    1. I use enCore MOO - does your code innovation mean we could do away
>    with a Java applet to display content?
>    2. You talk about "adding new members to the MOO
>    community" - my observation would be that has never been a better time.
>    Across the world, there's an enormous push to again teach kids programming,
>    and newspapers report large numbers of adults joining in as well. Languages
>    like Python are taking off - it sems to me MOO could be well placed to
>    capitalise! A shortage of learning materials is a problem I'm trying to
>    adress for my students.
>
> Paul
>

Todd Sundsted

unread,
May 1, 2012, 6:55:01 AM5/1/12
to MOO Talk
Nice!

That license is pretty restrictive though!

Todd

Rob Myers

unread,
May 1, 2012, 2:40:59 PM5/1/12
to MOO-...@googlegroups.com
Is there a packager manager for MOOs?

That would be cool.

:-D

- Rob.

Todd Sundsted

unread,
May 1, 2012, 11:02:50 PM5/1/12
to MOO Talk
There is, although it is in no way widely adopted. It does, however,
cover many of the necessary bases: automatic download of packages from
a repository, automatic relocation of objects and property values, one
line install/uninstall... (I'd love to see it become more widely
adopted :-)

Check out the thread on MOO Talk from ~2 weeks ago titled "Packaging
and Sharing Code".

Todd

Rob Myers

unread,
May 2, 2012, 2:27:35 PM5/2/12
to MOO-...@googlegroups.com
On 05/02/2012 04:02 AM, Todd Sundsted wrote:
>
> Check out the thread on MOO Talk from ~2 weeks ago titled "Packaging
> and Sharing Code".

Thanks, will do! I'll see what else I've missed as well...

And hello to the list. :-)

- Rob.
Reply all
Reply to author
Forward
0 new messages