Page 2 of 5

Posted: Mon Sep 22, 2008 7:25 pm
by Marco2007
srod wrote:I always like writing my own tools - just for the challenge! :wink:
We like that :D

Posted: Mon Sep 22, 2008 7:43 pm
by jack
you could have a look at bint32 by Eros Olmi http://www.jose.it-berater.org/smfforum ... pic=1178.0

Posted: Mon Sep 22, 2008 8:52 pm
by CSAUER
I wrote a scripting language 1 1/2 years ago with OO support written in PB.
I posted this test run:
http://www.xideas.de/purebasic/WASAGOS_ ... esting.zip

Posted: Tue Sep 23, 2008 3:14 pm
by Rook Zimbabwe
Marco2007 wrote:
srod wrote:I always like writing my own tools - just for the challenge! :wink:
We like that :D
+100 :D

Making your own language, updates?

Posted: Fri Aug 28, 2009 1:19 am
by TheCorruptor
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. :D

Re: Making your own language, updates?

Posted: Fri Aug 28, 2009 3:56 am
by Teng
TheCorruptor:

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!! :shock:

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 :

http://www.amazon.com/Compilers-Princip ... 0201100886

Posted: Fri Aug 28, 2009 8:29 am
by rrpl
sharkbate24 wrote:
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.
:)

Posted: Fri Aug 28, 2009 11:28 am
by Trond
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.

Posted: Fri Aug 28, 2009 11:57 am
by srod
I agree with Trond; writing a compiler need not be difficult at all.

Writing a good compiler on the other hand... :wink:

Posted: Fri Aug 28, 2009 12:04 pm
by Trond
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...

Posted: Fri Aug 28, 2009 12:06 pm
by srod
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! :wink:

Posted: Fri Aug 28, 2009 12:14 pm
by Trond
Wow, four puns in a row, here we call that a "quad-pun". I'm not exactly "doubled" over laughing yet, but whatever "floats" your boat...

This is certainly a new "type" of puns. I'll have to "compile" a list!

Posted: Fri Aug 28, 2009 12:25 pm
by srod
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!

:)

Posted: Fri Aug 28, 2009 12:35 pm
by eesau
Wow, this thread is turning really entertaining. Maybe I'll just grab some Kentucky "Fred" Chicken while I read it!

...

*crickets*

Posted: Fri Aug 28, 2009 12:42 pm
by srod
eesau wrote:Wow, this thread is turning really entertaining. Maybe I'll just grab some Kentucky "Fred" Chicken while I read it!

...

*crickets*
hehe. A freak-ishly good suggestion. :)