TAKAHASHI Masayoshi <maki / inac.co.jp> writes:

> Hi,
> 
> Dave Thomas <Dave / PragmaticProgrammer.com> wrote:
> > So, I'm proposing that we include these in the Ruby core, and
> > therefore make them globally available. The expat license allows this,
> > so I suspect the main problem might be one of size (expat will add
> > about 200k to the download).
> 
> Apart from this library's size, I think there are more two issue.
> 
>  * Expat
> 
> Expat is shared library like gdbm, Tk, GTk or GNU readline.
> These libraries is not included in Ruby core. Should we
> include expat into Ruby core?

If that's what it takes, I'd say 'yes' (although during the build
process, perhaps we should look for an already installed and
compatible expat and use that if available).

>  * Uconv
> 
> When Japanese use XMLParser, we usually use Uconv module too,
> because we need to convert legacy character encoding <-> Unicode.
> Without Uconv, to include XMLParser in Ruby core is not useful,
> at least to me.
> But Uconv is too big to include Ruby core...

Perhaps it should be included. You could reduce the size of uconv
dramatically by removing the comments and whitespace from the u2xxx.h
files.

  0x003b, /* U+003b */
  0x003c, /* U+003c */
  0x003d, /* U+003d */
  0x003e, /* U+003e */
  0x003f, /* U+003f */
  0x0040, /* U+0040 */
  0x0041, /* U+0041 */
  0x0042, /* U+0042 */
  0x0043, /* U+0043 */
  0x0044, /* U+0044 */                /* 230 bytes */

=>
                                      /* 50 bytes */
0x3b,0x3c,0x3d,0x3e,0x3f,0x40,0x41,0x42,0x43,0x44,

=>
                                      /* 29 bytes */
59,60,61,62,63,64,65,66,67,68


You could reduce them down even further by run-length encoding the
table for distribution, and then expanding it during installation.

If the stuff included in the 'ext' directory is chosen based on need,
then I'd rank XML/UConv support over Tcl/Tk and dbm/gdbm/sdbm support.


Dave