New child language - (Function member address (structure))

Pages: 1... 89101112... 20
I choose C++.
IMHO, why I have to think up and then finally chose a very ridiculous idea? Simply this is my challenge, this really is my challenge, that is my friend, my secret (lifetime). Of course, all advice (positive or negative) certainly are welcome. During the project : Improve my poor programming skill, relearn missing concepts, work together (more and more efficiently) and much more... :)
Thanks you, Zereo.
I ever did and completed a project and called it "Notepad++". I made it with my friends together (one of them knows how to handle WinAPI text GUI correctly and I appreciated it).

That is my opinion, and also it's my target. About my interpreter's progress, I guess it's about twenty percent (20 %). (Calling function is the hardest problem and now I'm prepairing...)
Last edited on
closed account (3qX21hU5)
Well couldn't understand about half of what you said =/ I think you just claimed you programmed Notepad++ so you must be Don Ho? Since you have all these qualifications your interpreter should be no problem.


2000-01 - DESS Logiciels Fondamentaux, University Paris 7

1999-00 - Master of Computer Science, University Paris 7

1998-99 - Degree of Computer Science, University Paris 7

Computer Skills
Languages: C++, Java,Objective-C, C#, C, XML, SQL, HTML, PHP, and UML
Operation System: UNIX (System V), Linux (Debian), Windows, MacOSX
Library: STL, Win32 API, MFC, wxwidget, ASP.NET
Development Environment: Visual Studio, Xcode, CMake, SVN, Cygwin, vmware, Netbeans, gcc and makefile
Security: smartcard, openssl, PKI, RSA, PKCS#11, certificate and electronic signature

10/2011 until now - 4D : Senior Software Engineer

05/2011 - 10/2011 - Cooperteam : Software Engineer

02/2007 - 04/2011 - Dictao : Senior Software Engineer

11/2006 - 01/2007 - Assystem : Telecom Software Engineer

12/2005 - 11/2006 - VEM Techonologies : Development Team Manager

05/2001 - 11/2005 - Oberthur Card System : Software Engineer/Developer. Smart card personalization.

Haha wow I'm sorry but I'll call bullshit when I see it. I wont preach about taking others advice to you anymore cause I can see its a lost cause and you are just looking for attention
Last edited on
I guess it's about all other Notepad++. The real creator did make it with an already-existing text drawing/lexer handling library called Scintilla, and, tbh, i don't think they were friend besides one ad'ing the other.
Last edited on
I don't really know that Notepad. My "Notepad++" simply is "A small notepad which is done by C++"
There was team, two primary programmers (By that time we was studying C programming and just knew a bit about C++). One about GUI, one about Drawing, and one about Testing & Debugging (Artist)
closed account (3qX21hU5)
Could you send me a download for that Jackson Marie? I have been kind of unfriendly to you so if you can produce your Notepad++ I would love to try it out and take back most of what I said.
Last edited on
Here it is :
Use hotkeys (E.g Open Ctrl + O)
If you need help, please press F1.
This notepad contains many additional features, so probably I will attach my whole interpreter in order to upgrade it to an another project.
It supports images.
It can read Unicode characters (multi-languages) but currently my language list is empty - So I'd like to know some different language fonts for testing. I'll use my special algorithm to detect start-end Font offset, generate font information, then just add it into configuration files (*INI)...
Last edited on
closed account (3qX21hU5)
Thank you Jackson I will check it out after I get off work, Also I hope its not just a .exe (Sorry don't trust you enough for that) and is the actual source code.
Last edited on
Many thanks about union structure (especially hamsterman)... :)

Now, it's time to post your most complex expressions here!!! I'd love to see them and see how actually my interpreter works :)
Last edited on
Hey suddenly I'm very confused :
"Debug" vs "Release"??? I'm currently using "Debug"...
closed account (3qX21hU5)
... debug is for debugging your program and release is for when you release your program... kind of self explanitory I think. If you want more techical info on them there are plenty of posts around about them

I applaud you for challenging yourself with a project but a interpreter might be alittle to challenging right now.
Last edited on
When you're debugging, debug. When you're releasing, release.
"Debug" vs "Release"??? Basically like you said before, EssGeEich and Zereo, "When you're debugging, debug. When you're releasing, release. ". I totally agree.
Many thanks Zereo. You encourage me a lot. :)

