Bye Bye

General discussion for topics related to the FreeBASIC project or its community.
operator+
Posts: 40
Joined: Dec 29, 2021 10:47

Bye Bye

Post by operator+ »

I tried my best to learn FreeBASIC but I simply can't. I can't deal with a language that I have to read lengthy wiki pages only to get a glimpse of what it's actually mean and does. There are so many hidden magics that sometimes I read code I can't even know what he is actually writting. The moderator @fxm has to constantly update the wiki to cover these newly discovered magics. Regarding this, I think FreeBASIC is as bad as C.

Maybe I'm stupid, but I prefer language that what it is is what it is like Java. Looking at Java code I immediately understand what it's doing without having to consult lengthy Oracle document (sometime I have to, but it's very advanced language features that not commonly use). I have no problem reading average Java code, but with average FreeBASIC code, I do.

Another problem with the FreeBASIC community is... Uhm, I'm not good at English. I will give an example. There are Rust based libraries, Go based libraries that so desirable so the people of other languages have to create bindings to use them with their languages. I think there will be never such story with FreeBASIC. The FreeBASIC community has many talents could write wonderful code that people from other languages really desire to have. But creating bindings to their languages is really difficult because the library developer ASSUMED his library to be used within FreeBASIC only so he pays no attention to C compatibility. C compatibility is a must have bridge to be able to create bindings to other languages. (*)

Take window9 as an example, his library is written in mostly procedural style which will be very easy to make a C interface to use with other languages. The problem is he so used with FreeBASIC strings making it so difficult to use outside FreeBASIC world. I have no trouble translating the function prototype on window9.bi to C header. I translated 80% of it (stuck at function return any ptr and function take any ptr as input, as it's not as straight forward on C and I have to do some research, still not sure how to translate these because I'm not good at C either). When it come up to extwstring.bi I decided to give up. I wanted to reuse FreeBASIC runtime so I will just write wrapper like FBString_ASC, FBWString_ASC which call native FreeBASIC functions, these will be exposed to C. I think my way is better than re-implement the whole FBString in C like his demo C++ binding does but it turns out there is so many things to wrap and I found another library could replace window9 for my purpose.

FreeBASIC is so unfavorable to me so even though I liked the window9 library so much I have to give up on it to use another library. That one is C based, distributed as a single header and a DLL that I could use to create bindings for almost any languages I want (if I really can, but I think it will be painless, I have a quick look at the header and it's pretty clean, automated bindings creation tools will have no problem processing it).

Regarding (*), I think the Lazarus/Free Pascal is the same, too. Why you guys only think about grabbing people's code to use with your language but not exporting code from your language so other people could grab and use it with their languages? Because you are not confident enough in your own language? I really can't understand.

p/s: there are some Chinese tried to grab Lazarus's LCL to use with their language, Go: https://github.com/ying32/govcl This is the only effort I know of using Pascal code outside of Pascal world and it's from outsiders as well, no one from the Pascal community really think about exporting Pascal code to use with other languages, @marcov? I consider myself as an outsider to the FreeBASIC community as well. I tried to learn the language to be part of the community but I can't. I always found it's somehow unnatural to write in FreeBASIC and I quickly resort back to Java.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: Bye Bye

Post by Munair »

When I read this, the first thing that comes to mind is laziness.

FreeBASIC is an easy to learn language (much of it as easy as QuickBASIC used to be), but you must invest the time to actually learn it. This is true for any language, even Java. The FreeBASIC documentation is huge but you can easily select the things you want to know about. True, there are some advanced features, but once you know the basics, those features can be easily mastered too.

Even if the syntax is easy to understand (which I claim FreeBASIC mostly is), any compiler has specifics that a programmer must get to know (often with trial and error). This takes time and lots of coding... No serious programmer expects to know the ins and outs of compiler behaviour overnight.

Furthermore, you cannot compare apples and eggs. Java is a corporate product while FreeBASIC is built by volunteers in their spare time. This also applies to FreePascal.

Lastly, it is unfair to expect coders writing large code bases to dump it out there with compatibility in mind so that others can simply walk away with it and use it elsewhere. Coding takes TIME and effort and it should be respected rather than met with criticism.
Last edited by Munair on Feb 17, 2022 9:55, edited 1 time in total.
operator+
Posts: 40
Joined: Dec 29, 2021 10:47

Re: Bye Bye

Post by operator+ »

Which is the official source of document for FreeBASIC? As I have no idea which keyword or function does, I searched it via Google with freebasic appended to the search string. I found documentation.help is sometimes provides even more information and more useful than the one at freebasic.net. There are other sites offer FreeBASIC documents, too. The most notable is bourabai.kz. Too much information. I'm confused.

Sorry but searching via Google is the best way when you have something unknown about freebasic. Finding in the wiki manually is like when electronic dictionary not yet available and one has to look up words in paper dictionary. It's so painful.
operator+
Posts: 40
Joined: Dec 29, 2021 10:47

Re: Bye Bye

Post by operator+ »

@Munair: You think FreeBASIC is easy, as QuickBASIC, because you already know QuickBASIC, isn't it? I don't know either of them. I started with C. The second year at university we jumped straight into Java, without learning the advanced parts of C. So even though I'm started with C, I'm not good at the language. FreeBASIC maybe my first experience with BASIC, even though one could say it's definitiely VBA is my first BASIC. I only copy snippets shared by people on the internet and use. I don't know a single line of VBA. I only expressed my thoughts and I don't criticize anyone. He is clearly not interested in having his library be used outside of FreeBASIC. I respect that. This doesn't make my points become irrelevent. You guys only grabbed people's code and use them without giving back anything.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: Bye Bye

Post by Munair »

operator+ wrote: Feb 17, 2022 9:29 Which is the official source of document for FreeBASIC? As I have no idea which keyword or function does, I searched it via Google with freebasic appended to the search string.
The official source is the link I provided.

Before I first started coding in FreeBASIC I read specific parts of the documentation I wanted to know about without any problems. Only on rare occasions do I use an external search engine, mostly if I cannot find what I'm looking for on this forum.
operator+ wrote:You think FreeBASIC is easy, as QuickBASIC, because you already know QuickBASIC, isn't it?
BASIC languages have always been relatively easy to learn, easier than Pascal or C. So whether you come from another BASIC language or not, with minor effort simple programs can already be written very quickly. But you cannot expect major results in just a couple of weeks.
operator+ wrote:You guys only grabbed people's code and use them without giving back anything.
That's an accusation I cannot relate. Who are "you guys" and what code is "grabbed"?
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Bye Bye

Post by dodicat »

It seems a really difficult way to learn a programming language by using imported libraries.
For a start there is dll hell which is common to all languages, so to start in hell seems odd.
Regarding c++, c and pascal, writing freebasic code to be used in these languages is not difficult, for instance I have tried writing gfx graphics routines for c++ and freepascal and they ran just fine in the form of dll's.
Writing code in freepascal for freebasic I found more difficult, especially if you include some of the free pascal units.
Regarding the freebasic string, a pointer invariably has to be used whether exporting or importing.
The best way to use the freebasic documentation is via the .chm file and a good ide.(I use fbide myself).
Pressing F1 with in your ide brings up the keyword at your cursor.
I know this is simple stuff, but without it you might get bogged down solely using the online documentation.
Member fxm keeps the .chm and documentation up to date.
What else can I say, freebasic, as any basic is a language for beginners in coding like pascal is a language for beginners in modular coding.
I realize that both freebasic and freepascal like to rise above this, so maybe something has been lost on the way.
Java of course never started this way, it was meant to interact with the real world from day one.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: Bye Bye

Post by Munair »

dodicat wrote: Feb 17, 2022 10:00 I realize that both freebasic and freepascal like to rise above this, so maybe something has been lost on the way.
Java of course never started this way, it was meant to interact with the real world from day one.
Pascal has been very much part of "the real world". FreePascal is at least as capable as TurboPascal in the 1980s when the Macintosh OS was written in ... Pascal. It is just that later on C took over the leading position, followed by some OOP languages. Indeed, BASIC has never been part of that world.
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: Bye Bye

Post by marcov »

operator+ wrote: Feb 17, 2022 8:38 Regarding (*), I think the Lazarus/Free Pascal is the same, too. Why you guys only think about grabbing people's code to use with your language but not exporting code from your language so other people could grab and use it with their languages?
What code do we "grab"? Even the QT interface we had to wrap ourselves, and many other languages use that wrapper. Database engines on Unix maybe (on Windows it often goes via ODBC). Moreover, we don't grab from the minority languages you seem to favour, we use some precompiled libraries provided with the system. (like X on *nix, and Winapi on Unix)
All with handcoded headers, in the C world very few projects/teams keep header systems so abstract that they are manchine translatable. (Microsoft a bit with IDL). Nobody helped us there.

Also, on Windows, Free Pascal/Lazarus is quite COM capable, and you can use that to get access on code. Every half decent language has COM support on Windows.
Because you are not confident enough in your own language? I really can't understand.
It is hard work. Primarily that work should be done by the ones that benefit from it.

There is also the problem with any interlanguage interface, that the only somewhat portable interface is a minimal procedural subset. This makes the interface extremely limited.
p/s: there are some Chinese tried to grab Lazarus's LCL to use with their language, Go: https://github.com/ying32/govcl This is the only effort I know of using Pascal code outside of Pascal world and it's from outsiders as well, no one from the Pascal community really think about exporting Pascal code to use with other languages, @marcov? I
That effort was actually based on a Lazarus developer's (Felipe's) attempt to wrap LCL in a C api, for some own project. But providing interfaces to other minority languages is not a core goal of the FPC/Lazarus project. The goal of the FPC/Lazarus project is to build applications in FPC/Lazarus.

We of course always want to facilitate, but the hard work must be done by the people that want it. But except for those few GO people, they just sit in a lazy chair and complain. At least the FB an FPC/Lazarus teams DO something.
consider myself as an outsider to the FreeBASIC community as well. I tried to learn the language to be part of the community but I can't. I always found it's somehow unnatural to write in FreeBASIC and I quickly resort back to Java.
The first time that you go from a commercial "holds your hand" toolchain to an open source toolchain where you sometimes must find your own answers is always difficult. It is a rite of passage we all must go through, and many don't make it. Often it is the difference between somebody doing programming just to further his career, and the ones really loving it.

That said, even if some major language has priority due to e.g. work circumstances (in your case Java, in my case it was C#), it can be wise to keep another language on the side for some utility work. (I used Delphi, and later FPC/Lazarus). Both because it is easier (with e.g. standalone binaries) and to not lose touch with the native world completely.
Last edited by marcov on Feb 17, 2022 11:41, edited 5 times in total.
fxm
Moderator
Posts: 12132
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Bye Bye

Post by fxm »

operator+ wrote: Feb 17, 2022 9:29 Which is the official source of document for FreeBASIC? As I have no idea which keyword or function does, I searched it via Google with freebasic appended to the search string. I found documentation.help is sometimes provides even more information and more useful than the one at freebasic.net.
https://documentation.help/FreeBASIC/ is just a snapshot of the official https://www.freebasic.net/wiki/FBWiki but done in 2016 !
bfuller
Posts: 362
Joined: Jun 02, 2007 12:35
Location: Sydney, Australia

Re: Bye Bye

Post by bfuller »

I don't normally waste my time on threads like this but member "operator+" only just joined 29 December 2021, has a total of 29 posts, and none of them in Beginners Forum. Apparently didn't even click the Help button on FBide to pull up the FreeBASIC Manual.

And why is he/she/it even here if he/she/it prefers other languages?

What does he expect?
operator+
Posts: 40
Joined: Dec 29, 2021 10:47

Re: Bye Bye

Post by operator+ »

@marcov: you guys have fpgui as the native pascal gui toolkit. But you guys have never even consider to export it in the form other language could use. Flattern fpgui to a C interface for other languages able to consume is not as hard with the C++ based QT, isn't it? But no one have ever think about it. No one on the Pascal land use fpgui other it developers. fpgui has no chance to even be a matured/production ready widget set for the Lazarus LCL. There are WinAPI, GTK, QT and Cocoa. More than enough. The fpgui support of LCL will never complete nor ready. But, you guys are willing to let it dead slowly but have not a single thoughts about exporting it. Do I said anything wrong?

fpgui is a bare metal gui toolkit. It talk to the platform's API directly. It's the same as GTK, QT,... It has great potential. But you guys decided to keep it for in house use only so no one will ever heard about it and it will sooner or later dead.

Yes, you wrote your own QT wrapper. The wrapper is yours but it's still you are using QT, which is a C++ based library. There is no Pascal based library that C++ developers have to write their own wrapper to be able to use, isn't it? I said nothing wrong. You only use people's code, but give back nothing.
operator+
Posts: 40
Joined: Dec 29, 2021 10:47

Re: Bye Bye

Post by operator+ »

fxm wrote: Feb 17, 2022 10:41 https://documentation.help/FreeBASIC/ is just a snapshot of the official https://www.freebasic.net/wiki/FBWiki but done in 2016 !
The fact is I found documentation.help is sometimes has more complete document than the current wiki. It should be because the current wiki was edited and the parts I wanted to know got moved to another section or becoming a separate wiki page itself. You do most of the wiki editing, you should know about it, don't you? I'm telling the truth. Sometimes documentation.help just has more details than the current wiki.
operator+
Posts: 40
Joined: Dec 29, 2021 10:47

Re: Bye Bye

Post by operator+ »

bfuller wrote: Feb 17, 2022 11:10 I don't normally waste my time on threads like this but member "operator+" only just joined 29 December 2021, has a total of 29 posts, and none of them in Beginners Forum. Apparently didn't even click the Help button on FBide to pull up the FreeBASIC Manual.

And why is he/she/it even here if he/she/it prefers other languages?

What does he expect?
Because I have no need to opening new threads on Beginners Forum. I found the solutions from Google results most of the time. I said I don't know FreeBASIC. Yes, I don't know OOP FreeBASIC. But I have no problems writting procedural C style FreeBASIC.
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: Bye Bye

Post by marcov »

operator+ wrote: Feb 17, 2022 12:50 @marcov: you guys have fpgui as the native pascal gui toolkit. But you guys have never even consider to export it in the form other language could use.
Fpgui is a 3rd part product, and not part of FPC/Lazarus projects.
Flattern fpgui to a C interface for other languages able to consume is not as hard with the C++ based QT, isn't it?
Yes. And just as we flattened QT when we needed it (well actually it was done originally for Kylix benefit, not FPC/Lazarus, but we have maintained it for 15 years now), groups that want access to fpgui can flatten it. What's the problem?
But no one have ever think about it. No one on the Pascal land use fpgui other it developers. fpgui has no chance to even be a matured/production ready widget set for the Lazarus LCL. There are WinAPI, GTK, QT and Cocoa. More than enough.
I think fpgui never will be a majority target indeed. It comes from the POS/Kiosk world.
The fpgui support of LCL will never complete nor ready. But, you guys are willing to let it dead slowly but have not a single thoughts about exporting it. Do I said anything wrong?
No, all correct. The only detail you miss is that FPGUI is not "ours", but 3rd party by developers that pushed for a Lazarus backend. And again, you miss the core tenet, who does the work, and what is his motivation.
fpgui is a bare metal gui toolkit. It talk to the platform's API directly. It's the same as GTK, QT,... It has great potential. But you guys decided to keep it for in house use only so no one will ever heard about it and it will sooner or later dead.
It is not bare metal, it uses X libraries. On Windows both LCL and fpgui use win32 directly, so no difference there either.

Anyway, I don't see that potential to get it mainstream. As said, its origins are mostly to lower deployment requirements of POS software on minimal and diskless Linux systems that often ran from CF cards (which were very slow then). The second maintainer mostly made educational software for African schools

Both uses sacrifice everything for deployment, which is quite rare (the look and feel are horrible IMHO).

That doesn't mean that nobody in the wide world has the same requirements. If they do, they only have to wrap it, and then use it.
Yes, you wrote your own QT wrapper. The wrapper is yours but it's still you are using QT, which is a C++ based library.
Yeah, and it still runs on Linux which has a C kernel. Your point being ? Every language should have its own OS?
There is no Pascal based library that C++ developers have to write their own wrapper to be able to use, isn't it? I said nothing wrong. You only use people's code, but give back nothing.
We do. We have FPGUI. People that want to wrap it can do so. So that is no different from what the Trolltech (QT) C++ did. Other than they were a multimillion company later part of a multibillion company (Nokia)
Last edited by marcov on Feb 17, 2022 13:46, edited 1 time in total.
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Bye Bye

Post by St_W »

FreeBASIC is a low-level programming language, very much comparable to C. As soon as you want to do enhanced stuff like using external libraries it uses the same techniques as C and thus has similar complexity. It's only simpler than C if you're just using the FB-internal runtime/gfxlib libraries. Due to the similarity to C (it even uses a C compiler internally and all the other components of a typical C development toolchain) you can integrate FreeBasic modules in nearly any other programming language (if it supports C libraries) and use any programming language which can be used from C as well.

It can't be really compared to a high-level language with garbage collection and a bytecode interpreter like Python or Java, they are both technically and conceptually very different, don't have any low-level concepts like pointers or dealing with memory (de)allocation.

And yes, low-level languages are typically harder to learn than high-level ones. And if it's too hard for you that's totally fine, cause high-level languages is all you need in most cases.

FreeBasic is also a niche-language with a small user-base, you simply can't expect as extensive availability of libraries, tools or other resources on the internet as for example C or Java. If you're looking for doing copy-paste programming from stackoverflow or similar sites on the web you probably won't be successful with FB. FB's documentation is great, even when compared to much more commonly used programming languages, you just can't effectively search it via Google or similar search engines.

What FreeBasic definitely doesn't need is arrogant people wanting everything but the kitchen sink readily available without being willing to invest barely any time and resources themselves. We need people, who not only want to use the language but also are willing to contribute back to the language or its ecosystem. Because, and this is often not appreciated as much as is should, everything you you're getting offered here, the software, the documentation, the support in the forums, etc. is provided for free by people doing that in their free time.
Locked