Lazarus and FPC integration

classic Classic list List threaded Threaded
75 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

Felipe Monteiro de Carvalho
On 10/31/05, Elio Cuevas Gómez <[hidden email]> wrote:
> > > > This eliminates:
> > > > a) C++ using any platform independent library, like gtk, qt,
> > > > wxwidgets, etc, because the library is too big to fit a floppy
>
> This is not really a fair reason to reject C++. You can also program gtk 1.2
> applications in C++. Of course you still have all the other problems with
> C++ :).
......
> But anyway you can't spect to fit everything in a floppy do you? You always have to asume something.

Actually it is a fair reason for me. My apps really *need* to fit a
floppy  ... most of the e-mail I get about the installer I created on
Delphi for BrailleVirtual Course is about people trying to put it into
a floppy.

That´s the reality here in Brazil .... there are lot´s of old
computers, specially in one of my main users, the public schools.

I usually test on a Pentium 100Mhz with Win95. If it runs ok I´m happy

If it´s multi-platform I also test on a Pentium233Mhz with Damn Small Linux

> Well, all depends in the application i guess. If i want really small i use
> assambler (mosly for PIC programming), i want really fast i do it in C, if i
> want fast implementation i do it in Python, if i want fast GUI implementation
> i use Lazarus. For anything else i use Pascal.

I want both: small and also a good looking, easy to use GUI created
with a RAD =)

I don´t remember the last time a created a program that does not involve a GUI.

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Import Pascal record function to C

Felipe Monteiro de Carvalho
In reply to this post by L505
On 10/31/05, L505 <[hidden email]> wrote:
> If you had a procedure or a function in a Pascal record, and it was a DLL/DSO, could a C
> application import it as a Struct with a pointer to a function in that struct?

Yes, and the other way is also possible. This is done the other way
round when a pascal program calls RegisterClass from the Windows API.
It is sending a structure has a pointer to a function.

The only possible problem I see is if the structure contains numbers
that are smaller then a Integer (smallint, byte, word, etc) ... then
you may have some problems with the alignment of the data.

>From the Win API example I think that if you simple declare a normal
record on both and use it as a parameter it will work.

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Import Pascal record function to C

Marco van de Voort
> On 10/31/05, L505 <[hidden email]> wrote:
> > If you had a procedure or a function in a Pascal record, and it was a DLL/DSO, could a C
> > application import it as a Struct with a pointer to a function in that struct?
>
> Yes, and the other way is also possible. This is done the other way
> round when a pascal program calls RegisterClass from the Windows API.
> It is sending a structure has a pointer to a function.
>
> The only possible problem I see is if the structure contains numbers
> that are smaller then a Integer (smallint, byte, word, etc) ... then
> you may have some problems with the alignment of the data.
>
> >From the Win API example I think that if you simple declare a normal
> record on both and use it as a parameter it will work.

Runtime library initialising might also be a problem if the DLL uses complex
stuff internally?
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Import Pascal record function to C

Felipe Monteiro de Carvalho
On 10/31/05, Marco van de Voort <[hidden email]> wrote:
> Runtime library initialising might also be a problem if the DLL uses complex
> stuff internally?

What do you mean by complex?

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Import Pascal record function to C

Marco van de Voort
> On 10/31/05, Marco van de Voort <[hidden email]> wrote:
> > Runtime library initialising might also be a problem if the DLL uses complex
> > stuff internally?
>
> What do you mean by complex?

Anything that needs stuff in the RTL initialised. Since this includes
heapmanagement this affects a lot. (like ansistring usage)

Can maybe get solved relatively easy btw (like a call to the DLL init code)
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

Agustin Barto
In reply to this post by Florian Klaempfl-2
On 10/31/05, Florian Klaempfl <[hidden email]> wrote:

> Vincent Snijders wrote:
>
> > Elio Cuevas Gómez wrote:
> >
> >> These are all good things, but if the IDE editor can't handle basic
> >> stuff like international characters it's not very useful.
> >
> >
> > For you. It is useful for most of the English speaking people and those
> > are quiet a lot too, although not as much as the whole world population.
> > And even though I don't live in a English speaking country, I never had
> > problems with it, because all source and comments of my programs are
> > English. Therefore for me it is not a very important issue. It is nice
> > to have for others.
>
> Indeed, if it is so important, somebody would have implemented it already :)

