Library Mania
Library Mania
Sorry if it sounds offensive, and it for sure shall not be a dig at anyone using or creating libraries, but I can't understand the current library mania (aka "use libraries at any price for everything").
For sure, a library is nice if the result cannot be achieved easily in PB itself (or if some existing C source code gets wrapped), but why would one limit himself to some external commands if there is the choice?
Libraries-written-in-PB contras:
- lack the flexibility of source code (adding features, ironing out errors)
- are dependend on maintenance of the provider (linker errors, compatibility issues)
- no chance to learn from the source code & experience of others
pros:
- source is somewhat protected if it is a unique idea that shall not be shared open sourced.
The only reason I can imagine is that it appears to be more "cool", as if it was a built-in function. But over time, there were enough troubles with libraries and their development; to name some:
- commands added to PB conflict with existing (older) libraries
- download links for libraries not valid anymore (for example because the coder left the community)
- library not compatible with newer linker versions
- bugs in libraries that never got ironed out
- dependencies that can get/got invalid over time
Anyway, just some thoughts. Anyone is entitled to use or not to, whenever he likes.
For sure, a library is nice if the result cannot be achieved easily in PB itself (or if some existing C source code gets wrapped), but why would one limit himself to some external commands if there is the choice?
Libraries-written-in-PB contras:
- lack the flexibility of source code (adding features, ironing out errors)
- are dependend on maintenance of the provider (linker errors, compatibility issues)
- no chance to learn from the source code & experience of others
pros:
- source is somewhat protected if it is a unique idea that shall not be shared open sourced.
The only reason I can imagine is that it appears to be more "cool", as if it was a built-in function. But over time, there were enough troubles with libraries and their development; to name some:
- commands added to PB conflict with existing (older) libraries
- download links for libraries not valid anymore (for example because the coder left the community)
- library not compatible with newer linker versions
- bugs in libraries that never got ironed out
- dependencies that can get/got invalid over time
Anyway, just some thoughts. Anyone is entitled to use or not to, whenever he likes.
Athlon64 3800+ · 1 GB RAM · Radeon X800 XL · Win XP Prof/SP1+IE6.0/Firefox · PB 3.94/4.0
Intel Centrino 1.4 MHz · 1.5 GB RAM · Radeon 9000 Mobility · Win XP Prof/SP2+IE6.0/Firefox · PB 3.94/4.0
Intel Centrino 1.4 MHz · 1.5 GB RAM · Radeon 9000 Mobility · Win XP Prof/SP2+IE6.0/Firefox · PB 3.94/4.0
Very good points there!
Myself I prefer to keep my "libraries" in the form of include files rather than pb libs.
And so far all my released code has been in the form that could easily be pasted into a include file.
As you said, if it's "proprietary" code, I may not do it that open,
but instead most likely use a dll instead.
This is why I really like the open source purebasic library effort currently going on,
it allows "quick fixes" or adaptions to the current project.
Improvements made can be shared back with the PureBasic open source library effort.
Myself I prefer to keep my "libraries" in the form of include files rather than pb libs.
And so far all my released code has been in the form that could easily be pasted into a include file.
As you said, if it's "proprietary" code, I may not do it that open,
but instead most likely use a dll instead.
This is why I really like the open source purebasic library effort currently going on,
it allows "quick fixes" or adaptions to the current project.
Improvements made can be shared back with the PureBasic open source library effort.
Last edited by Rescator on Sat Aug 06, 2005 3:08 pm, edited 1 time in total.
Re: Library Mania
> I can't understand the current library mania
I'm a bit the same. I only use libaries if I absolutely have to (currently, only
one: Paul's RC4 lib). This scares me because my app now depends on Paul
to keep it alive. I'd prefer to use a Procedure, but I've never seen one that
makes it as easy to use as Paul's lib.
The thing is, with each PureBasic update, there is a chance of libs breaking.
This happened once before with the RC4 lib, and it needed an update. What
if Paul wasn't around anymore? My app would be dead, or at least I'd have
to keep using an old version of PureBasic to keep using that lib. It's scary!
I'm a bit the same. I only use libaries if I absolutely have to (currently, only
one: Paul's RC4 lib). This scares me because my app now depends on Paul
to keep it alive. I'd prefer to use a Procedure, but I've never seen one that
makes it as easy to use as Paul's lib.
The thing is, with each PureBasic update, there is a chance of libs breaking.
This happened once before with the RC4 lib, and it needed an update. What
if Paul wasn't around anymore? My app would be dead, or at least I'd have
to keep using an old version of PureBasic to keep using that lib. It's scary!
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Take a look at viewtopic.php?t=14044
for a RC4 based encryption that allows streaming encryption even. (as RC4 is a stream chiper after all).
Should also be a to/from hex example as well.
Also search for RC4 on the forum for a few other posts (some whom inspired me to make that code as well)
So it's not that hard to make a ARCFour (RC4) include that provides all the features you need.
The code in that post btw can easily be replicated in PHP,
thus allowing a nice client/server compatibility too.
for a RC4 based encryption that allows streaming encryption even. (as RC4 is a stream chiper after all).
Should also be a to/from hex example as well.
Also search for RC4 on the forum for a few other posts (some whom inspired me to make that code as well)
So it's not that hard to make a ARCFour (RC4) include that provides all the features you need.
The code in that post btw can easily be replicated in PHP,
thus allowing a nice client/server compatibility too.
Good points, Max.
I don't use them, my user library folder is empty.
In fact if I can't maintain 3rd-party code myself I don't use it, otherwise I and my clients are reliant on somebody else who is known only as an alias on these boards.
And if I can maintain it, it is used as an include file or, non-PureBasic, a DLL.
To the plusses, though, we should add that user libs do provide a way for code written in C, etc to be made accessible in a "natural" way.
I don't use them, my user library folder is empty.
In fact if I can't maintain 3rd-party code myself I don't use it, otherwise I and my clients are reliant on somebody else who is known only as an alias on these boards.
And if I can maintain it, it is used as an include file or, non-PureBasic, a DLL.
To the plusses, though, we should add that user libs do provide a way for code written in C, etc to be made accessible in a "natural" way.
@}--`--,-- A rose by any other name ..
- NoahPhense
- Addict
- Posts: 1999
- Joined: Thu Oct 16, 2003 8:30 pm
- Location: North Florida
i have released all my libs as Opensource, so everyone can learn from it, modify for his needs or enhanced that.
But it should be OpenSource.
A lot of libs here are 'hacked' together from Tips&tricks.
Also most of those libs are not complete Open(source).
A shame if the also want money for it
Me too also did not use such libs.
But hell, everyone can do as he wants.
Remark:
Seems that we 'european' did more like OpenSource
than other guys
But it should be OpenSource.
A lot of libs here are 'hacked' together from Tips&tricks.
Also most of those libs are not complete Open(source).
A shame if the also want money for it

Me too also did not use such libs.
But hell, everyone can do as he wants.
Remark:
Seems that we 'european' did more like OpenSource
than other guys

SPAMINATOR NR.1
- NoahPhense
- Addict
- Posts: 1999
- Joined: Thu Oct 16, 2003 8:30 pm
- Location: North Florida
The only true feature of a lib in my opinion is that only the used procedures will be included in the final exe. All the pb optimizations for small exes can become useless in a real world application because is a common practice to have generic includes/libs to perform common tasks and your exe will be filled with unused code. i hope pb 4 can create libs i wonder why in the world is not supported if taibite can do it.
- NoahPhense
- Addict
- Posts: 1999
- Joined: Thu Oct 16, 2003 8:30 pm
- Location: North Florida
It can, just not in pb native code.Justin wrote:The only true feature of a lib in my opinion is that only the used procedures will be included in the final exe. All the pb optimizations for small exes can become useless in a real world application because is a common practice to have generic includes/libs to perform common tasks and your exe will be filled with unused code. i hope pb 4 can create libs i wonder why in the world is not supported if taibite can do it.
Unfortunately, I'm not swift enough to create my libs in C, nor would I want to. But either way, worst case scenario for me, is that I would be distributing DLL's.. vrs LIBs..
- np
I agree.jack wrote:I am not a fan of GPL style licences, either release the source to the public domain or keep it.
BTW, I told a fib, above, when I said my userlibs where empty.

Rings' post reminded me that I currently have PBOSL in there! I should start to use some of that stuff! Esp the fastfile stuff which has always been tempting - but what if Rings had stepped out in front of a bus? That would have been pretty selfish as who would then fix the thing if it broke?

@}--`--,-- A rose by any other name ..
are you a coder or a wining child ?Dare2 wrote:Rings' post reminded me that I currently have PBOSL in there! I should start to use some of that stuff! Esp the fastfile stuff which has always been tempting - but what if Rings had stepped out in front of a bus? That would have been pretty selfish as who would then fix the thing if it broke?

There are a lot of talented coders around here
wo could change also my stuff.
That is the good part of OpenSource.
SPAMINATOR NR.1