[#83328] tcltklib and not init'ing tk — aakhter@... (Aamer Akhter)

Hello,

13 messages 2003/10/01

[#83391] mixing in class methods — "Mark J. Reed" <markjreed@...>

Okay, probably a dumb question, but: is there any way to define

22 messages 2003/10/01
[#83392] Re: mixing in class methods — Ryan Pavlik <rpav@...> 2003/10/01

On Thu, 2 Oct 2003 06:02:32 +0900

[#83397] Re: mixing in class methods — Gavin Sinclair <gsinclair@...> 2003/10/01

On Thursday, October 2, 2003, 7:08:00 AM, Ryan wrote:

[#83399] Re: mixing in class methods — "Mark J. Reed" <markjreed@...> 2003/10/02

On Thu, Oct 02, 2003 at 07:37:25AM +0900, Gavin Sinclair wrote:

[#83404] Re: mixing in class methods — "Gavin Sinclair" <gsinclair@...> 2003/10/02

> On Thu, Oct 02, 2003 at 07:37:25AM +0900, Gavin Sinclair wrote:

[#83416] C or C++? — "Joe Cheng" <code@...>

I'd like to start writing Ruby extensions. Does it make a difference

32 messages 2003/10/02
[#83435] Re: C or C++? — "Aleksei Guzev" <aleksei.guzev@...> 2003/10/02

[#83448] xml in Ruby — paul vudmaska <paul_vudmaska@...> 2003/10/02

The biggest problem i have with Ruby is the sleepness

[#83455] Re: xml in Ruby — Chad Fowler <chad@...> 2003/10/02

On Thu, 2 Oct 2003, paul vudmaska wrote:

[#83464] Re: xml in Ruby or no xml it's just a question — paul vudmaska <paul_vudmaska@...> 2003/10/02

>>--------

[#83470] Re: xml in Ruby — paul vudmaska <paul_vudmaska@...>

>>>

15 messages 2003/10/02

[#83551] xml + ruby — paul vudmaska <paul_vudmaska@...>

>>---------

20 messages 2003/10/03
[#83562] Re: xml + ruby — Austin Ziegler <austin@...> 2003/10/03

On Fri, 3 Oct 2003 16:11:46 +0900, paul vudmaska wrote:

[#83554] hash of hashes — Paul Argentoff <argentoff@...>

Hi all.

18 messages 2003/10/03

[#83675] fox-tool - interactive gui builder for fxruby — henon <user@...>

hi fellows,

15 messages 2003/10/05

[#83730] Re: Enumerable#inject is surprising me... — "Weirich, James" <James.Weirich@...>

> Does it surprise you?

17 messages 2003/10/06
[#83732] Re: Enumerable#inject is surprising me... — nobu.nokada@... 2003/10/07

Hi,

[#83801] Extension Language for a Text Editor — Nikolai Weibull <ruby-talk@...>

OK. So I'm going to write a text editor for my masters' thesis. The

35 messages 2003/10/08
[#83803] Re: Extension Language for a Text Editor — Ryan Pavlik <rpav@...> 2003/10/08

On Thu, 9 Oct 2003 05:06:32 +0900

[#83806] Re: Extension Language for a Text Editor — Nikolai Weibull <ruby-talk@...> 2003/10/08

* Ryan Pavlik <rpav@mephle.com> [Oct, 08 2003 22:30]:

[#83812] Re: Extension Language for a Text Editor — Ryan Pavlik <rpav@...> 2003/10/08

On Thu, 9 Oct 2003 06:09:29 +0900

[#83955] Re: Extension Language for a Text Editor — Nikolai Weibull <ruby-talk@...> 2003/10/09

* Ryan Pavlik <rpav@mephle.com> [Oct, 09 2003 09:10]:

[#84169] General Ruby Programming questions — Simon Kitching <simon@...>

21 messages 2003/10/15
[#84170] Re: General Ruby Programming questions — Florian Gross <flgr@...> 2003/10/15

Simon Kitching wrote:

[#84172] Re: General Ruby Programming questions — Simon Kitching <simon@...> 2003/10/15

Hi Florian..

[#84331] Re: Email Harvesting — Greg Vaughn <gvaughn@...>

Ryan Dlugosz said:

17 messages 2003/10/21
[#84335] Re: Email Harvesting — Hugh Sasse Staff Elec Eng <hgs@...> 2003/10/21

On Wed, 22 Oct 2003, Greg Vaughn wrote:

[#84343] Re: Email Harvesting — Ruben Vandeginste <Ruben.Vandeginste@...> 2003/10/22

On Wed, 22 Oct 2003 08:35:32 +0900, Hugh Sasse Staff Elec Eng

[#84341] Ruby-oriented Linux distro? — Hal Fulton <hal9000@...>

There's been some talk of something like this in the past.

15 messages 2003/10/22
[#84348] Re: Ruby-oriented Linux distro? — Gavin Sinclair <gsinclair@...> 2003/10/22

On Wednesday, October 22, 2003, 6:01:16 PM, Hal wrote:

[#84351] Re: Ruby-oriented Linux distro? — Andrew Walrond <andrew@...> 2003/10/22

On Wednesday 22 Oct 2003 11:02 am, Gavin Sinclair wrote:

[#84420] Struggling with variable arguments to block — "Gavin Sinclair" <gsinclair@...>

Hi -talk,

18 messages 2003/10/24
[#84428] Re: Struggling with variable arguments to block — matz@... (Yukihiro Matsumoto) 2003/10/24

Hi,

[#84604] ruby-dev summary 21637-21729 — Takaaki Tateishi <ttate@...>

Hello,

21 messages 2003/10/30
[#84787] Re: ruby-dev summary 21637-21729 — Paul Brannan <pbrannan@...> 2003/11/06

On Fri, Oct 31, 2003 at 07:01:28AM +0900, Takaaki Tateishi wrote:

[#84789] Re: ruby-dev summary 21637-21729 — matz@... (Yukihiro Matsumoto) 2003/11/06

Hi,

[#84792] Re: ruby-dev summary 21637-21729 — Paul Brannan <pbrannan@...> 2003/11/06

On Thu, Nov 06, 2003 at 11:17:59PM +0900, Yukihiro Matsumoto wrote:

[#84794] Re: ruby-dev summary 21637-21729 — matz@... (Yukihiro Matsumoto) 2003/11/06

Hi,

Re: xml + ruby

From: ser@... (Sean Russell)
Date: 2003-10-07 01:43:51 UTC
List: ruby-talk #83736
Hey.

Thought I'd drop in on this discussion.  There are several threads in
the newsgroup on the topic of the least intrusive API for XML in Ruby.

What I'm understanding is that there are people who want to hide the
XML details of XML whilst in Ruby.  This sounds a lot to me like
serialization, and that's a layer above what XML packages provide.  A
serialization package, with minimal intrusion, could provide some
support for namespaces and attributes, and would look a lot like what
the minimalists (as in minimally intrusive) are asking for.

Users of XML can generally be divided into two broad camps.  There are
those who have some data, and they more or less want or need it to be
XML at some point.  On the other side are people who are dealing with
the XML without being too concerned with the content.  For those in
the first camp, serialization is a great solution.  Those in the
second camp need more control over the data, and a specialized API is
more appropriate.  If you've contemplated using YAML instead of XML,
your probably in the first camp.  A common reason for being in the
second camp is that you're getting your data from somewhere else.

In my experience, an XML API can be abstracted only so much before you
begin to loose control over the finer details.  High level APIs are
great for simple documents, but begins to break down when one
introduces comments, processing instructions, entities, and mixed
content.  I'd go a step further and suggest that any sufficiently
abstracted API that entirely hides the XML details of an XML document
will be insufficient to handle all possible legal XML documents.

All that means, though, is that an API that high-level is insufficient
as the only API available for dealing with XML.  What that means to me
is that the high-level API should sit on top of another API that
provides finer control.  It doesn't mean that the high level API isn't
useful or shouldn't be written.

By the way, I did try to write a transparent API for REXML a couple of
months ago; it looked something like this:

	a = Node.new
	a << "B"                # => <a>B</a>
	a.b                     # => <a>B<b/></a>
	a.b[1]                  # => <a>B<b/><b/><a>
	a.b[1]["x"] = "y"       # => <a>B<b/><b x="y"/></a>
	a.b[0].c                # => <a>B<b><c/></b><b x="y"/></a>
	a.b.c << "D"            # => <a>B<b><c>D</c></b><b x="y"/></a>

I didn't get very far with it; it seemed like terrible hacks were
needed to implement it, and I'm not sure I want to maintain that code,
but if there's enough interest, I might revive it.

In the opposite end of the spectrum is an API that is heavily tied to
XML technology, like XPath:

	a = Tree.new( "/a/b[2][ @x = 'y' ]" )  # <a><b/><b x="y"/></a>
	a[ "/a/text()" ] = "B"                 # <a>B<b/><b x="y"/></a>
	c = a[ "/a/b/c" ]             # <a>B<b><c/></b><b x="y"/></a>
	c[ "text()" ] = "D"           # <a>B<b><c>D</c></b><b x="y"/></a>

Not so nice for constructing documents, but almost peerless for
accessing nodes.

Of course, there are other, more pressing, issues that don't let me
play too much with this stuff; things like validation, bug fixes,
optimizations, XPath support in the streaming APIs, a good lightweight
API... any number of things.

Anyway, diversity is good.

In This Thread