It's a major issue. In here, we're having a serious programmer
shortage. One of the coolest things about Lazarus is that it could
allow us to hire people that comes from a Windows/Delphi background
and integrate them into our Whatever/Linux enviroment. The problem is
that not everyone is capable of writing correct (in terms of grammar
and spelling) english code documentation.

I have nearly 600k lines of Delphi code that was extensively
documented in Spanish. I don't want to rewrite the whole documentation
just because of a bug!
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

Peter Vreman
>> >> These are all good things, but if the IDE editor can't handle basic
>> >> stuff like international characters it's not very useful.
>> >
>> >
>> > For you. It is useful for most of the English speaking people and
>> those
>> > are quiet a lot too, although not as much as the whole world
>> population.
>> > And even though I don't live in a English speaking country, I never
>> had
>> > problems with it, because all source and comments of my programs are
>> > English. Therefore for me it is not a very important issue. It is nice
>> > to have for others.
>>
>> Indeed, if it is so important, somebody would have implemented it
>> already :)
>
> It's a major issue. In here, we're having a serious programmer
> shortage. One of the coolest things about Lazarus is that it could
> allow us to hire people that comes from a Windows/Delphi background
> and integrate them into our Whatever/Linux enviroment. The problem is
> that not everyone is capable of writing correct (in terms of grammar
> and spelling) english code documentation.
>
> I have nearly 600k lines of Delphi code that was extensively
> documented in Spanish. I don't want to rewrite the whole documentation
> just because of a bug!

The cool thing about fpc and lazarus is that you can fix things yourself.
Don't forget that we don't get paid and do it all in our spare free time.



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

Agustin Barto
On 10/31/05, Peter Vreman <[hidden email]> wrote:
>
> The cool thing about fpc and lazarus is that you can fix things yourself.
> Don't forget that we don't get paid and do it all in our spare free time.
>

If Lazarus was written in Java or Smalltalk, I might be able to help
out. But given that I'm not an experienced Pascal (nor GTK+)
programmer...

Although it's a very unfortunate bug, it's not the end of the world.
I'll just do what I usually do: Use fpc+Emacs :)
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

Micha Nelissen
In reply to this post by Bugzilla from elio@mixtk.com
On Sun, 30 Oct 2005 21:08:31 -0600
Elio Cuevas Gómez <[hidden email]> wrote:

> > I'd like to know why this isn't a problem in Eclipse or KDevelop, but is in
> > Lazarus.
>
> Don't take the comment too personal :). I don't think the "problem" is
> necesarily bad, i love Lazarus, it can get me an application done in a few
> hours even with complete lack of documentation. It's just that if used
> incorrectly can lead to huge problems, but that's true for any tool right?

Well, I am aware of the fact that a visual design environment like lazarus
(and delphi and VB), it's easy to fall into the trap to base your backend
design on the GUI design. If Eclipse or KDevelop have a solution for this
problem, then I'd like to hear it, but if they "solve" the problem by not
being a visual design environment at all, the complete point is moot; then
it's really unfair to say they're better because they *lack* features :-).

Micha
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Import Pascal record function to C

L505
In reply to this post by Felipe Monteiro de Carvalho

>Yes, and the other way is also possible. This is done the other way
>round when a pascal program calls RegisterClass from the Windows API.
>It is sending a structure has a pointer to a function.

Thanks for the tip.

I think the structure that describes a procedure being used in a struct is here!

http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windowcla
sses/windowclassreference/windowclassstructures/wndclass.asp


>The only possible problem I see is if the structure contains numbers
>that are smaller then a Integer (smallint, byte, word, etc) ... then
>you may have some problems with the alignment of the data.

Yes I would be careful there... just use portable things like longint, bool, and etc.
instead of boolean and integer.

I'm just thinking in some cases, it is nice to have a record to offer some more organization
(organize like classes, but without object orientation features of course).

It seems records sure are a lot neater than Structs without the asterisks all over - gotta
love Pascal.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

L505
In reply to this post by Bugzilla from elio@mixtk.com


>These are all good things, but if the IDE editor can't handle basic stuff like
>international characters it's not very useful. Another thing is that the IDE
>looks very ugly. I know these are Linux especific, in windows Laz is great.

I think that is GTK. I'm still messing around with fonts and things in GTK. I think the big
problem with GTK fonts/sizes is that they aren't customizable on the fly in many distros?
(i.e. fonts must be set up in some text config file which people rarely play with?)

>Btw, i hate Java :-)

Why? :-) I'll add some reasons to the JAVA-SUCKS PasWiki page if you want. :-) And of course
that with a grain of salt also.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

Felipe Monteiro de Carvalho
On 10/31/05, L505 <[hidden email]> wrote:
> >These are all good things, but if the IDE editor can't handle basic stuff like
> >international characters it's not very useful. Another thing is that the IDE
> >looks very ugly. I know these are Linux especific, in windows Laz is great.
>
> I think that is GTK. I'm still messing around with fonts and things in GTK. I think the big
> problem with GTK fonts/sizes is that they aren't customizable on the fly in many distros?
> (i.e. fonts must be set up in some text config file which people rarely play with?)

I don´t think that GTK 1 is the problem ... TEdit on GTk 1.2 on linux
works pretty well and the source code editor compiled for GTK 2 also
does not work (works even worse) for writting international
characters.

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Import Pascal record function to C

Team Z505
In reply to this post by Marco van de Voort


> > On 10/31/05, Marco van de Voort <[hidden email]> wrote:
> > > Runtime library initialising might also be a problem if the DLL uses complex
> > > stuff internally?
> >
> > What do you mean by complex?
>
> Anything that needs stuff in the RTL initialised. Since this includes
> heapmanagement this affects a lot. (like ansistring usage)
>
> Can maybe get solved relatively easy btw (like a call to the DLL init code)

So you mean automated types, stringlists, and what not?

At least in my case, I will just be using just portable stuff like Pchars, arrays, bools,
longints, and simple stuff like that.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

Team Z505
In reply to this post by Agustin Barto


>It's a major issue. In here, we're having a serious programmer
>shortage. One of the coolest things about Lazarus is that it could
>allow us to hire people that comes from a Windows/Delphi background
>and integrate them into our Whatever/Linux enviroment. The problem is
>that not everyone is capable of writing correct (in terms of grammar
>and spelling) english code documentation.

>I have nearly 600k lines of Delphi code that was extensively
>documented in Spanish. I don't want to rewrite the whole documentation
>just because of a bug!


Have to tried translation tools? I have converted many Russian source code help files from
the KOL project into English using PROMT translator online. Once in a while you get a funny
translation like "I hit the code twice before she compiled me". But most of it is pretty
good and pretty legible, and A LOT more automated than doing it manually.

Translators like alta vista or babelfish are not nearly as good as PROMT.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

Team Z505
In reply to this post by Micha Nelissen


>Well, I am aware of the fact that a visual design environment like lazarus
>(and delphi and VB), it's easy to fall into the trap to base your backend
>design on the GUI design. If Eclipse or KDevelop have a solution for this
>problem, then I'd like to hear it, but if they "solve" the problem by not
>being a visual design environment at all, the complete point is moot; then
>it's really unfair to say they're better because they *lack* features :-).
>
>Micha

Which is why again all that needs to be done is simply the programmer needs to ignore the
component palette, ignore Form1, and write everything from scratch in these cases if he
wants to. Just because Emacs has a crumby and slow textbased tetris games in it, doesn't
mean you have to use them either. It's just their for your convenience (yes, I'd hate to see
games inside Lazarus).

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

Bugzilla from elio@mixtk.com
In reply to this post by Florian Klaempfl-2
El Lun 31 Oct 2005 02:46, Florian Klaempfl escribió:
>
> Indeed, if it is so important, somebody would have implemented it already
> :) _______________________________________________
Code it yorself huh? I would but right now i'm too busy coding stuff in C++,
Java and PHP. I really miss the old days when i did everything in Pascal. I
would love to contribute to Lazarus or FreePascal but i kind of feel that you
guys are way beyond me :-).
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

Bugzilla from elio@mixtk.com
In reply to this post by Vincent Snijders
El Lun 31 Oct 2005 00:18, Vincent Snijders escribió:

