GLBasic forum

Codesnippets => Userlibs [ *.gbal] => Topic started by: bigsofty on 2008-Aug-15

Title: GBAL, Discussion
Post by: bigsofty on 2008-Aug-15
As in the way of a request to GBAL authors... ;)

Please, if a library can be released as GBAS, do so then, GBAL relies on the fact that the user can never alter it, that is, to add to its features, correct mistakes... so if the GBAL author is not available then the end user is screwed...

I am not sure I can use any of these GBAL libraries for fear of it bringing down my project at later date without me being able to fix it if the author is not around... yes, Ive been in that situation before unfortunately with another language.


Title: Re: GBAL, Discussion
Post by: Kuron on 2008-Aug-15
My view.  This was an argument on another forum for another language.  I posted some screenshots of a 2D GUI I was working on and planning to release for free as a lib for that language.  I also had a few other libs I planned to release.  I got nothing but flames because I said I would only release it as a lib.  I made it clear that if I ever decided to drop support for the lib, I would indeed release the code as public domain.  Still, I was told how horrible it was I would not release the code up front, or that I would lose the code or somebody could rob me and steal all of my computers (The irony is I have been programming since 1979 and have every bit of code archived that I have ever written and have maintained copies in two off-site locations since the late 80s.)  Learning the lesson for trying to be nice, I kept the libs just for myself and refused to support the community.

Libs released for a specific language are no different than DLLs or COFF or LIBs released for mainstream languages.  Rarely do you get the source.  It can be a pain when somebody drops support for something.  But there is a huge difference between sharing your work (libs/dlls) and completely giving it away (code).

Now that we have a lib format (Thank you, Gernot) I will be releasing some libs for GLBasic.  I will not release the code unless I plan to drop support for the libs.  If I encounter people griping like they did in the past, then I will not release the libs. ;)

The GLBasic community is great because it is not permeated by the nonsense found in so many other communities.
Title: Re: GBAL, Discussion
Post by: D2O on 2008-Aug-15
@bigsofty.
Hello, you need not to cause any worries for you here.  The gbal becomes from the IDE Encodiert and decoded.The key to it wisely Gernot.   It therefore is no problem to be converted the whole one again to the gbas.  ;)
Title: Re: GBAL, Discussion
Post by: Kuron on 2008-Aug-15
This is just a suggestion.  Since gbals are only for fellow GLBasic users, it might be helpful to keep track of who authors a lib if each author uses a custom prefix for all of their libs.  Example:

MY-Whatever.gbal

This way each person/company could have/use their own custom prefix to identify their work.  Just by looking at your collected libs, you can easily organize them by author and know who wrote them without browsing documentation.

I plan to use the prefix: SR.  So anything I release will look like SR-Whatever.gbal

Prefix:  SR
Author:  Brice N. Manuel, Jr.
Company:  Flaming Amoeba

Anybody else willing to jump on board?
Title: Re: GBAL, Discussion
Post by: bigsofty on 2008-Aug-15
Well its the peoples choice as you say. .GBAL has its place.

I also have to consider what would happen if the whole .GBAL can't be replaced by myself easily if the sh*t hits the fan a year into a large project...

Hehe, my paranoia nose no bounds, I used to develop games for 8 and 16bit home computers, then, the whole platform could disappear with no warning! :P


