salindor's Profile User Rating: -----

Reputation: 46 Craftsman
Group:
Contributors
Active Posts:
301 (0.1 per day)
Joined:
10-November 06
Profile Views:
5,950
Last Active:
User is offline Sep 16 2013 03:14 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Who Cares
Favorite Processor:
AMD
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
75

Latest Visitors

Icon   salindor has not set their status

Posts I've Made

  1. In Topic: supporting wide characters

    Posted 20 Jul 2013

    #define

    thank you, that was exactly the type of article I was looking for.


    Maplestory

    It is going to be an online reading based role-plying game (basically a mud). The first version will be fantasy based, but my intention is to build it as a framework just like how the major 3d games are build these days so other stories can be easily written.

    It will have an html 5 front end but I am letting my brother architect and design that so I can focus on my specialty--the server side. Basically we are each responsible for the part that is our strong suite.

    I give us an 80% chance of completing it. We both work full-time as programmers so there are many days after spending all day programming the last thing you feel like doing is going home and programming more. Also both of us are using this as practice for technologies and techniques we don't currently need at our job. This sometimes causes me to explore things I would be too busy to do when programming professionally. One example is I am writing my own web server so I can truly understand its entire pipeline and practice my art of streamlining it. That ended up costing me two extra months due to all the research in security issues, http protocol, openssl (which accounted for half the time by itself), and simply implementing it.

    Salindor
  2. In Topic: supporting wide characters

    Posted 19 Jul 2013

    Thank you for answering.

    I saw those, but it really didn't help me because
    • I didn't see a function to tell me how to go between the two string types (maybe you can't downgrade a wstring, but at least upgrade a regular string)
    • It doesn't help me understand any issues I may face when converting between the two.


    I was also kind of hoping for C functions instead because C functions tend to give better control over memory management than c++ functions.

    After finding the wctomb, mblen, and mbtowc functions, I started considering the following:
    //copies the BeeString to dest.  if the character can't be converted
    //to an ANSI character, then processing is stopped
    int BeeString::copyTo(char * dest, int maxLen) const
    {
    	//wctomb is guarnteed to be less than MB_CUR_MAX but MB_CUR_MAX is a function call, so
    	//since the original character is wchar_t I figure it can't be more space than what it
    	//is.  May as well multiply that by 10 just to be safe
    	wchar_t storeSpace[10];
    	char * tmp = (char *)&storeSpace;
    	int pos = 0;
    	wctomb(0, 0);
    	for (; pos< (int)length() && pos < maxLen; pos++)
    	{
    		int length = wctomb(tmp, data[pos]);
    		if (length != 1)
    			break;
    		dest[pos] = tmp[0];
    	}
    	if (pos != maxLen)
    		dest[pos] = 0;
    		
    	return pos;
    }
    
    void BeeString::assign(const char * str, int len)
    {
    	mblen (NULL, 0);         
    	mbtowc (NULL, NULL, 0);
    
    	const char * pt = str;
    	while (*pt != 0)
    	{
    		int length = mblen (pt, len);
    		if (length<1) 
    			break;
    		wchar_t dest;
    		mbtowc(&dest,pt,length);
    
    		data.push_back(dest);
    		pt+=length; len-=length;
    	}
    }
    
    


    I don't see anything that says this is bad, and running it through some paces seem to work.

    Salindor
  3. In Topic: Unable to make computer compile nio package

    Posted 19 Jul 2013

    You seem to be in the wrong forum. Javac is a java compiler not a c or c++ compiler. Two different languages. It like going to Spain and wondering why they don't speak Chinese.

    Tim
  4. In Topic: A bit confused why increasing threads isn't improving performance

    Posted 13 Apr 2013

    Thank you for your response. I was constructing the thread pool prior to the timing for exactly that reason.

    Turns out one of my old test cases had left a lingering bug (the algorithm had a bug when handling a Fourier of 1 element). Feel kind of silly now, guess I just needed to try and describe the problem to someone else.

    I am now getting the kind of responses I was expecting.

    Thank you.

My Information

Member Title:
D.I.C Regular
Age:
33 years old
Birthday:
February 6, 1981
Gender:
Location:
florida
Interests:
Cool algorithms, Triathalons, network programming, multiparty cryptography, game development
Years Programming:
15
Programming Languages:
c++, java, C#

Contact Information

E-mail:
Private
Website URL:
Website URL  http://

Friends

Comments

Page 1 of 1
  1. Photo

    jesicalbaby Icon

    16 Sep 2013 - 14:53
    Hello
    My name is Miss jesical,
    i saw your profile today
    and,i fill more interest to contact you ,
    i will like you to please send me
    an email via (jesicalduncan22@yahoo.com)
    for me to send you my picture
    jesicalduncan22@yahoo.com
Page 1 of 1