Please bear with me Iam just a novice but want to learn. sharkbate24 did you ever find any good information on making your own compiled computer language from purebasic or have any good links with samples ? I have always been interested in doing this and any usefull and simple information is very hard to come by. Iam not looking to make a language to compete against PureBasic I want to do this for a learning experience and to get better at learning programming and theory behind it. Also is there a way to make your own commands in PureBasic so the compiler would see these as native commands and only add the ones you use in your code and not add all the commands in the exe ? Without using DLL's or Lib's. How could I do this ? Any info is greatly appreciated. Thanks for any help anyone can give me on my long search for answers.
If you're a novice why jump the gun by making a compiled language? Why not try your hand at making an interpreted or scripting language instead, probably way easier before you start aiming higher. You probably need to know fasm thoroughly as well as the full PE format specification, not to mention lexical tools like lex or yacc or bison. Scary stuff!!
I'm interested in making a programming language too btw, as far as I can tell only Game Maker allows the average newbie a fast an easy way to implement a scripting language in your own game/application with the 'execute_string()' function. That program was and still is awesome.
I currently only know how to convert expressions from infix to postfix. I guess that's my first step in making a scripting language. If you still want to make a compiled language many ppl recommend this book a.k.a the dragon book :
I'm still studying PureBasic, and I saw a link to thinBasic somewhere from this forum. I then read that thinBasic was created in PowerBasic or something, so now it made me wonder, is it possible to create a programming language in PureBasic? Would be awesome
Yeah it would be great to create such a thing; but just even attempting to do so will give you some idea of just how great Fred is!!
Isn't ThinBasic an interpreted language anyway? So maybe an interpreted/scripting language is all you really want to do. This is certainly possible using Purebasic and there are some basic examples around in the forums on how to start. I don't think I'll be trying to create one anytime soon, PureBasic is just so easy to use once you get used to it.
"What you are is what you have been. What you’ll be is what you do now.” -Buddha
The only reason making a compiler is seen as hard is that all books about the subject teach you to make an industrial-quality compiler instead of a simple one.
On the contrary, tutorials on interpreters teach only simple ones, so interpreters seem easier.
The truth is: Compiling is easy if you don't care about efficiency. Once you do, it becomes hard. Interpreting is also easy if you don't care about efficiency. Once you do, that too, becomes hard.
Also, compiling tends to become much harder when the language you want to compile has complex features (like dynamic typing) while in interpreted language the difficulty is not so much dependent on the language to interpret.
The great thing is, a crappy compiler will easily beat a less crappy interpreter when it comes to program speed. So can be an amateur baker and still have you cake. Just don't take a "byte" out of it...
Trond wrote:The great thing is, a crappy compiler will easily beat a less crappy interpreter when it comes to program speed. So can be an amateur baker and still have you cake. Just don't take a "byte" out of it...
Aye, in a "word", it could be quite a "long" haul whilst ActiveXly involving oneself in such a venture!
I may look like a mule, but I'm not a complete ass.
Well I don't want to "string" this along too much, but his "array" of non-stop puns is a bit of a "hash" really. Course I could be COMpletely barkingly mad here, but I can at least "console" myself that my "preferences" are for compiled languages. The "process" of writing an interpreter is NOT one I would normally "drag and drop" into this kind of "thread", but there you are!
I may look like a mule, but I'm not a complete ass.