Page 2 of 3

Re:Making your own programming language...

Posted: Mon Jun 09, 2003 4:25 am
by AGI1122
Well not all hosts offer mysql, heck some hosts don't even offer databases at all. And the minimum php version is 4.1.0 or higher.

Re:Making your own programming language...

Posted: Mon Jun 09, 2003 12:02 pm
by df
if they dont have a DB, let them run yabb perl or something. no DB means no indexes, no keys no nothing. ie: a waste of time

Re:Making your own programming language...

Posted: Mon Jun 09, 2003 12:25 pm
by AGI1122
Actually my system has indexes/keys. Any other things that make it a "waste of time"?

Re:Making your own programming language...

Posted: Mon Jun 09, 2003 7:57 pm
by Tux
Maybe you should be more specific. Do you want to make a compiler? If so, learn asm, some of reverse engineering asm to c++, and find out header setup of exe files for the target system. Here is a head start example of c++ to asm:

Std asm (Needs exe header dbs!!):

;Ifs
jmp execution

main:

push ebp
mov ebp,esp ;stack up
sub esp, 4 ;no extras

mov [ebp ? 4],1988

if_0000:
cmp [ebp ? 4], 2003
jne if_0001
;do in if_0000

jmp if_00over

if_0001:
cmp [ebp ? 4], 1988
jne if_00over
;do in if_0000

if_00over: ;Compiler generated label

mov eax,1 ;return 1
mov esp, ebp
pop ebp
ret

execution:
call main

------------------------------------------

C++:
int main()
{
int a=1988;
if(a==2003)
{
}
else if(a==1988)
{
}
return 1;
}

---------------------------

Now, you can use the quick code I wrote ya to make your own language, but you need to know a little more about your target OS.

Re:Making your own programming language...

Posted: Tue Jun 10, 2003 12:52 am
by df
Chris Cromer wrote: Actually my system has indexes/keys. Any other things that make it a "waste of time"?
so your flatfile system has indexing? as in what? btree indexes? EVI indexing? with primary key, concatenated key indexing? how have you indexed string fields, md5 hash, rc4 hash?

Re:Making your own programming language...

Posted: Tue Jun 10, 2003 9:46 am
by AGI1122
It's more like btree, definately not EVI. It has primary keys and string fields can be indexed as well(unlike in MySQL). And no it doesn't have concatenated keys.

Re:Making your own programming language...

Posted: Tue Jun 10, 2003 12:19 pm
by CrYpTiC
Do you have a link to the site with Turbo Pascal 4

Re:Making your own programming language...

Posted: Tue Jun 10, 2003 12:37 pm
by Eero Ränik
[url=http://www.freepascal.org"]Free Pascal[/url] works perfectly with the code...

Re:Making your own programming language...

Posted: Wed Jun 11, 2003 6:46 pm
by CrYpTiC
thx for tha link

Re:Making your own programming language...

Posted: Wed Jun 11, 2003 6:48 pm
by CrYpTiC
after i learn to make my own compiler and programming language, would it be easier to make a lower level language like assembly or a more complex one like C++....i wanna make a low level one

Re:Making your own programming language...

Posted: Thu Jun 12, 2003 2:09 am
by Tim
It would be easier to make a simpler language -- low-level does not necessarily mean simpler. Compare HLA (low-level yet complex) with BASIC (very high-level yet simple).

Re:Making your own programming language...

Posted: Fri Jun 13, 2003 6:23 pm
by CrYpTiC
oh....well darn lol. I wanted to make a simpler because someone told me that is what I would need to use inorder to aid in writing my os....but thats way on down the line.

Re:Making your own programming language...

Posted: Tue Jun 17, 2003 2:53 pm
by CrYpTiC
[glow=green,2,300]This stuff is confusing. I mean, do I have to use somebody else's compiler to make my own? Is there away to just do it from scratch? Is there anywhere I could get a list of all the basic commands for computers, then I think I could figure it out...Right now I'm really confused....[/glow]

Re:Making your own programming language...

Posted: Tue Jun 17, 2003 5:10 pm
by Tux
Wanna be a real compiler creator like the first one:

1) Get a hex editor
2) Get a list of opcodes and the hex value for each
3) Pick an OS
4) Start hexing out code

OR

1) Use any language
2) Get a good assembler
3) Make a compiler for your language
a. Read file
b. Compile includes
c. Error check
d. Convert to asm
e. Have the assembler assemble the asm code created by the compiler
4) Done!

Get with the times and take a look at the nice languages already out there

Re:Making your own programming language...

Posted: Tue Jun 17, 2003 5:59 pm
by Tim
It's definitely easier to write a compiler which outputs assembly code. That way, you don't need to worry about machine code encodings or writing a linker: you just generate code, and give it to the assembler and linker programs. The link I gave earlier (http://compilers.iecc.com/crenshaw/) does this.