> Elio Cuevas Gómez wrote:
> > These are all good things, but if the IDE editor can't handle basic stuff
> > like international characters it's not very useful.
>
> For you. It is useful for most of the English speaking people and those
> are quiet a lot too, although not as much as the whole world population.
> And even though I don't live in a English speaking country, I never had
> problems with it, because all source and comments of my programs are
> English. Therefore for me it is not a very important issue. It is nice
> to have for others.

Ok i accept that i exagerated when i said Lazarus wasn't useful. But the bug
is still very annoying and is a serius obstacle to Lazarus adoption
worldwide. Ignoring the problem doesn't make it go away, we should be looking
for the permanent increase of the quality of Lazarus, which would bring more
users to both projects We do want more users, right?

>
> Vincent.
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

Bugzilla from elio@mixtk.com
In reply to this post by Marco van de Voort
El Lun 31 Oct 2005 04:02, Marco van de Voort escribió:
>
> C shouldn't be faster than Pascal.

True. But for C i already have a good collection of I/O functions that are
significantly faster than printf and friends and orders of magnitude faster
than C++ cout/cin. I know i can write my own functions in Pascal, but it's
too much work for the one shot programs i made. Also, for this particular
application, working with GCC is much easier than FPC. These are not Pascal's
fault, just a set of unfortunate circumnstances.

> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

Bugzilla from elio@mixtk.com
In reply to this post by Micha Nelissen
El Lun 31 Oct 2005 11:30, Micha Nelissen escribió:
>
> Well, I am aware of the fact that a visual design environment like lazarus
> (and delphi and VB), it's easy to fall into the trap to base your backend
> design on the GUI design. If Eclipse or KDevelop have a solution for this
> problem, then I'd like to hear it, but if they "solve" the problem by not
> being a visual design environment at all, the complete point is moot; then
> it's really unfair to say they're better because they *lack* features :-).

Well, i never said these were better than Lazarus (in fact this is the first
time i even mention them in this list). For me Eclipse is a resource hog and
it's not usable in my computer, so it's out. KDevelop is a nice IDE and is
adequate for C++ programming. I have only use it to develop some small SDL
games and not for GUI, but i have experimented a bit with programming KDE
applications. KDevelop integrates with Qt Designer which is a good Form
editor imho, so i don't know how it *lacks* features.
For Pascal development, KDevelop is a bloated kate, so i just program directly
in Kate instead, much faster, much simpler. Combine with Konqueror and you
get a wonderful UDE (Unintegrated Development Enviroment).
Is this "UDE" better than Lazarus? Probably not, but it's sure flexible. I
know this option is not for everybody, but it pays back.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus and FPC integration

Bugzilla from elio@mixtk.com
In reply to this post by L505
El Lun 31 Oct 2005 18:34, L505 escribió:
> >These are all good things, but if the IDE editor can't handle basic stuff
> > like international characters it's not very useful. Another thing is that
> > the IDE looks very ugly. I know these are Linux especific, in windows Laz
> > is great.
>
> I think that is GTK. I'm still messing around with fonts and things in GTK.
> I think the big problem with GTK fonts/sizes is that they aren't
> customizable on the fly in many distros? (i.e. fonts must be set up in some
> text config file which people rarely play with?)

Do you mean /etc/x11/(xorg.conf|xf86config-4)?
Font management in X is very confusing and is a pain, but i fail to see how
this relates to Lazarus not acepting "á"s.
To me the problem seems to be in SynEdit and it's custom text management, but
who knows.
Btw, the problems seems to be in the PropertyEditor too, extrange since this
hasn't the problem before...

>
> >Btw, i hate Java :-)
>
> Why? :-) I'll add some reasons to the JAVA-SUCKS PasWiki page if you want.
> :-) And of course that with a grain of salt also.
>

FLAMES DISCLAIMED!
Well, just the standard "Java is slow/Java is a resource hog/You can't make an
OS in Java/etc" kind of critics which everybody should be bored to hear right
now. Also in a smaller amount "Java is not free". There's a couple of other
personal reasons too but since this discussion is way too of-topic already
i'll leave them for another time :-).

> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
1234