"Pe, Botp" <botp / delmonte-phil.com> wrote:
> Simon Strandgaard [mailto:neoneye / adslhome.dk] wrote:
>  
> > > play with regexp online:
> > > http://neoneye.dk/regexp.rbx
> > > 
> > Why did you played with regexp on the demo site?
> > 
> 
> the regexp page is very helpful, cool really. 

I am happy that you like it :-)

I have been thinking about extending it so it can explain in more verbose
what a regexp does. See this url for example:
http://rubyforge.org/tracker/index.php?func=detail&aid=383&group_id=18&atid=152



> I hope you can do something like this for your other packages as well
> (aeditor eg, -who knows aeditor may just run on a browser!). This way,
> people can see your contribs in action before they download just to test.
> And since you know your product better, you can display/demo all the needing
> testings. And they can thus say "ah, it's working". [I hope other packagers
> will have some demo page as well. Is this possible w Rubyforge or
> something??]. Hope I wasn't asking too much :-)

An editor web frontend, that new. Its sligthly more complex to move a cursor around,
and send the position back to a server, rendering and transfer buffer text.
It may require either JavaScipt or Java. I rather spend some time on finishing
the sub-components: regexp, rubyembed, coverage...  Sorry no web frontend this time.
I could make some animated gif's, or a whole movie of the editor in action?

However you are on to something, AEditor is too complex to install, because
of the dependency on Ncurses. I have long been thinking about making a frontend
for Curses which is distributed with Ruby, so that compilation of Ncurses can
be avoided. However I plan to make a Fox widget, which can do some nice antialiased 
rendering and do other fancy graphics stuff.  However regexp has top priority.


> 
> I'm testing the sample. And the regexp.tree is cool :-)
>
 
Great. BTW: Do you have ideas to how 'regexp.tree' can be made even cooler ?



> I've modified a bit the interactive.rb to include this:
[snip patch]

Thanks for the patch.. I have added it ;-)

server> patch interactive.rb x
Hmm...  Looks like a normal diff to me...
Patching file interactive.rb using Plan A...
Hunk #1 succeeded at 18.
done
server> ruby interactive.rb 
Syntax is: interactive <regex> <string>
defaulting to '((ab)*x)'+ for <regex>
defaulting to '0ababxx1' for <string>

+-Repeat greedy{1,-1}
  +-Group register=1 
    +-Sequence
      +-Repeat greedy{0,-1}
      | +-Group register=2 
      |   +-Sequence
      |     +-Literal "a"
      |     +-Literal "b"
      +-Literal "x"
0<<ababxx>>1
["ababxx", "x", "ab"]
server>


> 
> btw, a stupid question: how do you run the web_interface.rb? I'm using
> windowsxp actually.
> 

I run it via 'mod_ruby' through apache. I think it also can be run with FastCGI, but
I have never tried it out. I have made a link named 'regexp.rbx' pointing at that
file in my www folder.
Bommer, I forgot to write these instructions in the top of 'web_interface.rb'.


botp, Thanks for your reply, It has been helpful to me.

--
Simon Strandgaard