help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Iliad: How do you inspect the contents of your live


From: Stefan Schmiedl
Subject: Re: [Help-smalltalk] Iliad: How do you inspect the contents of your live app?
Date: Thu, 30 Jul 2009 18:08:58 +0200

On Thu, 30 Jul 2009 18:45:48 +0300
Bèrto ëd Sèra <address@hidden> wrote:

> Stefan, it really looks like I'm making a whole bunch of silly

you're asking (almost) exactly the same questions I had a while 
back when I built my first Iliad app, which coincidentally
was my first real use of GNU Smalltalk. I answer because I can,
because it's still relatively fresh in my memory, and another 
real-world app will do both Iliad and gst a lot of good. And not
only because (some quite interesting) bugs are uncovered and fixed,
but also because you bring yet another fresh perspective on how
you'd do things "naturally". Which might lead to some refactoring
making Iliad even better suited for my next project. I'm selfish
that way.

> questions (and consuming lots of your valuable time) simply because
> I'm unable to inspect the live application. Which you appear to be
> perfectly able to do. 

If you run a recent enough gst from git, you'll be able to do what
I've done with the OnlineTester (which grew out of what Joachim did),
but this time you have to look at the very first post

  
http://smalltalk.gnu.org/blog/swsch/onlinetester-arcane-adventure-part-1-environment

The key to happiness here is running the server via gst-remote:

  #!/bin/sh
  SERVERPORT=12345
  gst-load -ivI ot.im OnlineTester
  gst-remote --port=${SERVERPORT} --daemon -I ot.im
  sleep 2
  gst-remote --port=${SERVERPORT} --eval="Iliad.FileHandler filePath: 'public'"
  gst-remote --port=${SERVERPORT} --eval="OnlineTester.OTTest fileIn: 
'doc/einTest.st'"
  gst-remote --port=${SERVERPORT} --eval="Iliad.SwazooIliad startOn: 4080"

As you can see, I'm loading the OnlineTester package (with prerequisites)
into a new image and run this as a background process with gst-remote. 
The last three lines show, how you can interact with it. Basically you
can do everything you can in the REPL by sending it via --eval to a running
gst-remote process.

"Basically", because one thing that you'll probably "regret" is
  gst-remote --eval="ObjectMemory snapshot"
as it terminates all connections, so it is effectively the last
command you're sending to this gst-remote process. Things will
work fine again once the image is restarted, though.

> So probably the one and only question I should
> have asked from the start is: how do you inspect the contents of your
> live app? Emacs?

Personally, I'm a vim guy and there is yet another blog post about a nifty
and tiny tool I'm using to connect vim and gst through screen :-)

It looks like we're both having fun.
s.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]