[ANN] Amrita2 1.9.2 and reverse engineering

I released Amrita2 1.9.2 and opened the home page of it.

   http://amrita2.rubyforge.org/

This release contains a reverse engineering sample. See this page.

  http://amrita2.rubyforge.org/reverse/reverse.html
   
This page is generated from http://www.ruby-lang.org/ (Have you ever
seen this page before?)

The source and template

  http://amrita2.rubyforge.org/reverse/reverse.rb
  http://amrita2.rubyforge.org/reverse/template.html

These are generated from the rubysite with 'amrita_r': a tool for
reverse engineering with Amrita2. For detail, see

  http://amrita2.rubyforge.org/Reverse.html

···

---
Taku Nakajima

Hmm, looks like a lot of work went into this. As a ruby newbie, though, with
no exposure to amrita before, it looks extremely long-winded to me. Am I
right in thinking that you keep the html template, and load it into amrita,
but also repeat the structure TWICE to explain the dynamism and then the
data?

What advantage does this have over a template file with special block
begin/end tags, and variables? That approach seems much simpler to me.

···

On Friday 04 March 2005 02:47, Taku Nakajima wrote:

I released Amrita2 1.9.2 and opened the home page of it.
[snip]
The source and template

  http://amrita2.rubyforge.org/reverse/reverse.rb
  http://amrita2.rubyforge.org/reverse/template.html

These are generated from the rubysite with 'amrita_r': a tool for
reverse engineering with Amrita2. [snip]

--
Lee.

Taku Nakajima <tnakajima@brain-tokyo.jp> writes:

I released Amrita2 1.9.2 and opened the home page of it.

   http://amrita2.rubyforge.org/

[ ... ]

I have always been happy with Amrita 1.0, and I thank you for all this
work on Amrita2, which looks even better.

I am trying to run the code in Amrita2, but none of the samples are
working for me. I did the install as specified in the README file,
but no matter what I do, I get the following stack trace:

  /usr/local/lib/ruby/site_ruby/1.9/rubygems/custom_require.rb:18:in
    `require__': No such file to load -- json/objects (LoadError)
  from /usr/local/lib/ruby/site_ruby/1.9/rubygems/custom_require.rb:18:in
    `require'
  from /usr/local/lib/ruby/site_ruby/amrita2/js.rb:2
  from /usr/local/lib/ruby/site_ruby/1.9/rubygems/custom_require.rb:18:in
    `require__'
  from /usr/local/lib/ruby/site_ruby/1.9/rubygems/custom_require.rb:18:in
    `require' from /tmp/amrita2:2

After seeing this error, I thought I might need the "ruby-json" module,
which I have installed ... but it doesn't seem to make any difference.
I did this install via rubygems, and the "RUBYOPT=rubygems" environment
variable is indeed set.

By the way, this is version 1.9.3 of Amrita2, from the rubyforge site.

Do you have any idea as to what I need to do in order to get Amrita2
to work on my system?

Thank you very much in advance.

···

--
Lloyd Zusman
ljz@asfast.com
God bless you.

> http://amrita2.rubyforge.org/reverse/reverse.rb
> http://amrita2.rubyforge.org/reverse/template.html
>
> These are generated from the rubysite with 'amrita_r': a tool for
> reverse engineering with Amrita2. [snip]

Hmm, looks like a lot of work went into this. As a ruby newbie, though, with
no exposure to amrita before, it looks extremely long-winded to me. Am I
right in thinking that you keep the html template, and load it into amrita,
but also repeat the structure TWICE to explain the dynamism and then the
data?

What advantage does this have over a template file with special block
begin/end tags, and variables? That approach seems much simpler to me.

Purity. You can load the templates into any XHTML aware editor and not
mangle them that way -- there's no mixed syntax, no funny escaping. Just
pure data. I find that I think about visual design better with no code,
and code better without being distracted by visual design.

It's not for everyone -- so there's erb/eruby and all the other
templating libraries -- but it works really well for me.

Lloyd Zusman Wrote:

[ ... ]

  /usr/local/lib/ruby/site_ruby/1.9/rubygems/custom_require.rb:18:in
    `require__': No such file to load -- json/objects (LoadError)
  from /usr/local/lib/ruby/site_ruby/1.9/rubygems/custom_require.rb:18:in
    `require'
  from /usr/local/lib/ruby/site_ruby/amrita2/js.rb:2
  from /usr/local/lib/ruby/site_ruby/1.9/rubygems/custom_require.rb:18:in
    `require__'
  from /usr/local/lib/ruby/site_ruby/1.9/rubygems/custom_require.rb:18:in
    `require' from /tmp/amrita2:2

After seeing this error, I thought I might need the "ruby-json" module,
which I have installed ... but it doesn't seem to make any difference.
I did this install via rubygems, and the "RUBYOPT=rubygems" environment
variable is indeed set.

I fixed this problem, but I think that my "solution" is actually just a
hack.
Apparently, the 'ruby-json' gem doesn't install itself properly. I don't
know if this problem exists for all installations, or whether this is some
sort of quirk on my own system. At any rate, I took the 'json' stuff
from inside the ruby-json-1.1.1 directory in my gem tree, and I manually
installed it into my site_ruby directory. Then, everything worked fine.

This is what I did:

  cd /usr/local/lib/ruby/gems/1.9/gems/ruby-json-1.1.1/lib
  cp -rp json /usr/local/lib/ruby/site_ruby

All my other gems work correctly, by the way.

···

--
Lloyd Zusman
ljz@asfast.com
God bless you.