Makoto Kuwata | 1 Jul 01:00 2005

[ANN] kwaff1.0.0 - a pretty tool to make XML as easy as YAML to read/write

Hi,

I have released Kwaff 1.0.0.
http://www.kuwata-lab.com/kwaff/

Kwaff is a pretty tool to convert Kwaff format document
into XML document, and also convert XML into Kwaff.
Kwaff format is very friendly for human to read and write
than XML. It makes XML as easy as YAML to read and write.

Example:

  example.kwaff
  --------------------
  * html
    - lang = en
    * body
      * h1 = Title
      * ul
        - class = foo
        * li = text1
        * li = text2
  --------------------

  convert:
  ====================
  $ kwaff example.kwaff > example.xml
  ====================

  example.xml
(Continue reading)

Kyle Heon | 1 Jul 01:53 2005
Picon
Picon

Re: Can you use Erb outside of Apache?

Thanks everyone. One more question.

What, if any, is the difference between Erb and eRuby?

Kyle Heon
kheon <at> comcast.net

-----Original Message-----
From: Jacob Fugal [mailto:lukfugl <at> gmail.com] 
Sent: Thursday, June 30, 2005 11:58 AM
To: ruby-talk ML
Subject: Re: Can you use Erb outside of Apache?

On 6/29/05, Kyle Heon <kheon <at> comcast.net> wrote:
> Nevermind. I figured it out.
> 
> code:
> 
> require 'erb'
>  <at> foo = "Hello World!"
> erb = ERB.new("<pre>foo: <%=  <at> foo %></pre>") erb.run
> 
> result:
> 
> <pre>foo: Hello World!</pre>
> 
> If there is a better way, I'm still open.

You can also use eruby on the command line:

(Continue reading)

James Edward Gray II | 1 Jul 02:17 2005
Picon

Re: Can you use Erb outside of Apache?

On Jun 30, 2005, at 6:53 PM, Kyle Heon wrote:

> Thanks everyone. One more question.
>
> What, if any, is the difference between Erb and eRuby?

ERb is pure Ruby and included with a Ruby install.  eRuby is not  
either of those.

Generally, I say use ERb unless it's too slow for your needs.

James Edward Gray II

googlegroups2sucks | 1 Jul 02:35 2005
Picon

Re: iterators and block arguments

>
> I may actually prefer the underscore; I'm not really sure.  I know I
> prefer `<>' over ` <at> ', and maybe I shouldn't have mentioned the latter.
>
> What do other people think?

alright, all you party people in the house, take note of my syntax:

when i use the underscore or "_" symbol it's in lieu of what i'd
normally UNDERLINE in a full-blown wordprocessor, because the
bare-bones nature of google's posting mini-app doesn't allow it.  when
i want to emphasize the word "duh", i'll type an underscore before and
after, e.g. _duh_.  when i want to interject a thought within a
sentence -- like this -- then i use the hyphen symbol.

i'm starting to see more and more so-called journalists using the
underscore instead of the hyphen symbol and thereby confusing my
carefully considered system of syntax.  besides, it's driving me up the
wall and it must stop.  if you refuse to stop the underscore-for-hyphen
nonsense despite my reasonable request, any goldfish you may or may not
have in your possession will be eaten alive

(p.s. i was thinking of adding a goldfish rape threat in there, but i'm
afraid senator man-on-dog will then be obsessing over man-on-sushi
sexual abnormalities for years henceforth.  poor thing has enough to
worry about these days and i'm not that cruel, you know.)

Greg Chen(China | 1 Jul 03:20 2005
Picon

http://www.rubygarden.org/ now?

you have to ue proxy.

chenge

Dibya Prakash | 1 Jul 03:58 2005
Picon

Re: Programmers Contest: Fit pictures on a page

Hi,
I have used GA for a TSP project and it worked fine for me.i think in
this case also,this should work well.

Do keep posted

Thanks n Regards
Dibya Prakash

On 7/1/05, Belorion <belorion <at> gmail.com> wrote:
> On 6/30/05, Don <donald.welch <at> nospam.hp.com> wrote:
> > I was thinking maybe you could use a genetic algorithm, where the fitness
> > function would caluclate the amount of waste. I'm not very familar with how
> > to implement this sort of thing, though.
> >
> > -Don
> 
> Genetic algorithms are well suited for this.  I've implemented a GA to
> work on the Traveling Salesman
> (http://www.tsp.gatech.edu/problem/index.html) problem(which I do
> beleive is also NP complete) with pretty decent success.
> 
> Matt
> 
>

James Britt | 1 Jul 04:29 2005

Re: [ANN] kwaff1.0.0 - a pretty tool to make XML as easy as YAML to read/write

Makoto Kuwata wrote:
> Hi,
> 
> I have released Kwaff 1.0.0.
> http://www.kuwata-lab.com/kwaff/
> 
> Kwaff is a pretty tool to convert Kwaff format document
> into XML document, and also convert XML into Kwaff.
> Kwaff format is very friendly for human to read and write
> than XML. It makes XML as easy as YAML to read and write.

I looked at the guide, but didn't see anything about entities.  How does 
it handle them?

And is there a mechanism for validation against a Kwaff DTD or schema 
(or the equivalent)?

Thanks,

James
--
http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com  - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com  - Playing with Better Toys

Yohanes Santoso | 1 Jul 05:10 2005

Re: stupid TCP

"Ryan Leavengood" <mrcode <at> netrox.net> writes:

> Joe Van Dyk said:
>>
>> Aha.  I'm guessing it has something to do with not sending the data
>> immediately.  If I do
>>
>> tcp_client.close
>>
>> Then the data gets sent.  But I don't want to close the socket.  And
>> I'm not seeing anything (yet) that would let me immediately send (I
>> tried IO#flush) the data over the socket.
>
> From what I've seen the problem is on the reading end, not the writing
> end. Try just doing

Joe,

Just another thing to note: in TCP, the TCP stack is free to send the
data on the wire whenever it wants to. You can't force it, although
in most TCP stack implementations, a flush() is persuasive enough.

If you want a more guaranteed way of putting data on the wire whenever
you want it, you'd have to use other protocols, like UDP.

YS.

Daniel Brockman | 1 Jul 06:57 2005
X-Face
Picon

Re: shift vs. slice!(0) and others

Eric Hodel <drbrain <at> segment7.net> writes:

>> OT... does anybody else hate it that the String and Array API's
>> have suttle differences and lack methods of the other?

> No, I don't notice it at all.  Strings aren't Arrays and Arrays
> aren't Strings.  They only look the same if you squint really hard.

Which is exactly what Jason was complaining about.
You *shouldn't* have to squint to make them look alike.

--

-- 
Daniel Brockman <daniel <at> brockman.se>

mjmrifai | 1 Jul 08:20 2005
Picon

Re: Time.parse unavailable

Hello Rubers

I am java programmer and I have no idea about Ruby please give some
help.


Gmane