Actually In past I was disappointed about the parser speed. It's so slow. So I decided to insert some assembly code, of course in some cases it's very effective. However, "assembly limit" is it cannot access variable inside structures. Some complex expressions I reduced dozens of assembly commands but the parser still runs correctly. Here's one of assembly limit :
__asm mov eax var[0].value //Error
__asm mov eax dword ptr [var[0].value] //Error

int value = var[0].value; //Copy value
__asm mov eax value //Ok 

In my opinion, probably it's not fast, so I don't use it.

Final result : I think it doesn't make any noticeable result.

Next parser optimization is improving some for-while loops. I reversed some for loops and then set up my zero comparison in order to speed up the parsing. But it seems it's a ridiculous idea again, because I can't apply this tweak for primary loop...

I drunk some coffee, and then, implemented the copy constructor idea. Certainly it's a good specific solution especially for for-while script loop. You only need to analyze the expression once. Then the parser will automatically do all for you... :)

Finally I discovered a very magic...magical thing!!! By chance I switched my Debug project mode to Release. Then tested again I didn't believe that it was counting so fast! And I have no idea why the speed between Debug and Release is so different. "Release" I see it's light, fast, only it can't be debugged. And "Debug" programs are only added some debug symbols but they run very slowly (even I run them indirectly). And here is my latest result :

Compare this :

My statistics : (10.000.000 loops)

x = 1+1+1+1+1+1+1+1+1+1

Result : 10
Time : 26.562 sec(s)
Length : 190.000.000
Speed : 376.478 (loops)
Characters per second : 7.153.075 (characters)

y = 1+(((((((((((((((((((((((((((1 * 10)))))))))))))))))))))))))))

Result : 11
Time : 109.735 sec(s)
Length : 620.000.000
Speed : 91.128 (loops)
Characters per second : 5.639.974 (characters)

With complex structure access...

z = num[num[0] + num[1] + num[2] + num[3] + num[4] + num[5]]

Result : 15
Time : 81.313 sec(s)
Length : 610.000.000
Speed : 122.982 (loops)
Characters per second : 7.501.875 (characters)


Result : 38
Time : 126.406 sec(s)
Length : 720.000.000
Speed : 79.110 (loops)
Characters per second : 5.695.932 (characters)

((num+=1) < 10000000) // num = 0

Result : 0 (Last loop)
Time : 24.671 sec(s)
Length : 210.000.000
Speed : 405.334 (loops)
Characters per second : 8.512.018 (characters)
Last edited on
Oh I got a trouble... :(

I'm trying to use these code to call a function :
//dtemp : double
//struct funcParam
//	{
//		vector <Data*> param;
//	};

	if(functionParam.param[i]->type == t_double){

		dtemp = functionParam.param[i]->value.fValue;
		__asm push dtemp
		nStackBytes = nStackBytes + 8;
__asm call printf
__asm add esp, nStackBytes

And then when I call it : (printf returns int)

1. num = printf("The value of %s is %f\n", "M_PI", [double]3.14) Crash!!!!

When I changed it...

2. num = printf("The value of %s is %d\n", "M_PI", [int]3) Okay...

Am I doing anything wrong? Why does the program print string and integer correctly? And decimal... Why does it crash? How to solve that problem?

Many thanks. :)
Last edited on
Wtf, how does this code even compile???
Because float isn't double - Standing to how it looks like.
I'd like to say my database only has chr, lValue and fValue double members. The fValue - say generally it's a decimal, rather than a specific definition type. Float? Already double has a larger range.
Edit : NB : I copied the decimal value (see dtemp). I pushed "dtemp", not param value.
In short the problem is I cannot push a decimal (especially double values) onto the stack correctly...
Last edited on
Is it 32-bit operating system problem?
I say that as I see the complier generates two "push" commands per double... (doesn't push a whole double directly by a single command)

Oh my god... What should I do now?
Last edited on
Why are you pushing things anyway?
Push two parts of the double, one at a time.
But, how to do this? I have no idea what two parts of a double are.
Could you give me an example? :)
Pages: 1... 89101112... 20