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

Pages: 1... 1213141516... 20
Jan 11, 2013 at 8:49pm
Illegal then; I thought so. I couldn't remember if it was an error or if it just resulted in undefined behaviour.
Jan 11, 2013 at 10:26pm
closed account (ETAkoG1T)
I saw this thread when it first started, I had no idea what it was about. Still no idea what it is about. And what does New child language mean? Isn't this re-inventing the weel or am I misunderstanding something? I can't just ignore this thread when it is in the top all the time, and sorry for bumping :P
Jan 11, 2013 at 10:30pm
@Filiprei Jackson Marie was mentally abused as a child and this is his revenge.
Jan 11, 2013 at 11:29pm
What? And I am not a boy. /?

EDIT : A new trick has been found!!!!

string.begin()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
vector <char> string (100);
vector <char>::iterator it = string.begin();

strcpy(it,"Hello world!");
int len = strlen(it);

printf("Print directly : %s\n\n", it);

printf("Print letter by letter (regular access) : ");

for(int i = 0;i < len;i++)
     printf("%c", it[i]);
printf("\n");

printf("Print letter by letter (regular vector access) : ");

for(int j = 0;j < len;j++)
     printf("%c", string[j]);
printf("\n");


:)
Last edited on Jan 12, 2013 at 11:23am
Jan 12, 2013 at 12:53pm
I rest my case.
Jan 12, 2013 at 2:10pm
closed account (ETAkoG1T)
Does this language do anything useful? And Jackson Marie you look like you are pretty good at programming why do you do this boring stuff instead of making something useful or fun, like a game!?
Jan 12, 2013 at 2:30pm
A very important notice : CODE STYLE
The most important difference...


Warning : If you put any whitespace symbol between a complex code (e.g function call), probably all code data will be lost (ignored). Because the interpreter is not smart enough to detect an object (what is variable, what is structure, what is function etc). But even this feature is added, most likely it may slow down the interpreter seriously.

So, these code below are always safe :
1
2
3
int a[100];

printf("a[23] = %d",a[23]);


Avoid these examples :

1
2
3
int a [100]; //Ignores anyways.

printf ("a[23] = %d",a[23]); //A redundant whitespace. 
Last edited on Jan 12, 2013 at 2:33pm
Jan 12, 2013 at 2:38pm
Filiprei wrote:
Does this language do anything useful? And Jackson Marie you look like you are pretty good at programming why do you do this boring stuff instead of making something useful or fun, like a game!?


Yes, that is my primary target. :)
Read the idea : "Calling a local (handmade) function" : http://www.cplusplus.com/forum/lounge/85713/13/#msg482841

EDIT :
Wow! I completed successfully the *void feature!!!
Now with void * feature, now my interpreter is able to call some complex functions, for example :

1
2
3
4
5
6
7
8
9
char str[100];
strcpy(str, "Hello");
strcat(str, " world");

int len = strlen(str);
str[len] = '!';
str[len + 1] = 0;

printf("Final result : \"%s\"\n",str);


Output :
Final result : "Hello world!"
:)
Last edited on Jan 12, 2013 at 2:52pm
Jan 12, 2013 at 7:35pm
Jackson Marie wrote:
EDIT : A new trick has been found!!!!

string.begin()


http://www.google.com/search?q=cry&tbm=isch
Jan 13, 2013 at 1:35am
Warning : If you put any whitespace symbol between a complex code (e.g function call), probably all code data will be lost (ignored). Because the interpreter is not smart enough to detect an object (what is variable, what is structure, what is function etc). But even this feature is added, most likely it may slow down the interpreter seriously.
Are you running your tests on a processor you borrowed from a Windows 3.1?
Jan 13, 2013 at 1:56am
????????????What?????????????????
Jan 13, 2013 at 2:08am
Are you running your tests on a processor you borrowed from a Windows 3.1?
I think it's unfair to blame the hardware for the poor performance of shoddy software.
Jan 13, 2013 at 2:27am
What do you mean by "shoddy software"? - Stop this off-topic, and if you want to say something like that, just only show me "yours".

EDIT : Any idea about *void returning value?
Last edited on Jan 13, 2013 at 4:03am
Jan 13, 2013 at 4:27am
Oh, Finally I've completed basic function definition!!!!!!!!!!!!!!!!!!!!!

In short now I can add, edit, modify function list very easily. The structure is formatted by first function character and number of parameters, so accessing a function now is safer and more ultra-fast!!!!!!!

