Hi --

On Wed, 21 Feb 2001, Clemens Wyss wrote:

> Hi,
> RubyCHannel (http://www.ruby.ch) now has yet another demo/test-"service".
> An rwiki which allows embedding ruby interpreted code
> (http://www.ruby.ch/cgi-bin/rw.cgi). Whatever text is enclosed in
> <rbi_code>...</rbi_code>-tags will be put into a (cgi-)form which then
> can be executed making use of the online ruby interpreter. 
> 
> Give it a try and provide feedback on how we could make use of this 
> combination elsewhere. I am open to almost anything ;-)! Is it of any use
> at all? 


Absolutely.  For one thing, I could see this playing a role in the
eventual, elusive, possible on-line snippet collection/garden/clinic.

With that in mind, one enhancement might be to have a way to display
the code and the output at the same time -- say, an <rbi_code_show>
element, such that this wiki input:

   Here's my code and output:
   <rbi_code_show>
   def thing
     puts "hi"
   end
   thing
   </rbi_code_show>

would result in:

   Here's my code and output:
 
   code:
     def thing
       puts "hi"
     end

   output:
     hi

In this scenario, the code would be executed once (when the page was
saved) and the results stored as text.

This could be handy for automatically generating benchmarks during
a discussion of a code snippet, and such things.


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav