PureBasic Licence Question

Everything else that doesn't fall into one of the other PB categories.
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

PureBasic Licence Question

Post 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.
~I see one problem with your reasoning: the fact is thats not a chicken~
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post 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.
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Post 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?
~I see one problem with your reasoning: the fact is thats not a chicken~
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post 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..
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post 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.
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Post by Killswitch »

Thanks for the adivce!
~I see one problem with your reasoning: the fact is thats not a chicken~
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post by Pupil »

A bit more about wrappers and what you're allowed to do according to the license..
viewtopic.php?t=13111
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Post 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.
~I see one problem with your reasoning: the fact is thats not a chicken~
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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 :).
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Post 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. :D

Edit: And so long as we follow these guidelines (i.e. no wrapping) it could become a commercial product?
~I see one problem with your reasoning: the fact is thats not a chicken~
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post 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.
Post Reply