|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#16
|
||||
|
||||
|
hmm maybe a good point.
__________________
IE QUOTE | PHP Manual | Google | C/C++ Compiler | Linux Tutorials | General Stuff Game Dev |
|
#17
|
||||
|
||||
|
Quote:
Now thats interesting ![]() |
|
#18
|
||||
|
||||
|
Quote:
|
|
#19
|
|||
|
|||
|
Evolution of languages
Quote:
As I created my own language (Tyle,Website ) I can say it just started woth a very specific task: the language was used for storing structured data, that could be loaded dynamically from a c/c++ application. The data parser is a .dll that the application uses. Later I added control flow as well. Then I added a standalone shell application, that parses and executes tyle scripts.... In time I used it in more and more totally different applications (windows automation, games, tools, etc.). At this moment I use in a webserver that can execute .tsp pages (tyle server pages, half Tyle, half html), just like .jsp pages in Java. In this webserver I created a wiki tool. I think it proves that a multi-purpose language can be made by one person, and that multi-purpose languages (can) evolve from single-purpose languages. However, I must say that I had the freedom to change the language whenever I wanted, because I was then the only programmer in it. This will change of course when a lot of people will start using it. That is one of the biggest problems on populair languages: it becomes to difficult to improve it without making somebody angry. |
|
#20
|
||||
|
||||
|
Quote:
I dunno about that... You might make one primarily in PHP but with the tree generation and pruning in assembler, as a PHP extension.
__________________
Nothing says CLUELESS NOOB quite as poignantly as $q = "SELECT * FROM users WHERE id = " . $_GET[id]; |
|
#21
|
||||
|
||||
|
Quote:
Last edited by Conundrum : January 24th, 2006 at 01:58 PM. |
|
#22
|
||||
|
||||
|
I think you missed the point
Most programs spend about 90% of their time in less than 10% of the code. That is the 10% that you'd want to write in assembler or C++ The rest really wouldn't matter.
Quote:
|
|
#23
|
||||
|
||||
|
Quote:
But jafet is right, there's no reason to use PHP for a chess playing program ... unless it's an exercise, or in your case, a wrapper. PHP is designed for building web applications, not general purpose apps. It's not the right tool for this job.Last edited by Conundrum : January 24th, 2006 at 07:17 PM. |
|
#24
|
|||
|
|||
|
Quote:
read SICP . Read it again. This is an intro to programming but it contains some pretty deep knowledge about PL theory and practice and signposts in the further reading to more. After ch 3 or 4 there is lots of detail about writing your own interpreter. Dennis Ritchie said something along the lines of 'If you're going to write your own language, do it to understand about compilers/interpreters. Don't do it to create a widely used language cos it won't happen unless you've got a massive organisation to push it. Lots or more beautiful languages than C have fallen by the wayside...' |
|
#25
|
||||
|
||||
|
im no expert, but if i was to make a new language i'd first make an assembler (optional). which i think would hard'ish as finding out what each mnemonic and stuff meant in machine code would be painful (then again you could use someone else's assembler or compiler
). then make a program that could convert your code into another type of code such as C or ASM (preferably asm as it would be more efficient or even better machine code but you'd be making an assembler not a compiler then ) e.g. in my language id have the word "start" at the top of the file, which would be converted into:Code:
#include <stdio.h>
int main()
{
then maybe have the word "sayhello" converted into: Code:
printf("Hello, World!");
then at the end have the word "end" converted into: Code:
return 0; } id then have the code: Code:
start sayhello end which would be the equivalent of: Code:
#include <stdio.h>
int main()
{
printf("Hello, World!");
return 0;
}
you could add as many words to convert as you wanted and maybe give them parameters (recomended ), then pass the converted code into a compiler or assembler, and you would have made a very simple language.Last edited by calpol2004 : February 15th, 2006 at 01:59 PM. |
|
#26
|
||||
|
||||
|
Or you could do with a tool that's ideally suited to handling strings, and therefore great for compiler construction?
![]() Enter Perl. ![]() Parse::Lex might help too ![]()
__________________
~James [Not currently seeking freelance work] Like philosophy or interested in spirituality? Philosophorum. Game Dev Experts Forums Foresight Linux - Because your desktop should be cool! Linux FAQ FedoraFAQ UbuntuGuide |
|
#27
|
||
|
|