This looks like :

Sample alphabet_A :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function_manager function_library;
#define aaa 'a'
//char *f_access = "access";

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
__Alphabet_A :
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function_library.AddItem(aaa, TWOPARAM, f_access, access, _RETURNS, _BYTESADDITION, T_INT);
function_library.AddItem(aaa, ONEPARAM, f_atan, atan, _RETURNS, _BYTESADDITION, T_DOUBLE);
function_library.AddItem(aaa, ONEPARAM, f_atanf, atanf, _RETURNS, _BYTESADDITION, T_FLOAT);
function_library.AddItem(aaa, TWOPARAM, f_atan2, atan2, _RETURNS, _BYTESADDITION, T_DOUBLE);
function_library.AddItem(aaa, TWOPARAM, f_atan2f, atan2f, _RETURNS, _BYTESADDITION, T_FLOAT);
function_library.AddItem(aaa, ONEPARAM, f_atol, atol, _RETURNS, _BYTESADDITION, T_INT);
function_library.AddItem(aaa, ONEPARAM, f_atoi, atoi, _RETURNS, _BYTESADDITION, T_INT);
function_library.AddItem(aaa, ONEPARAM, f_atof, atof, _RETURNS, _BYTESADDITION, T_DOUBLE);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 


Any idea?
:D:D
Last edited on Jan 13, 2013 at 8:21am
Jan 13, 2013 at 11:46am
Hey I have a question guys....

In short I have no idea why C++ has int*, short*, char*, float* etc, while "pointer" only is unsigned int.
pointer = address

lpint = lpfloat; //illegal

But, is this a problem?

1
2
3
4
void *temp = lpint;
float *ftemp = (float*)temp;
*ftemp = 115.55;
printf("Int pointer carries float : %f", *ftemp)

Printing addresses :
1
2
3
4
5
6
7
8
9
10
int *p;

int a = 1, b = 2, c = 3;

p = &a;
printf("P value : %d\n", p);
p = &b;
printf("P value : %d\n", p);
p = &c;
printf("P value : %d\n", p);


But I want to print the correct form of an address, like this : 0xFDEESAC Is this possible?
Last edited on Jan 13, 2013 at 12:09pm
Jan 13, 2013 at 12:12pm
Pointers are typed so you can safely do pointer arithmetic, assign or dereference them.

The size of a pointer is determined by the memory model, they're not necessarily the same size.

When you pass a pointer to printf, you're bypassing the type system and relying on printf's format specifier to interpret it.
Last edited on Jan 13, 2013 at 12:13pm
Jan 13, 2013 at 12:20pm
I have not been following this thread for a VERY long time, and have been seeing the posts keep piling on. On that note, a few questions:
1) @Jackson, what can your "New child language" do?
2) @Jackson, what is a "child language" Google gives sh*t useless results
3) @Everybody else, it seems to me that this thread is solely JM giving updates. Is this true? if so:
4) @JM why not start a blog? https://www.tumblr.com/
5) @JM could you please show me an example program that currently compiles in your "child language"?
Jan 13, 2013 at 2:29pm
Short answers (I'm going to answer them later)

1) In my opinion :
- Multimedia (music, video)
- Smart program
- Viruses
- DirectX games
- Plugin
- Secret (e.g Password)

2) a "child language" means it's only a "child language" - my useless meaning :)

3) Not false but not completely true.

4) Last project

5) Be patient... Function list - (if-while-for) conditions. Would you like to test a sample program? Perhaps you'll need to wait at least two-three days or more but I'm not sure... :)
Jan 13, 2013 at 2:43pm
So I have read most of this thread (200+ posts is insane) and I really don't get its point? Is this a new language your developing? Or is it like a wrapper of C++ that makes it easier to program? Cause to be honest I really have no clue what it is suppose to do. To my eyes it just looks like C++. I'll admit I'm no expert to C++ so maybe I just don't get it. Also what DirectX options are available in your child language? I've done a few programs with DirectX so am just curious what you have included. Also could you go into detail about it? Sorry I'm just trying to understand what this project is about since it seems like a big thing that keeps coming up.

Anyways keep up the work, and keep programming if anything it will be a good learning experience.
Jan 13, 2013 at 3:28pm
Jackson Marie wrote:
What do you mean by "shoddy software"? - Stop this off-topic, and if you want to say something like that, just only show me "yours".
Helios did show you his, around the start of the thread.
Pages: 1... 1213141516... 20