Slate i18n bootstrap/nagging :)

Lendvai Attila Attila.Lendvai at netvisor.hu
Tue Sep 27 09:00:54 PDT 2005


Hi Olli!

Long time you've been around Slate... what's up with you? Recently I was looking at how your i18n code could be bootstrapped and I think I could start playing with it or help you in the bootstrapping of it.

As a fist question I don't know what internal representation we should use: utf16 or utf8?

Otherwise here's a quick (possibly partial) list of things to do:

In bootstrap.slate:
  - gen generatePrototype: 'String' &layout: VM Bootstrap ByteArray... must be altered to build the proper String prototype (configurable internal representation as an optional quest that makes it even more interesting :)
  - gen@(VM Bootstrap Generator traits) generateLiteral: s@(String traits) must be prepared to encode the string in [utf8/utf16/whatever configured] into the generated ByteArray

FFI:
  - extend the FFI to support encoding conversion for String parameters both in to/from C direction (with a configurable condition/error rised when the conversion turns out to be "lossy")

Without the FFI task done things can work as before if we use UTF8 because its compatible with ANSI as long as no special chars are used.

An open issue: Should the new String still delegate to ByteArray? If not (my vote) is it possible for it to have a slot with a ByteArray storing the encoded representation? (I think yes) Because if it delegates to Sequence as it does currently in the i18n code then Sequence must also be bootstrapped (not preferred, but maybe inevitable).

And what about the current bootstrap process? How mature is it? Is it worth adding the new String code to it or will it change a lot later? I'm thinking of the old dual-heap idea I was pondering about, with an automatic heap minimizer that extracts the new bootstrapped heap from the user heap... So something magic that renders the current one obsolete.

Novo? Should we/I try to proceed with these or find something else for now? Opinions about String representation/layout?

That's it for now,

- 101

PS: I cc this to Olli, in case he's not on the list anymore...




More information about the Slate mailing list