DarkBasic doing a PB tutorial! More users incoming? :)

For everything that's not in any way related to PureBasic. General chat etc...
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Raven wrote:

Code: Select all

Interface IWinapi1
   hWnd()
   sGetTitle( a.l )
   Release()
EndInterface

NewList WinApi.IWinapi1

Procedure.l apiCreateWindow( hWnd.l, sizex.l, sizey.l, title.s )
   AddElement( WinApi.hWnd() )
   WinApi.hWnd() = OpenWindow( hWnd, 0, 0, sizex, sizey, title )
   ProcedureReturn WinApi.hWnd()
EndProcedure
That however would be, because your not just wrapping but creating a complete system from it.
Wrong. That is illegal as well. When WinAPI is mentioned it means the Windows Application Programming Interfaces. You cannot mearly wrap any command and use it in another programming language. In your example you are not using any WinAPI whatsoever.
Raven wrote: DarkBasic Professional however doesn't have a similar thing, which unfortuntely means if someone wanted to pirate the engine for PureBasic, they could.
LMAO, that would introduce thousands of bugs and quadruple the entire size of a full PureBasic install if someone bolted on that bloaty piece of crap! Personally i'll wait until the OGRE engine is fully supported! :twisted: :twisted: :twisted:
With all this flaming going on recently i thought i'd have a pop too. :twisted:
--Kale

Image
MadMax
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Oct 06, 2003 11:56 am

Post by MadMax »

Hmmm, So let's say I want to code some aplication or other, and being a licenced user of PB would like to create a dll that I'm going to use with another language I'm also fully licenced to use. I wouldn't of course distribute this DLL with any sort of information on what it does or as part of another compiler. Just a simple aplication or utility, maybe even a game.

Would it change anything if a certain parameter had to be passed to the DLL for this to work?

Would it be any different if the main aplication was coded in PB?

Bear in mind that I'm not talking about distributing DLL's for use with other languages, just about using them for my own complete programs.

Or would it be better to forget that you can make DLL's with PB and use some other compiler to do this?

That the law will still aply in full force even if I'm ignorant, doesn't mean I have to stay ignorant so some lawyers can take away all my money.
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

..

Post by NoahPhense »

MadMax wrote:Hmmm, So let's say I want to code some aplication or other, and being a licenced user of PB would like to create a dll that I'm going to use with another language I'm also fully licenced to use. I wouldn't of course distribute this DLL with any sort of information on what it does or as part of another compiler. Just a simple aplication or utility, maybe even a game.

Would it change anything if a certain parameter had to be passed to the DLL for this to work?

Would it be any different if the main aplication was coded in PB?

Bear in mind that I'm not talking about distributing DLL's for use with other languages, just about using them for my own complete programs.

Or would it be better to forget that you can make DLL's with PB and use some other compiler to do this?

That the law will still aply in full force even if I'm ignorant, doesn't mean I have to stay ignorant so some lawyers can take away all my money.
Everything you said is ok. Even if you owned DBPro and created a game
and then you created a DLL with your 'licensed' copy of PureBasic, you
could assemble the two and distribute it.

The problem is when someone comes over to PureBasic, buys a copy,
wraps up some PureBasic native commands, then releases it to the
their community with documentation.

- np
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

That word wrapper is a begger.

For example, my BTree and ISAM is iffy, although it is not a simple "wrapper" by my definition, but it depends on definition and who is deciding on the meaning.

From the FAQ:
You can make DLLs including PureBasic commands for your own projects without any restrictions. But it's not allowed to release simple "wrapper" Dlls to include PureBasic commands in other programming languages.


Does that differ from this:
PureBasic may not be used for the spurpose of providing PureBasic commands and capabilities to enhance or improve another programming language.
Depends on what wrapper means, and simple means.

Because those utilities did use PureBasic commands, and because the utilities cannot run stand-alone, because they are not intended for my exclusive use in my projects but are intended as saleable products to enhance any language, PB or otherwise, there is an issue.

As a consequence I covert these to MASM.

PB therefore ended up being a proof of concept or psuedocode and I would have been better off doing the thing in MASM from the word go.

By going with MASM I lose cross-platform.

To keep cross-platform I would have needed to learn/use Fasm, or C, (or use BCX and modify the C).


Bit of a begger.

And there is quid-pro-quo.

You and I can use, and many have used, C and VB and etc to enhance PB.

What if all languages used that condition? I wonder how many PB apps would suddenly be illegal, and how many boards would suddenly point fingers here saying - look out, PBers are intending to write another library in C and then tell the world how good PB is.
@}--`--,-- A rose by any other name ..
MadMax
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Oct 06, 2003 11:56 am

Post by MadMax »

@ NoahPhense : thanks for your answer :D
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

..

Post by NoahPhense »

I'm tired of this topic. Maybe a moderator should delete it. ;)

Dare2 is taking my seat. I bow to you all.

Happy Coding!

- np
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Re: ..

Post by Dare2 »

NoahPhense wrote:I'm tired of this topic. Maybe a moderator should delete it.
8O
I hope you don't get tired of all the topics on this site! :)
@}--`--,-- A rose by any other name ..
Raven
User
User
Posts: 45
Joined: Tue Jul 15, 2003 4:03 pm
Location: England

Post by Raven »

Kale wrote:
Raven wrote:

Code: Select all

Interface IWinapi1
   hWnd()
   sGetTitle( a.l )
   Release()
EndInterface

NewList WinApi.IWinapi1

Procedure.l apiCreateWindow( hWnd.l, sizex.l, sizey.l, title.s )
   AddElement( WinApi.hWnd() )
   WinApi.hWnd() = OpenWindow( hWnd, 0, 0, sizex, sizey, title )
   ProcedureReturn WinApi.hWnd()
EndProcedure
That however would be, because your not just wrapping but creating a complete system from it.
Wrong. That is illegal as well. When WinAPI is mentioned it means the Windows Application Programming Interfaces. You cannot mearly wrap any command and use it in another programming language. In your example you are not using any WinAPI whatsoever.
Raven wrote: DarkBasic Professional however doesn't have a similar thing, which unfortuntely means if someone wanted to pirate the engine for PureBasic, they could.
LMAO, that would introduce thousands of bugs and quadruple the entire size of a full PureBasic install if someone bolted on that bloaty piece of crap! Personally i'll wait until the OGRE engine is fully supported! :twisted: :twisted: :twisted:
With all this flaming going on recently i thought i'd have a pop too. :twisted:
I also don't outline the other two functions in the Interface, it was aimed at giving an example of how you CAN use the functions.
Why is that one right? but the other Wrong?

Perhaps for the exact same reason Fantaisie can get away with using the Windows API almost directly in PB for Windows; because it is all interfaced and wrapped around such.
All of the functions are close to Identical, it just omits some functionality. The function above is not being 'purely' wrapped, it is being used as part of a function...

If I added the other two commands in the interface it would be quite simply to use that to then go on to add my own management system for the window handles; just like PureBasic does with the WinAPI.
There are also something that the WinAPI does which PureBasic doesn't.

Which means if your writing a full Windowing API for another language unless you want to give your users some cripling restrictions your going to HAVE to use the WinAPI at some point.

Hell you can only get away with some of the more basic application programming without the WinAPI.
It is quite obvious from the number of posts you have made which quite rightly show you don't like me. From now I keep your petty bitterness to yourself.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Raven wrote: Why is that one right? but the other Wrong?
Both of your examples are against the PB license. Any worries people have about wrapping commands and licensing issues should always be directed at Fred for ultimate clarification. You cannot wrap PB commands in procedures to extend other languages, period. Unless its for personal use.
Ref: viewtopic.php?t=11209
Raven wrote: Perhaps for the exact same reason Fantaisie can get away with using the Windows API almost directly in PB for Windows; because it is all interfaced and wrapped around such.
Some PB commands wrap WinAPI commands but the majority don't.
Raven wrote: It is quite obvious from the number of posts you have made which quite rightly show you don't like me. From now I keep your petty bitterness to yourself.
I have never made any remarks directed at you, i have mearly put you right. viewtopic.php?t=11271 :?:
I remember you from the DBPro forums and there you were always expressing your opinions as fact and I also remember you telling people you were a professional game programmer for Electronic Arts. Hmmm :roll:
--Kale

Image
Moonshine
Enthusiast
Enthusiast
Posts: 263
Joined: Tue May 25, 2004 12:13 am
Location: UK

Post by Moonshine »

Kale wrote:I also remember you telling people you were a professional game programmer for Electronic Arts. Hmmm :roll:
I thought that was Jeku? And he really did work at EA?
Mark my words, when you least expect it, your uppance will come...
Raven
User
User
Posts: 45
Joined: Tue Jul 15, 2003 4:03 pm
Location: England

Post by Raven »

Kale wrote: Why is that one right? but the other Wrong?
Both of your examples are against the PB license. Any worries people have about wrapping commands and licensing issues should always be directed at Fred for ultimate clarification. You cannot wrap PB commands in procedures to extend other languages, period. Unless its for personal use.
Ref: viewtopic.php?t=11209
No Fred has quite CLEARLY explained, that simple wrapping *IS NOT* allowed. However if you wish to use the functions to create your own function library that it *IS* allowed.

Otherwise, by your reasoning... ANY DLL you create within PureBasic would not be allowed to use ANY PureBasic function.
As soon as you use CHR() or ATAN() instantly you'd be breaking the License agreement. That just isn't the case.
Kale wrote: Some PB commands wrap WinAPI commands but the majority don't.
No, on windows they ALL do. To what degree, is a different point and that is exactly what I attempted to explain in my examples.
Kale wrote: I remember you from the DBPro forums and there you were always expressing your opinions as fact and I also remember you telling people you were a professional game programmer for Electronic Arts. Hmmm :roll:
Considering I'm a Model/Cinematic Artist by trade it would be hard to do professional programming with a degree in art now wouldn't it?
I have however worked for an EA Studio within the past 5 years.

There are over 200 of them world-wide, so something like that is hardly a *major* achievement.
Moonshine wrote: I thought that was Jeku? And he really did work at EA?
Jeku programs for an EA Studio in Vancouver, Canada. Working in particular on EA Sports titles. However what area he programs of them I don't know.
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post by Codemonger »

OH just too point out ... wrapping commands is not cool ... besides the obvious license agreement, wrapping commands for dedicated games would be crapily slow as you are calling two functions to do the job of one. Way too much CPU overhead. Well probably not that much, but for games where calling functions in loops is time critical and CPU intensive. Just saying that if anyone is thinking of wrapping commands,(please adhere to the license agreement) it is not the way too go. Is crapily a word ?

No, on windows they ALL do. To what degree, is a different point and that is exactly what I attempted to explain in my examples.
What do you mean ... some commands can be run on any OS and the ASM code is exactly the same, like the math functions for instance. Some of the commands are wrappers to other high level windows functions hence WINAPI and they call user32.dll kernel32.dll etc..
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post by tinman »

Codemonger wrote:some commands can be run on any OS and the ASM code is exactly the same, like the math functions for instance
That wouldn't work too well on Amiga or Mac though ;)
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Re: ..

Post by NoahPhense »

Dare2 wrote:
NoahPhense wrote:I'm tired of this topic. Maybe a moderator should delete it.
8O
I hope you don't get tired of all the topics on this site! :)
Oh never. Just a thread here an there.. This kind of thread happens every
so often. Usually though, if Fred wasn't on vacation, he would have
stopped on by already.

- np
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post by Codemonger »

Codemonger wrote:
some commands can be run on any OS and the ASM code is exactly the same, like the math functions for instance


That wouldn't work too well on Amiga or Mac though ;)
cood call :D, I am just assuming intel processor ... but i'm not an ASM programmer so I'll stay away from this one 8O
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
Post Reply