Page 1 of 3

PROSEED - Multi purpose interpreter (WIP) >UPDATE!!!<

Posted: Tue Oct 20, 2009 1:37 pm
by bongomeno
I have tried doing this before, but never got very far.
I am trying to write my own programming language!
This is what I have done...

It is a command line interpreter. Just drag and drop one of the sample programs onto it and watch it run.

It has a simple syntax:
- White spacing may be used.
- Parameters must be separated by colons.
- Each line with parameters must end with a colon.
- Preprocessors are optional, but the program must begin with 'start'
- Preprocessors define max lines, parameters, and variables. (memory)
- The music command is good for making music! :D

LAST UPDATE: 10/28/09
Download it here: http://geekbasic.webs.com/PROSEED.zip

It includes:
- Source code
- Compiled executable
- Four sample programs
- yay!!!

I would post some sample code, but this forum screws up my code every time i post on here.

This was not meant to be anything really useful or special. I KNOW NOBODY WILL EVER WANT TO USE THIS BUT I GOTTA TRY!

Posted: Tue Oct 20, 2009 1:52 pm
by burger2227
Why so complex? You managed to get rid of the quotation marks, but quadrupled the use of colons. Any key using SHIFT is more effort too. I gather that they are parameter markers.

What does \n do?

Try to make it easier to code. That will get you further.

Posted: Tue Oct 20, 2009 7:20 pm
by bongomeno
The use of colons are to separate the parameters. The \n is something I stole from C or C++, it creates a new line. It is a pain to use at first, but it becomes useful once you get used to it.

I could try to use another character to separate the parameters, but I chose the colon because it looks best. Other options could be the semicolon comma or period. None of these use the SHIFT key.

Posted: Wed Oct 21, 2009 1:08 am
by burger2227
I tried C long ago! It is a pain in the ass to use! It requires too many things to do something, but if you code it right, it will work perfectly.

Qbasic was made so that you don't have to tell it that is the end of a line.
Basic is simple and pure! Why create a NEW language that incorporates the WORST of C into a basic language.

QB64 uses C to create a program without the programmer knowing any of the C rules. You will STILL have to be BETTER than the simplicity of basic! That is a BIG challenge to begin with...

EASY is better than HARD! Try to make it easier to use.

Ted

Posted: Wed Oct 21, 2009 1:30 pm
by bongomeno
I know it is not pretty, but my goal here was not to create another BASIC. My goal was to at least make a working language. I plan on making this similar to Python in the way that it will be optionally Procedural or OO. I should be able to create functions or modules like this:

Code: Select all

!maxlines 255
!maxparams 10
!maxvars 255

start module1
 print Here is a message from module 2... : \n :
 run module2
 end
end module1

start module2
 print I am module one : \n :
end module2
or at least something like that... I might even make each module work like a function by adding a 'return' command.

Posted: Wed Oct 21, 2009 2:52 pm
by burger2227
Well, good luck with it. I'm not trying to discourage you! Just try to keep it as simple to use as possible and your efforts may pay off.

Basic is hard to beat for simplicity, but new ideas can also have benefits.

Posted: Thu Oct 22, 2009 7:07 am
by Nodtveidt
The easier the language, the harder the compiler/interpreter. Taking that into consideration...look at how easy HTML is...now make an HTML interpreter. :D A world of difference in terms of challenge. It is not easy to make a BASIC, or even a BASIC-like. That's why there are so few BASIC compilers but so many interpreters...BASIC is far easier to interpret than to compile, though even just interpreting it is a challenge. C has a steep learning curve if you've used BASIC for too long, but once you get over that initial curve, it's easy as pie.

Posted: Wed Oct 28, 2009 1:24 pm
by bongomeno
I have been working on this. I will try to update the post later.

What I have added:
- Custom user functions that return either void, value or variable.
- More support+functions for making games.
- Fixed a lot of bugs.
- Created several more sample programs

Both the new OO style code AND the procedural code will work without modification!

Here is are some code samples to demonstrate the functions...

Code: Select all

start
 call myfunction:void:
end

function myfunction:
 print hey i am in a function!!!:\n:
return
or

Code: Select all

start
 print gimmie a number and i will add 2 to it...:\n:
 input #0:
 call add2:#1:
 print #1:
 print gimmie another and i will divide it by 2...:\n:
 input #0:
 call div2:#1:
 print #1:
end

function add2:
 let #0:=:#0:+:2:
return #0:

function div2:
 let #0:=:#0:/:2:
return #0:

Posted: Wed Oct 28, 2009 10:03 pm
by bongomeno
Ok, I updated the main post. I put it on my website now, so it will stay there forever.

One of the new sample programs, hongpong.mi2 might need slight modification on your computer. If it is too fast or too slow, change variable #11 from 600 to whatever works best for you.

Posted: Mon Nov 02, 2009 6:59 am
by BigBadKing
nice work Bongomeno.

Posted: Mon Nov 02, 2009 10:09 am
by bongomeno
Thank you. I still have to add variables with names rather than #0, #1, #2, etc.. lol.

Posted: Tue Nov 03, 2009 3:03 am
by BigBadKing
Need help on your project? i will be happy to help you, i made alot of fully
functional compilers. well, my knowledge is high enough.

Posted: Tue Nov 03, 2009 9:14 am
by bongomeno
I could use all the help that I can get!
I will need to write a tutorial on how to use it and program with it.

Posted: Tue Nov 03, 2009 12:16 pm
by BigBadKing
Freewebs.com is filtered in my country, so... i cant use your site. you can
email me, though.

Posted: Tue Nov 03, 2009 12:17 pm
by BigBadKing
:(
Freewebs.com is filtered in my country, so... i cant access your site.

:)
you can email me, though.

Posted: Wed Nov 04, 2009 10:54 am
by bongomeno
I did not know that websties could be filtered like that! :shock:

If you want, later I will send you a copy of the Proseed zip file.

download

Posted: Wed Nov 04, 2009 11:41 am
by floogle11
i tried to download it but the application wasnt working so i tried the .bas file and it said the if statement was addvanced so i dont know what to do

Posted: Wed Nov 04, 2009 2:50 pm
by BigBadKing
Thanks Bongomeno, but i already have proseed.zip, had to download it
through some site... but there is something strange about this forum,
it posts my replies twice!

Posted: Wed Nov 04, 2009 6:48 pm
by burger2227
SURE! It also placed the smiley faces too.....

You can remove posts if they are not too old King.

Posted: Wed Nov 04, 2009 7:03 pm
by bongomeno
the version you have might be the old version. when I moved it to my site, it was the new version with functions support and other stuf.

was the site called mediafire?