Page 1 of 1
PureBasic Licence Question
Posted: Sat Jun 11, 2005 11:12 am
by Killswitch
Hey,
I'm currently sitting my GCSEs, which are pretty important exams for anyone who doesn't know, anyway when I'm finished I'm going to have a three month long summer. I've been trying to come up with a coding project that can keep me occupied while I'm not out partying, and I came up with an idea.
I'd like to write my own programming language in PureBasic. Nothing too complex, just a simple interpreter + a few commands. I'd just like to know if its alright to do this with PureBasic. I have no plans to make this a commercial project, but I would like to release it as a freebie so others can enjoy it.
Would be this against the PB licence? Bearing in mind I'm not going to do something like this:
*My command* PrintX("")
*PB Code*
procedure PrintX(a.s)
printn(a.s)
endprocedure
As I know this is against the PB licence, I'd like to write the majority of commands myself instead of wrapping PB ones.
Any help on this matter would be greatly appreiciated.
Posted: Sat Jun 11, 2005 11:25 am
by Polo
If you write the commands yourself, meaning if you're not wrapping PB's own commands, it is ok, I think.
You should wait until Fred as answered, but someone has done the same in the past (but he was doing a commercial product), and Fred said it was ok.
Posted: Sat Jun 11, 2005 11:34 am
by Killswitch
That's cool, I'll wait on Fred's so say though.
I'm planning to do a Basic Language with a slightly more complex syntax to make it easier for people to progress to other languages like C or Java. Sound like a good idea?
Posted: Sat Jun 11, 2005 11:44 am
by Polo
It sounds good, but try to optimize your interpreter a lot, because this will not be as fast as a PB produced code.
I hope you'll manage to finish your project, sad BaldrogSoft is not there anymore, he was doing the same as you..
Posted: Sat Jun 11, 2005 11:44 am
by thefool
of course its allright as long as you dont wrap the commands..
this is f.eks legal:
Code: Select all
Procedure MsgBox(Title.s,text.s)
MessageBox_(#Null,title.s,text.s,#MB_OK)
EndProcedure
as you are wrapping api commands. Also you can use pb commands of course, as long as you dont specifically wrap them. like if your language has an encryption function that xors and that stuff, ex:
Code: Select all
Procedure.s xEnc(string.s,pass.s)
If string.s=""
ProcedureReturn ""
Else
For a=1 To Len(pass.s)
charval=Asc(Mid(pass.s,i,1))
myarr=myarr+charval
Next a
For i=1 To Len(string.s)
myenc=Asc(Mid(string.s,i,1)) ! myarr
mystr.s=mystr.s+Chr(myenc)
Next i
ProcedureReturn mystr
EndIf
EndProcedure
about console, there are also winapi commands for that. As you do using winapy, the smaller your interpretter will get as well.
but of course to be 100% sure, wait till you see what fred writes.
Posted: Sat Jun 11, 2005 12:01 pm
by Killswitch
Thanks for the adivce!
Posted: Sat Jun 11, 2005 12:31 pm
by Pupil
A bit more about wrappers and what you're allowed to do according to the license..
viewtopic.php?t=13111
Posted: Sat Jun 11, 2005 6:33 pm
by Killswitch
Well from reading that I could interpret that it's only against the licence to use wrappers in a .DLL, there's no mention of an interpreter

.
Is there anyway to get's Freds attention with this, I'd rather not bug him with an email.
Posted: Sat Jun 11, 2005 7:56 pm
by Fred
The first example 'PrintX()' is clearly not ok, it's a simple wrapper. What about DisplaySpriteX() and MD5FingerPrintX() ?

. Basically you can use the very basic commands (file/string libs) and use the API for everything else. The fact than you won't do a commercial package isn't the point, as if you write only a wrapper around PB commands it will take you 1 day (at most) to do it where we spend 6 years on it

.
Posted: Sat Jun 11, 2005 9:18 pm
by Killswitch
Ok, thanks for clearing that up Fred. I've begun using the API and I've come up with the equivalents for: MessageRequester(), OpenConsole() and Print().
Its going to be hard, but enjoyable I think.
Edit: And so long as we follow these guidelines (i.e. no wrapping) it could become a commercial product?
Posted: Sat Jun 11, 2005 10:36 pm
by thefool
yup, as fred states. but there are many basics out there for free so if you want to make it a commercial one, better make it good
btw: if you learned asm it would of course be possible to do a real compiler in purebasic.