Repurpose the Lazarus IDE
Repurpose the Lazarus IDE
This just pop out of my head. Is it possible to for the Lazarus IDE to be used as FreeBASIC IDE (after modifying it to suite FB) since it is already complete. It has an extensive component library. This would really put FB in the mainstream/lime light. Just my 2 cents.
Re: Repurpose the Lazarus IDE
Yes, in theory of course. For the basic IDE usage (not designer, not the various tools like intellisense that work with sourcecode, those parts are larger and more interweaved with Pascal than you might think, it would require a Basic equivalent of quite some Pascal features. At least some form of RTTI, method variables, class types and virtual methods)tcltkdev wrote:This just pop out of my head. Is it possible to for the Lazarus IDE to be used as FreeBASIC IDE (after modifying it to suite FB) since it is already complete.
Reuse of the component library (and the related designer) will be hard, it uses a lot of Pascal features (inheritance, RTTI, classtype variables (meta classes), exceptions and the rather unique class constructor system) that FB doesn't have afaik.It has an extensive component library. This would really put FB in the mainstream/lime light. Just my 2 cents.
The component library uses many features of Object Pascal. Worse, they even had to extend C++ in BCB to support it. (and then it works only quite clumsily). In general reuse of OO components meant for a different compiler than what you are using is very hard.
Personally I wouldn't even try, but build something similar in FB, porting select code from lazarus to speed up if needed. Having something to mimic is always faster.
Last edited by marcov on May 15, 2012 10:28, edited 1 time in total.
Re: Repurpose the Lazarus IDE
IMO FB is allready in the mainstream. For cross-platform development (win32 / LINUX) I usetcltkdev wrote:This would really put FB in the mainstream ...
- Geany IDE (extended by homebrew custom commands like FBeauty or h_2_bi)
- Glade3 as GUI designer (GTK+ toolkit)
- gettext for I18N / L10N
- devhelp as help browser (FB docs and library docs, all-in-one)
- fb-doc for documentation (combined with GTK-Doc or Doxygen)
-
- Posts: 6
- Joined: Apr 11, 2012 17:40
Re: Repurpose the Lazarus IDE
No offense intended but if you have to figure out how to get all of those components to work together as a newbie so that you can develop in freebasic?......................yikes!TJF wrote:IMO FB is allready in the mainstream. For cross-platform development (win32 / LINUX) I usetcltkdev wrote:This would really put FB in the mainstream ...
What do you miss?
- Geany IDE (extended by homebrew custom commands like FBeauty or h_2_bi)
- Glade3 as GUI designer (GTK+ toolkit)
- gettext for I18N / L10N
- devhelp as help browser (FB docs and library docs, all-in-one)
- fb-doc for documentation (combined with GTK-Doc or Doxygen)
Just tell the guy the truth, freebasic is a hobby language. Yes, you can make some cool stuff with it but he might want to learn to use VB(windows) or Gambas(Linux) if he wants all the bells and whistles. The only other option as I see it is to get all the users to give up their code and libs so that everyone can use them and pick the best one(not going to happen).
Re: Repurpose the Lazarus IDE
I see it vice-versa. Nobody needs all those components as a newbie. In Lazarus, vb or Gambas a beginner has to deal with all the bells and whistles in any way, at least to sort out an (for him) unneccessary feature.konaexpress wrote:No offense intended but if you have to figure out how to get all of those components to work together as a newbie so that you can develop in freebasic?......................yikes!
Just tell the guy the truth, freebasic is a hobby language. Yes, you can make some cool stuff with it but he might want to learn to use VB(windows) or Gambas(Linux) if he wants all the bells and whistles. The only other option as I see it is to get all the users to give up their code and libs so that everyone can use them and pick the best one(not going to happen).
In FB the environment grows with the users knowledge, beginning with an editor and the help system. When starting to use libraries, the help system grows and covers the new docs. When needing GUI, the designer gets added. And so on ...
In each step the user has to learn just one new component. It's not hard to get the components working together, the important knowledge for newbies is to select the right compoments from beginning on. Yes, FB starts as a hobby language and is also prepared for professional usage (with the focus on the hobby side).
Re: Repurpose the Lazarus IDE
At work I'm a PowerBuilder developer since year 2000 and the only open source RAD tools that comes close to commercial products are Gambas & Lazarus Project. If I miss anything do mention it here. But I am comfortable programming in basic-like languages like PowerBuilder, VB.Net, FreeBASIC. As much as Lazarus is a very decent tool, I yet have to master it's syntax and component library.
That's why I was musing on the idea of repurposing Lazarus. It's no longer justifiable to forage and scavenge for code when there is limited time to develop a particular application and commercial tools offer rapid application capabilities.
.5% of my applications are written in FreeBASIC and exclusively console applications. I can develop from scratch an Invoicing program in PowerBuilder in a little as 2 hours. This would include database design and the development of user interface and invoice printing. I doubt if we could develop something this fast with existing open source tools without resorting to using a framework.
PowerBuilder is prohibitively expensive so I would not consider buying it for developing small applications that I would like to sell. Lazarus is the closest to being complete but again pascal is outside my present programming skill set and Gambas is a linux only and 99% of clients are Windows-based.
That's why I was musing on the idea of repurposing Lazarus. It's no longer justifiable to forage and scavenge for code when there is limited time to develop a particular application and commercial tools offer rapid application capabilities.
.5% of my applications are written in FreeBASIC and exclusively console applications. I can develop from scratch an Invoicing program in PowerBuilder in a little as 2 hours. This would include database design and the development of user interface and invoice printing. I doubt if we could develop something this fast with existing open source tools without resorting to using a framework.
PowerBuilder is prohibitively expensive so I would not consider buying it for developing small applications that I would like to sell. Lazarus is the closest to being complete but again pascal is outside my present programming skill set and Gambas is a linux only and 99% of clients are Windows-based.
Re: Repurpose the Lazarus IDE
Eclipse and Java being the main exception. But they are still clumsy with the designer.tcltkdev wrote:At work I'm a PowerBuilder developer since year 2000 and the only open source RAD tools that comes close to commercial products are Gambas & Lazarus Project. If I miss anything do mention it here.
If you can't master Delphi syntax, then this endeavour is hopeless. You are talking about tens of manyears here.But I am comfortable programming in basic-like languages like PowerBuilder, VB.Net, FreeBASIC. As much as Lazarus is a very decent tool, I yet have to master it's syntax and component library.
That's why I was musing on the idea of repurposing Lazarus. It's no longer justifiable to forage and scavenge for code when there is limited time to develop a particular application and commercial tools offer rapid application capabilities.
Lazarus had the disadvantage of being the first, without having free source code to convert (or copy wrt architecture). A FB based based clone would move much faster. Specially if it were GPL (and thus could reuse converted/modified FPC code directly).5% of my applications are written in FreeBASIC and exclusively console applications. I can develop from scratch an Invoicing program in PowerBuilder in a little as 2 hours. This would include database design and the development of user interface and invoice printing. I doubt if we could develop something this fast with existing open source tools without resorting to using a framework.
But I think FB as compiler is not yet ready to start something like that. I would wait for some more features before starting a real large project.
- proper base level of classes, including proper full polymorphism (virtual methods).
- An easy as possible string type.
- Some form of RTTI, to automated streaming of forms and components
- a meta class type
The metaclass type is a requirement, but not necessarily in the form as Delphi/FPC have it. Maybe there are other solutions too (I actually don't know how C++ handles such cases).
WIth metaclass I mean separation of selection which class to create, and the moment of creation.
So
Code: Select all
DIM animal AS Tmammal;
switch (somevalue)
case 1 : animal=new Duck()
case 2 : animal=new Elephant()
case 3 : animal=new Pig()
Code: Select all
DIM animal AS Tmammal;
DIM animaltype as Class of TMammal;
switch (somevalue)
case 1 : animaltype=Duck
case 2 : animaltype=Elephant
case 3 : animaltype= Pig
(lots of code here)
animal=new Animaltype()
Besides this, for any kind of work with a large codebase (more than a couple of thousand) the compiler must be fairly rock solid, and codegeneration bugs must be very rare, and not GPF or internal error on every uncommon combination of functionality. I don't know how FB is on that road.
If you need something now, this is all academic. Building something is an multiyear (or a full lazarus clone a multi decade) endeavour with current development levels.PowerBuilder is prohibitively expensive so I would not consider buying it for developing small applications that I would like to sell. Lazarus is the closest to being complete but again pascal is outside my present programming skill set and Gambas is a linux only and 99% of clients are Windows-based.
So that means the options are (1) the not so RAD use what's there route that TJF advocates (2) buy a commercial tool (Real Basic/PowerBuilder, or, as I did, Delphi) (3) use Lazarus.
P.s. I'm a Free Pascal developer and occasionally work on Lazarus too.
Re: Repurpose the Lazarus IDE
FB is based on the GNU compiler suite. That means we can link to each library with an C API. A lot of libraries / headers are available. New headers or updates can be generated fast.
FB may not be ready for this. But the libraries are:marcov wrote:But I think FB as compiler is not yet ready to start something like that. I would wait for some more features before starting a real large project.
The first is the biggest problem. The string type thing may be my own bias, and the RTTI too (generate code in separate files for it, as IIRC TJF said GTK does, could be a workaround for that).
- proper base level of classes, including proper full polymorphism (virtual methods).
- An easy as possible string type.
- Some form of RTTI, to automated streaming of forms and components
- a meta class type
The metaclass type is a requirement, but not necessarily in the form as Delphi/FPC have it. Maybe there are other solutions too (I actually don't know how C++ handles such cases).
Use GLib types.marcov wrote:
- proper base level of classes, including proper full polymorphism (virtual methods).
IMO the FB STRINGS are very powerful. In rare cases I use the GLib GString type.marcov wrote:
- An easy as possible string type.
Create GUI-XML files with Glade3 and use GtkBuilder.marcov wrote:
- Some form of RTTI, to automated streaming of forms and components
Use GLib type system.marcov wrote:
- a meta class type
Re: Repurpose the Lazarus IDE
It is not. It uses it as C backend, which is something completely else.TJF wrote:FB is based on the GNU compiler suite.
Maybe. But for the sake of argument let's assume you can use most C stuff on Linux, and use those secondrate libs on Windows.That means we can link to each library with an C API. A lot of libraries / headers are available. New headers or updates can be generated fast.
What was the point?
If you can define glib polymorphic objects, and can use them straight for all intents and purposes, and without macro or casting trickery in FB, then you are right. (but I doubt it)FB may not be ready for this. But the libraries are:
Use GLib types.marcov wrote:
- proper base level of classes, including proper full polymorphism (virtual methods).
I've no idea here actually.IMO the FB STRINGS are very powerful. In rare cases I use the GLib GString type.marcov wrote:
- An easy as possible string type.
I might not want to stream to XML, but to some binary format to embed in the EXE. Otherwise I have to have a full blown XML parser in every exe for the most minimal thing.Create GUI-XML files with Glade3 and use GtkBuilder.marcov wrote:
- Some form of RTTI, to automated streaming of forms and components
Moreover, I already told you several times, I don't take GTK serious on Windows.
See above. In general I name features needed for FB you name workarounds because FB lacks them. Something totally different.Use GLib type system.marcov wrote:
- a meta class type
Re: Repurpose the Lazarus IDE
FB is based on the GNU assembler gas and the GNU linker ld. Late releases (>0.22) also have the C-emitter for gcc. Yes, we're speaking about totaly different topics. I talk about FreeBasic.marcov wrote:It is not. It uses it as C backend, which is something completely else.TJF wrote:FB is based on the GNU compiler suite.
You doubt and I can. (The new GLib headers in version 0.24 are required.)marcov wrote:If you can define glib polymorphic objects, and can use them straight for all intents and purposes, and without macro or casting trickery in FB, then you are right. (but I doubt it)
I haven't done this. But I'm sure it's possible to write a tool that uses GtkBuilder to parse the XML file in to memory and extracts the GUI tree from there to a file. That file can be embeded in the binary. (I'm not sure if I18N / L10N will be supported that way.)marcov wrote:I might not want to stream to XML, but to some binary format to embed in the EXE. Otherwise I have to have a full blown XML parser in every exe for the most minimal thing.
Who needs features for FB when they're available in open source libraries?marcov wrote:In general I name features needed for FB you name workarounds because FB lacks them. Something totally different.
Re: Repurpose the Lazarus IDE
(part of binutils, not GCC, so irrelevant)TJF wrote:marcov wrote:FB is based on the GNU assembler gas and the GNU linker ld.TJF wrote:FB is based on the GNU compiler suite.
Yes, but that is still not based on. THat is being able to use it. At arms lengthLate releases (>0.22) also have the C-emitter for gcc. Yes, we're speaking about totaly different topics. I talk about FreeBasic.
We'll see what you come up with. (do the classic a duck quacks etc and with the separation of creation written above) But I bet it will be full of macro trickery and casts.You doubt and I can. (The new GLib headers in version 0.24 are required.)marcov wrote:If you can define glib polymorphic objects, and can use them straight for all intents and purposes, and without macro or casting trickery in FB, then you are right. (but I doubt it)
I'm also sure that you can change GTKBuilder into Visual Studio if you work long and hard enough. But that does not make GTKBuilder Visual studio :-)I haven't done this. But I'm sure it's possible to write a tool that uses GtkBuilder to parse the XML file in to memory and extracts the GUI tree from there to a file. That file can be embeded in the binary. (I'm not sure if I18N / L10N will be supported that way.)marcov wrote:I might not want to stream to XML, but to some binary format to embed in the EXE. Otherwise I have to have a full blown XML parser in every exe for the most minimal thing.
[/quote]Who needs features for FB when they're available in open source libraries?marcov wrote:In general I name features needed for FB you name workarounds because FB lacks them. Something totally different.
I haven't seen anything yet. Just the most god ugly macro and casting loaded code that I wouldn't touch with a ten foot bargepole.
Re: Repurpose the Lazarus IDE
There's nothing to come up with.marcov wrote:We'll see what you come up with.
I came up with these features in the all-in-one header for GTK 2.22. Meanwhile there were versions 2.24, 3.0 and 3.2. And meanwhile the glib-objects header is separated.
When translating a C header one of my main targets is: the C documentation and the examples should be usable for FB as well. Meaning the FB source must be as similar as possible to the C source. ';'s removed, variable and function declarations addapted, that's it. So it's not up to me how the source code looks like.marcov wrote:Just the most god ugly macro and casting loaded code that I wouldn't touch with a ten foot bargepole.
BTW: C users and I can handle the resulting code, containing well documented macro and function calls. You can find hundreds of examples on the net. Maybe because we don't try to program with a bargepole.
Re: Repurpose the Lazarus IDE
I'm not asking for a anything GTK. I just want to see a simple example implementing objects with full polymorphisms en virtual. How workable the endresult looks. And if a not diehard user could think that up. (since we are talking about a RAD here, productive and easy)TJF wrote:There's nothing to come up with.marcov wrote:We'll see what you come up with.
I came up with these features in the all-in-one header for GTK 2.22. Meanwhile there were versions 2.24, 3.0 and 3.2. And meanwhile the glib-objects header is separated.
Yes, and assembler users can handle asm perfectly too. Still most people prefer HLLs, and even experienced assembler coders are faster with HLL. This is no different.When translating a C header one of my main targets is: the C documentation and the examples should be usable for FB as well. Meaning the FB source must be as similar as possible to the C source. ';'s removed, variable and function declarations addapted, that's it. So it's not up to me how the source code looks like.marcov wrote:Just the most god ugly macro and casting loaded code that I wouldn't touch with a ten foot bargepole.
BTW: C users and I can handle the resulting code,
Doing it by hand with a lot of macro casting is possible but (much) more laboursome and errorprone. Just like asm is.
IOW like procedural is not ideal in asm, is OO not ideal (to put it gently) in procedural.
Re: Repurpose the Lazarus IDE
Fine.marcov wrote:I just want to see a simple example implementing objects with full polymorphisms en virtual. How workable the endresult looks.
As I said: take any C example, translate it to FB and use the new glib-object.bi header.
Re: Repurpose the Lazarus IDE
"any"? I've never seen a clean C form of OO. Which is exactly my point.TJF wrote:Fine.marcov wrote:I just want to see a simple example implementing objects with full polymorphisms en virtual. How workable the endresult looks.
As I said: take any C example, translate it to FB and use the new glib-object.bi header.