Making your own programming language...

Programming, for all ages and all languages.
AGI1122

Re:Making your own programming language...

Post 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.
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:Making your own programming language...

Post 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
-- Stu --
AGI1122

Re:Making your own programming language...

Post by AGI1122 »

Actually my system has indexes/keys. Any other things that make it a "waste of time"?
Tux

Re:Making your own programming language...

Post 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.
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:Making your own programming language...

Post 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?
-- Stu --
AGI1122

Re:Making your own programming language...

Post 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.
CrYpTiC

Re:Making your own programming language...

Post by CrYpTiC »

Do you have a link to the site with Turbo Pascal 4
Eero Ränik

Re:Making your own programming language...

Post by Eero Ränik »

[url=http://www.freepascal.org"]Free Pascal[/url] works perfectly with the code...
CrYpTiC

Re:Making your own programming language...

Post by CrYpTiC »

thx for tha link
CrYpTiC

Re:Making your own programming language...

Post 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
Tim

Re:Making your own programming language...

Post 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).
CrYpTiC

Re:Making your own programming language...

Post 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.
CrYpTiC

Re:Making your own programming language...

Post 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]
Tux

Re:Making your own programming language...

Post 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
Tim

Re:Making your own programming language...

Post 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.
Post Reply