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

October 19th -- Stdlib goodness

 
Post new topic   Reply to topic     Forum Index -> MiniD
View previous topic :: View next topic  
Author Message
JarrettBillingsley



Joined: 20 Jun 2006
Posts: 457
Location: Pennsylvania!

PostPosted: Thu Oct 19, 2006 11:00 pm    Post subject: October 19th -- Stdlib goodness Reply with quote

Today was some standard library. I put a bunch of functions in math (really easy), made a "char" library for character classification (which is set as the metatable for the character type, much like the string library is for strings), and added some goodies in the baselib -- namely, functions to check the type of something quicker than with "if(typeof(foo) == "string")", and assert.

I also began the ponderous task of making the compiler accept unicode input text. It looks at the BOM (if any) and determines the encoding, if not in a somewhat more strict manner than DMD does, and right now only ASCII encoding works. I'll have to do some research on unicode surrogates and such so that I can read in a single character and know if I need to read in more to build up a single dchar. It's easier than I expected but.. wouldn't you think that the unicode consortium would have had the foresight to implement some kind of standard BOM that would come at the beginning of every unicode-encoded file? Like if it were always 1 byte, and was just a code which was assigned to each encoding? Just seems dumb to have to write so many lines of code to determine the text encoding.

I'll also be trying to weed out any 'char's throughout the MiniD source and make it entirely dchar-based. Shouldn't take too incredibly long.

Also made accessing characters in string with index expressions part of the language, like I wanted.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> MiniD 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