Iliad: How do you inspect the contents of your live app?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Iliad: How do you inspect the contents of your live app?

Bèrto ëd Sèra
Hi!

Stefan, it really looks like I'm making a whole bunch of silly
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. 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?

Berto

--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement
viole les droits du peuple, l'insurrection est, pour le peuple et pour
chaque portion du peuple, le plus sacré des droits et le plus
indispensable des devoirs.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Iliad: How do you inspect the contents of your live app?

Stefan Schmiedl
On Thu, 30 Jul 2009 18:45:48 +0300
Bèrto ëd Sèra <[hidden email]> 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.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk