Page 3 of 4
Re: Any PB programmers who are EMPLOYEES?
Posted: Fri Dec 09, 2011 11:42 pm
by Kuron
c4s wrote:At least "the rest" knows what Fred means.
What Fred means and what Fred says, are two different things. I can only abide by what the license says and getting sued for inadvertently violating it isn't on my list of things to do.
Perhaps an expert could explain how to create a DLL with PB without using a single PB command/function which would by default be wrapping that command/function in the DLL (of which wrapping functions for use is the entire purpose of a DLL)? I am genuinely perplexed.
At the end of the day, it is Fred's language and Fred's rules and
I have zero complaints with the rules. I just wish people would quit telling me I can do something which the rules clearly prevent.
Earlier, I encouraged people to stop discussing this in this thread, perhaps the mod could split it to its own thread?
Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 12:51 am
by netmaestro
I think the FAQ statement by Fred makes it as clear as it can be made. Every few months a thread morphs into this discussion and iirc usually ends up getting locked, there just seems to be no way to stop it.
Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 1:13 am
by luis
We could talk about OOP or GOTOS !
Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 1:35 am
by netmaestro
Now that you mention it, really, Gotos are pointless...

Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 3:59 am
by idle
netmaestro wrote:Now that you mention it, really, Gotos are pointless...


you know Luis abides goto
funnily enough I was just messing around with my OO framework extending the event driven windows manager class example and testing it compiled as a dll and to my surprise it didn't work. It couldn't create gadgets from the client side presumably because the window creation and event loop reside in the dll, it probably didn't like crossing the dll boundary, so if I wanted it to work from a dll I'd also need to wrap all the gadget creation functions in the lib as well and then that could arguably be termed a violation of the license even though the intended purpose for doing it could have a legitimate reason like it provides additional functionality, ease of use and easy code reuse, but then it would also make it available to other languages. So end result is your often forced to statically link and sometimes you don't want to.
just to fuel the fire

Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 9:36 am
by buddymatkona
PB documention mentions several other licenses. None of them should be a problem when distributing freeware however you might need permission to sell some content. What comes to mind is LOADWORLD because the BSP format is owned by id Software.
Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 10:02 am
by Danilo
Is this DLL allowed?
Code: Select all
Procedure WindowCallback(Window,Message,wParam,lParam)
Select Message
Case #WM_CLOSE
If MessageBox_(Window, "Do you really want to quit?", "EXIT", #MB_YESNO) = #IDYES
DestroyWindow_(Window)
Else
Result = 0
EndIf
Case #WM_DESTROY
PostQuitMessage_(0)
Result = 0
Default
Result = DefWindowProc_(Window,Message,wParam,lParam)
EndSelect
ProcedureReturn Result
EndProcedure
ProcedureDLL.i Window(x,y,w,h,title)
#Style = #WS_VISIBLE|#WS_BORDER|#WS_SYSMENU
#StyleEx = #WS_EX_TOOLWINDOW ;| #WS_EX_OVERLAPPEDWINDOW
WindowClass.s = "MeinFenster"
wc.WNDCLASSEX
wc\cbSize = SizeOf(WNDCLASSEX)
wc\lpfnWndProc = @WindowCallback()
wc\hCursor = LoadCursor_(0, #IDC_ARROW)
wc\hbrBackground = #COLOR_WINDOW+1;CreateSolidBrush_(RGB($8F,$8F,$8F))
wc\lpszClassName = @WindowClass
RegisterClassEx_(@wc)
hWnd = CreateWindowEx_( #StyleEx,@WindowClass,title,#Style,x,y,w,h,0,0,0,0)
If hWnd
ShowWindow_(hWnd, #SW_SHOWDEFAULT)
UpdateWindow_(hWnd)
EndIf
ProcedureReturn hWnd
EndProcedure
ProcedureDLL.i Button(hWnd,x,y,w,h,title)
ProcedureReturn CreateWindowEx_(0,"Button",title,#WS_CHILD|#WS_VISIBLE|#WS_CLIPCHILDREN|#WS_CLIPSIBLINGS,x,y,w,h,hWnd,0,0,0)
EndProcedure
ProcedureDLL.i DoEvents()
While GetMessage_( msg.MSG, #Null, 0, 0 )
TranslateMessage_(msg)
DispatchMessage_(msg)
Wend
EndProcedure
;win1 = Window(100,100,800,500,@"MyWindow")
;Button(win1,10,10,100,25,@"Button 1")
;DoEvents()
Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 4:14 pm
by Demivec
Danilo wrote:Is this DLL allowed?
Nice trick question. It is easily allowed, its primary purpose is to wrap Windows API functions.

Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 5:32 pm
by netmaestro
Sure, it's allowed. All Fred did was import those api commands and he's said before they're fair game.
For those concerned about the license, this is my take:
There are two main questions to ask yourself:
1) Who is my end user?
2) What Purebasic libraries am I using and how am I using them?
If your product is a an application and your end user is going to run that application, you are pretty safe and needn't go on to 2.
If your product is a tool or library and your end user is a programmer, now is the time to examine question 2. Fred has said in the past that he doesn't care what you do with compiler commands, the main concern is the libraries. A scenario that would offend him (and violate the license) would be a case where a PB coder writes a dll that provides, say, hashtable functions to programmers in other languages and all that hashtable collection does is wrap the native PB Map library. Fred spent weeks, probably months writing and debugging that Map library and it's outright theft for someone to just wrap it and pass it off as his own work.
The violation here is not subtle, not hard to see and you're not likely to find yourself in a situation where you've accidentally crossed the line. Your conscience would have told you very early on that you were going out of bounds. Now let's look at the case where you've written your own dynamite hashtable library, it kicks the map's ass it's that good, and you want to sell it. But you want your customers to have a wysiwyg gui to select functions and for that you need OpenWindow and some gadgets from the Gadget library. This is what I meant by "how you're using them." You're perfectly safe providing that gui because you aren't exporting any commands from the Window or Gadget libraries, you're simply using them properly as is your right.
Anyway for what it's worth that's my interpretation of the license terms, formed both from a commonsense perspective and in the light of everything Fred has written about this issue in the last six years. Flame at will..
Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 5:42 pm
by LuCiFeR[SD]
netmaestro wrote:Sure, it's allowed. All Fred did was import those api commands and he's said before they're fair game.
For those concerned about the license, this is my take:
There are two main questions to ask yourself:
1) Who is my end user?
2) What Purebasic libraries am I using and how am I using them?
If your product is a an application and your end user is going to run that application, you are pretty safe and needn't go on to 2.
If your product is a tool or library and your end user is a programmer, now is the time to examine question 2. Fred has said in the past that he doesn't care what you do with compiler commands, the main concern is the libraries. A scenario that would offend him (and violate the license) would be a case where a PB coder writes a dll that provides, say, hashtable functions to programmers in other languages and all that hashtable collection does is wrap the native PB Map library. Fred spent weeks, probably months writing and debugging that Map library and it's outright theft for someone to just wrap it and pass it off as his own work.
The violation here is not subtle, not hard to see and you're not likely to find yourself in a situation where you've accidentally crossed the line. Your conscience would have told you very early on that you were going out of bounds. Now let's look at the case where you've written your own dynamite hashtable library, it kicks the map's ass it's that good, and you want to sell it. But you want your customers to have a wysiwyg gui to select functions and for that you need OpenWindow and some gadgets from the Gadget library. This is what I meant by "how you're using them." You're perfectly safe providing that gui because you aren't exporting any commands from the Window or Gadget libraries, you're simply using them properly as is your right.
Anyway for what it's worth that's my interpretation of the license terms, formed both from a commonsense perspective and in the light of everything Fred has written about this issue in the last six years. Flame at will..
You'll get no flame from me, as that is pretty much how I interpreted it too. You are far more eloquent than me, and for all the times I tried to write the words yesterday, I just couldn't make them coherent enough

Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 6:04 pm
by c4s
Yep, netmaestro pretty much summed it up. Should be a little shortened or rephrased by Fred and then directly go to FAQ section as the answer to that question.
Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 6:50 pm
by Tenaja
Maybe a MODERATOR can MOVE the dll/license stuff to another thread...
THANKS.
Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 7:08 pm
by srod
Yep reckon Netty has hit the nail firmly on the head there and has described my own aforementioned dlls to a tee.
Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 8:53 pm
by the.weavster
netmaestro wrote:There are two main questions to ask yourself:
1) Who is my end user?
2) What Purebasic libraries am I using and how am I using them?
If your product is a an application and your end user is going to run that application, you are pretty safe and needn't go on to 2.
If that's right I think it works for me. I don't want to try and sell shared libraries I just want to do as much as possible in scripting languages, I love the flexibility and informality of them.
Re: Any PB programmers who are EMPLOYEES?
Posted: Sat Dec 10, 2011 9:40 pm
by utopiomania
Any PB programmers who are EMPLOYEES?
Two or three maybe. I wondered about this myself, but what has dlls to do with this?