FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Changes that I'm waiting on.

 
Post new topic   Reply to topic     Forum Index -> Mango
View previous topic :: View next topic  
Author Message
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Mon Jan 23, 2006 5:50 pm    Post subject: Changes that I'm waiting on. Reply with quote

Kris, I've had some changes for the SAX parser sitting on my computer waiting to be committed because they're waiting for other changes in Mango. I've mentioned these before, but they're still stalled. First, my stuff needs a way to output a UniString to a stream. UniString should implement IWritable, and my SAX stuff assumes it does. Next, my stuff also needs some way to determine the output encoding of an IWriter. I submitted a patch to do this, but no changes yet there.

I've been stalled for a few weeks on this. What's up with these changes?

~John Demme
Back to top
View user's profile Send private message Send e-mail AIM Address
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Tue Jan 24, 2006 10:15 pm    Post subject: Reply with quote

Aye ~ sorry about the wait. Have been a bit busy recently, but I'll get something for you soon.
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Tue Jan 31, 2006 4:07 pm    Post subject: Reply with quote

Checked in changes with Reader.getDecoderType() and Writer.GetEncoderType(), along with a change to the UniString class to make it IWritable.
Back to top
View user's profile Send private message
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Tue Jan 31, 2006 4:43 pm    Post subject: Reply with quote

kris wrote:
Checked in changes with Reader.getDecoderType() and Writer.GetEncoderType(), along with a change to the UniString class to make it IWritable.


Great. Thanks, Kris. I'll have some commits soon, hopefully. Of course, I'm really busy now as well.

~John
Back to top
View user's profile Send private message Send e-mail AIM Address
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Fri Feb 03, 2006 11:47 am    Post subject: Reply with quote

I finally had to chance to make sure my SAX encoder works properly. It does, and is now in the repos. The parser also works fine, although it's not a fast as it could be, the API is pretty much set. I'll be working on speeding up the parser soon. (Unfortunately, you probably know that soon for me isn't always all that soon)

Along with it I put in mango.text.ConstString, since I use it in the encoder. It makes outputting in arbitrary encodings easier. I'd like to add some methods to AnonymousString to compare to it ConstString. Probably .equals, .equalsIgnoreCase, .startsWith, .endsWith, .indexOf, and the like. This would imcrease the usefullness of AnonymousString greatly. What do you think, Kris?

~John
Back to top
View user's profile Send private message Send e-mail AIM Address
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Fri Feb 03, 2006 2:21 pm    Post subject: Reply with quote

Code:
Index: mango/text/model/UniString.d
===================================================================
--- mango/text/model/UniString.d        (revision 777)
+++ mango/text/model/UniString.d        (working copy)
@@ -53,6 +53,8 @@

         abstract dchar[] utf32 (dchar[] dst = null);

+       abstract uint getEncoding();
+
         abstract void write (IWriter);
 }

Index: mango/text/AnonymousString.d
===================================================================
--- mango/text/AnonymousString.d        (revision 777)
+++ mango/text/AnonymousString.d        (working copy)
@@ -90,6 +90,17 @@

         /***********************************************************************

+                Get the encoding type
+
+        ***********************************************************************/
+
+       uint getEncoding()
+       {
+               return type;
+       }
+
+        /***********************************************************************
+
                 Set utf8 content

         ***********************************************************************/
Index: mango/text/String.d
===================================================================
--- mango/text/String.d (revision 777)
+++ mango/text/String.d (working copy)
@@ -904,6 +904,22 @@

         /***********************************************************************

+                Get the encoding type
+
+        ***********************************************************************/
+
+       uint getEncoding()
+       {
+               static if( is( T == char ))
+                       return Type.Utf8;
+               else static if( is( T == wchar ))
+                       return Type.Utf16;
+               else static if( is( T == dchar ))
+                       return Type.Utf32;
+       }
+
+        /***********************************************************************
+
                 Set the comparator delegate

         ***********************************************************************/


This would be useful for me. OK with you, Kris?
Back to top
View user's profile Send private message Send e-mail AIM Address
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Fri Feb 03, 2006 2:51 pm    Post subject: Reply with quote

teqdruid wrote:
Along with it I put in mango.text.ConstString, since I use it in the encoder. It makes outputting in arbitrary encodings easier. I'd like to add some methods to AnonymousString to compare to it ConstString. Probably .equals, .equalsIgnoreCase, .startsWith, .endsWith, .indexOf, and the like. This would imcrease the usefullness of AnonymousString greatly. What do you think, Kris?

Sorry, John. ConstString is not something I wish to encourage usage of. Thus, it should not live in the /text package.
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Fri Feb 03, 2006 2:52 pm    Post subject: Reply with quote

teqdruid wrote:
Code:
Index: mango/text/model/UniString.d
===================================================================
--- mango/text/model/UniString.d        (revision 777)
+++ mango/text/model/UniString.d        (working copy)
@@ -53,6 +53,8 @@

         abstract dchar[] utf32 (dchar[] dst = null);

+       abstract uint getEncoding();
+
         abstract void write (IWriter);
 }


This would be useful for me. OK with you, Kris?

Yep.
Back to top
View user's profile Send private message
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Fri Feb 03, 2006 3:07 pm    Post subject: Reply with quote

kris wrote:
teqdruid wrote:
Along with it I put in mango.text.ConstString, since I use it in the encoder. It makes outputting in arbitrary encodings easier. I'd like to add some methods to AnonymousString to compare to it ConstString. Probably .equals, .equalsIgnoreCase, .startsWith, .endsWith, .indexOf, and the like. This would imcrease the usefullness of AnonymousString greatly. What do you think, Kris?

Sorry, John. ConstString is not something I wish to encourage usage of. Thus, it should not live in the /text package.


What's wrong with it? I've found it's great for situations where you want to output text in an encoding to be selected at runtime.
Back to top
View user's profile Send private message Send e-mail AIM Address
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Fri Feb 03, 2006 3:42 pm    Post subject: Reply with quote

Smile

I thought we'd discussed this at length in another thread? The short version is that I'm quite uncomfortable with its approach to handling multiple encodings. Whilst that can be just fine for one specific application, I don't agree with encouraging the approach in the general case.

I do hope that's OK with you.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mango All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group