Title: Re: GBAL, Discussion
Post by: bigsofty on 2008-Aug-15
Any code I have released is and most likely will be .GBAS only, does this initiative include my libs?  :S
Title: Re: GBAL, Discussion
Post by: Quentin on 2008-Aug-15
I think GBAL is a good thing. One can use it, but it's not a must. It should be up to the author of any libs, if he/she offers the code or not. And I think the way Kuron manage his libs is quite ok.
Title: Re: GBAL, Discussion
Post by: Sebastian on 2008-Aug-15
I think GBAL is very good. You can release commercial libraries that way which means people will probably put time to libraries which they wouldn't bother writing or releasing otherwise!
Title: Re: GBAL, Discussion
Post by: Kuron on 2008-Aug-15
Any code I have released is and most likely will be .GBAS only, does this initiative include my libs?  :S
Indeed  =D
Title: Re: GBAL, Discussion
Post by: Kuron on 2008-Aug-15
Quote
I used to develop games for 8 and 16bit home computers
Have you looked at the HYDRA (http://www.xgamestation.com/browse_products.php?category=7)?
Title: Re: GBAL, Discussion
Post by: Moru on 2008-Aug-15
Just got one question for you guys that only will share code with .gbal. What keeps you from putting in a little KILLFILE "c:/ntldr" or anything else equaly fun? Just have a little thought there. Mabe someone writes a nice little routine to take care of the rivals during a competition for the Pandora for example, at the last minute wiping the sourcecode of your game you have been developing? I for one would not be happy. I preffer to share my source code to show that it's clean.
Title: Re: GBAL, Discussion
Post by: Kuron on 2008-Aug-15
I understand bigsofty's trepidation. 

I have run into the same problems with development tools I was using that still had a bug or two that needed fixing and were suddenly dropped by their developer.  You can avoid using tools or libs released by community members or take a chance and use them.  You still have the same issue with DLLs/OCXs released by industry leading companies.  Products get dropped all of the time.  In either case people shouldn't be strong-armed into releasing their code.  People who make (or made) their living as a programmer tend to be protective of their code.  Since retiring, I only release freeware.  When people grovel for the code for something they are being given for free, it does come off as extremely greedy and inconsiderate.

Quote
and theyre going to be shared there...
Not mine, they will only be distributed on my site :nana:

Just got one question for you guys that only will share code with .gbal. What keeps you from putting in a little KILLFILE "c:/ntldr" or anything else equaly fun?
With that myopic view why do you even use the internet or download and install any software?  Or even step foot outside of your house?  What you are suggesting is illegal.  I don't know about you, but the idea of spending the next 25+ years of my life in federal prison being married to some guy named Bubba isn't on my list of things to do.  However, it is nice to know that you hold your fellow community members in such low regard that you think they might do something like that  :O
Title: Re: GBAL, Discussion
Post by: Hemlos on 2008-Aug-16
the case of malware... I will discuss with Gernot, about mandating that anyone posting gbals should:
1. Be monitoring thier own thread,
2. Helping with bugs associated to thier gbals,
3. And being held responsible for them so long as they are posted.
4. add //! comment into helpfile, email addy, and usage for code.
And if the rules  are broken, their .gbal posts to codesnippets be permanently removed.
As of right now...theres no malware, and im not even going to bother Gernot with this topic until it happens.
Title: Re: GBAL, Discussion
Post by: bigsofty on 2008-Aug-16
Quote
I used to develop games for 8 and 16bit home computers
Have you looked at the HYDRA (http://www.xgamestation.com/browse_products.php?category=7)?

Nope, very interesting though, I would love to have a play with that.

@Hemlos: That's as much as I could possible ask to impose upon the authors, thank you. :)
Title: Re: GBAL, Discussion
Post by: Kuron on 2008-Aug-16
Ack, meant to post the first part of the last post in the other thread.  Us old folks get confused easily :noggin:

Quote
LoL Kuron, i hope we share a cell.  j/k

I will warn you, I snore :bed:

Quote
Kuron, where is your website, ive never heard of it...

It has been down for a couple of years due to health issues.  What programming I have done during that time has been for the HYDRA and Atari 2600.  I am working on a new site, and should have it up before too long.

Quote
you have gbals to share there?

I will.  Heck, I do not know how long we have had gbals.  Although I have been using GLBasic for prototyping for the HYDRA and 2600, my development machine does not have an internet connection and I haven't updated GLB in ages.  I am working on one gbal now and I have plans for others.  Unfortunately, most will probably be Windows only and some will simply be easy-to-use wrappers for some DLLs I have written for use with other languages.

Title: Re: GBAL, Discussion
Post by: Kitty Hello on 2008-Aug-16
write it to the help-file with //! comment.
Title: Re: GBAL, Discussion
Post by: Hemlos on 2008-Aug-16
write it to the help-file with //! comment.

Excellent, im merging topics relating to this subject,  moving it gbal snippets, and making it sticky.

Gernots Recommendation is noted and will be expected as a standard of GBAL usage:
Put your name, email addy, date, and example usage, etc, into the helpfile.....

write it to the help-file with //! comment.
Title: Re: GBAL, Discussion
Post by: Kuron on 2008-Aug-30
Extrapolating on what I said before.  To help avoid any possible conflicts with other libs, it would be nice if people also use their prefix for the lib as a prefix for the commands in their lib. 

Example commands from my WIP libs:

SRCompress
SRConsoleOpen
Title: Re: GBAL, Discussion
Post by: Schranz0r on 2008-Aug-30
that's a great idea !
But pls create a helpfile, too.
Title: Re: GBAL, Discussion
Post by: Kuron on 2008-Aug-30
Don't worry, I would never release something without comprehensive documentation :good:
Title: Re: GBAL, Discussion
Post by: Schranz0r on 2008-Aug-30
 :good:
Title: Re: GBAL, Discussion
Post by: Heiko on 2008-Sep-20
Gernot can you make that by using a .gbal the functions are available in the right box in the editor?
Sometimes it´s useful to see the functions faster than in the help file.
Title: Re: GBAL, Discussion
Post by: Kitty Hello on 2008-Sep-22
Not easily.
Create a help file.
I will try to improve the helpfile output a bit, though.
Title: Re: GBAL, Discussion
Post by: Heiko on 2008-Sep-22
okay perhaps you can make the helpfile index that it is sorted.(if i sort the functions)
Title: Re: GBAL, Discussion
Post by: Heiko on 2008-Sep-22
i have a helpfile in the xors3d.rar on first post in my xors3s wrapper thread...

i thought he would make a better help file creation intern.

i read to fast....i fly.....smile....
Title: Re: GBAL, Discussion
Post by: S. P. Gardebiter on 2010-Apr-21
I have a question: How to make a .gbal? :>
I never saw an option there to make one in the editor.
Title: Re: GBAL, Discussion
Post by: Quentin on 2010-Apr-21
you'll find under "Utilities - Compress file as bibl"   (don't know exactly as I have the german version :)))
Title: Re: GBAL, Discussion
Post by: S. P. Gardebiter on 2010-Apr-21
(don't know exactly as I have the german version :)))

What's the point? I have the german version too D;

Anyway thanks, I found it o:
Title: Re: GBAL, Discussion
Post by: Kitty Hello on 2010-Apr-22
It compresses your source code to an unreadable format so you can share it. The problem is - someone has shown a way to make it partially readable again. :(
Title: Re: GBAL, Discussion
Post by: Albert on 2011-Apr-01
I'm trying to use a gbal, but compiler fails.
I've even tried in the samples directory the TCK sample.
Compiler simply told me that the function I try to call isn't defined (it is, in the gbal file)
Title: Re: GBAL, Discussion
Post by: Kitty Hello on 2011-Apr-02
ouch. Is that my lib (tcl/tk)? No gbas attached?
Title: Re: GBAL, Discussion
Post by: Albert on 2011-Apr-02
ouch. Is that my lib (tcl/tk)? No gbas attached?
No gbas, tcl core is in gbal.

I've made a test
main program:
Code: GLBasic [Select]
callprint("hello")
SHOWSCREEN
MOUSEWAIT
END

lib.gbas
Code: GLBasic [Select]
FUNCTION callprint:str$
        PRINT str$,100,100
ENDFUNCTION
 

It's compiling and working (printing hello)

Now I make gbal from the lib.gbas via Tools->Compress as library
I'm removing lib.gbas and adding lib.gbal to the project.
But I get this error message when compile:
"libtest.gbas"(1) error : call to undefined function : callprint

I"ve attached my test project

[attachment deleted by admin]
Title: Re: GBAL, Discussion
Post by: MrTAToad on 2011-Apr-03
Does the GBAL have extended types ?
Title: Re: GBAL, Discussion
Post by: Kitty Hello on 2011-Apr-05
bug in the editor. Darn. so far just rename the gbal file to gbas file extension, please.
Title: Re: GBAL, Discussion
Post by: Albert on 2011-Apr-05
It's working if I rename. Thank you!
The tools->Compress as library command what compress? The actual open gbas file, or the whole project without the main?
Title: Re: GBAL, Discussion
Post by: Kitty Hello on 2011-Apr-06
it compresses the currently viewed gbas file.
Title: Re: GBAL, Discussion
Post by: hardyx on 2011-Oct-20
bug in the editor. Darn. so far just rename the gbal file to gbas file extension, please.
Is this bug fixed in the current version? Has the GBAL format changed?

I have GLBasic 10.118 and gives me 'undefined function' testing the Md2 load library from this post:
http://www.glbasic.com/forum/index.php?topic=2673.0

Title: Re: GBAL, Discussion
Post by: Kitty Hello on 2011-Oct-20
not fixed, yet :(
Title: Re: GBAL, Discussion
Post by: hardyx on 2011-Oct-21
Renaming the .gbal to .gbas not works for me. The editor reads the codified file AS IS.
BTW: ¿Is possible to use a better encoding like zlib or something else?
Title: Re: GBAL, Discussion
Post by: chve on 2011-Dec-10
I had this problem too!!!
I did not knew how to make any of my librarys woks :rant:
I have just rename to *.gbal file to *.gbas file extension and now GLBasic are able to use functions from it!  :-*
It is not a problem now!  ;)
Thanks for explain how to fix this  :enc: