[fpc-pascal] n-tier development with Free Pascal

2009-01-23 Thread Graeme Geldenhuys
I haven't dabbled into the DB components in FPC and Lazarus much. Does
Free Pascal have a TClientDataset?  Has anybody done any 3-tier
development with Free Pascal?

The last time I did 3-tier development with Delphi 7 was some 5 years
ago. I found this link which is a drop in replacement for the Delphi
midas.dll. And the source code is available and for free.

Is this useful for Free Pascal?

http://www.vglib.com/link-4.html


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] A bash script file to help bind functions

2009-01-23 Thread ik
Hello,

I've created for my own use a bash script file that try to find for me
the proper library that contain a function when I create binding for
libraries.
The script file can be found at
http://ik.homelinux.org/projects/files/find_function.sh .

I wish to create an addition to Lazarus that will use the script and
be able to parse the findings and help it inside the IDE.
Maybe it can be used also in fp (if any one wishes to use it there).

Anyway, you are more then welcome to use it if you find it useful,
including adding comments, requests, changes etc...

>From time to time I might update the script, so you can check the
changes at the following svn:
http://code.google.com/p/pasxlibbind/source/browse/trunk/find_function.sh

Or at a web page at my site (that I will create in few days).

Ido
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] for .. in loop implementation

2009-01-23 Thread Lee Jenkins

leledumbo wrote:

OK, I've read  http://wiki.freepascal.org/Modernised_Pascal this  (and the
FAQ as well). I disagree with any statement saying that for .. in loop is
only a type-saver. It's a good language extension and should be included
(since Delphi already have this, it will also be a good idea). Consider the
following example:



I'm not sure when Delphi first implemented support For..In but I've been using 
D2007 and now D2009 without ever using the construct once.  That's not to say it 
would be useful to use, I have just never really needed it I guess.


--
Warm Regards,

Lee


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] cross platform version of IsCharAlpha()

2009-01-23 Thread vmars

'JcfStringUtils.pas' very strange looking code.
Please, what format is the file in?
Thanks!

ô¿ô
V  e  r  n

WinXp sp2 ,  Delphi5, WebDwarf, Trellian WebPage, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe,

wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1
http://www.flickr.com/photos/vmars956/

Wanted: Dwarf Hibiscus (Orange/Rasberry)
- Original Message - 
From: "Graeme Geldenhuys" 

To: "FPC-Pascal users discussions" 
Sent: Friday, January 23, 2009 2:02 AM
Subject: Re: [fpc-pascal] cross platform version of IsCharAlpha()



On Mon, Jan 12, 2009 at 3:39 PM, Paul Ishenin  wrote:


Here in
http://svn.freepascal.org/svn/lazarus/trunk/components/jcf2/Utils/JcfStringUtils.pas
I used the same code :)


Thanks Paul, I feel better already!  I'm not alone.  :-)


Regards,
 - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re[2]: [fpc-pascal] Maybe one stupid question

2009-01-23 Thread JoshyFun
Hello Eduardo,

Friday, January 23, 2009, 1:46:59 PM, you wrote:

>>I'm using FPC 2.2.2 running over WinXP SP2. Are there any technical
>>reasons that expains that a program runs faster using all checks ( I/O,
>>Range, Overflow, Stack and Verify calls ) with optimization level 1
>>and using heaptrace, than the same one compiled without any check,
>>optimization level 2 or 3 and not using heaptrace ?

EM> Perhaps your level 1 code fits in level 1-2 cache, and your level 2-3
EM> don't, causing more cache misses. Try to compile with -Os  instead
EM> level 1-2-3 and see if it's faster.

Test done also, the -Os does not provide a significative change. Just
to show some numbers:

with -Os, all checks (overflow...) iteration time: 3.650 secs.
with -Os, all checks + heaptrace iteration time: 3.517 secs.

So, heap trace makes programs faster :-?

The cache theory is fine, but the -O2,-O3 produces smaller code than
-O1 (less calls and memory accesses) but program runs slower.

I had also tried to use cmem instead the default memory manager and as
expected the results are worst, iteration time 3.870 seconds.

Also gprof is not helping too much because there are no clear
differences about calls in both optimized and non optimized modes,
except the calls to range check, object check and others as expected
in the "with checks" version which runs faster :-?

With gprof I saw in my code a lot of FillChar calls (which are not in
my code at all), so I think that they comes from the internal
initializations of variables and records, unfortunatly the calls
counter does not appear (spontaneous), and the fact that heaptrace
produces faster code makes me think in the memory manager, but without
a conclusion to this "trivial".

-- 
Best regards,
 JoshyFun

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Workaround for #0011837 (FPC <= 2.2.2 with GTK >= 2.13)

2009-01-23 Thread Vincent Snijders

Giovanni Premuda schreef:

Vincent Snijders wrote:


Anybody (also Giovanni Premuda) anyone spread this all over the 
Lazarus site 
OK, I had the wrong impression that the lazarus docs where editable only 
by insiders, as the main site seems to be.



Good, Lazarus is essentially a community project.


So:
by posting forum messages 

Done


Thanks.


and submitting news items

How?


I was about to point you to www.lazarus.freepascal.org, we are in a 
process to move that to another server. Creating news items is yet 
supported in that server, you can post a message in the announcement 
forum. That will show up on the future home page.


, anybody (also Giovanni Premuda) can edit the Lazarus readmes and 
release notes on the wiki
Done, 
http://wiki.lazarus.freepascal.org/Installing_Lazarus#Ubuntu_.2F_Debian
anybody (also Giovanni Premuda) can request updates of the debian debs 
in the debian bug tracker.

I don't think this is necessary


No problem.



There are no notes on sourceforge to be edited or updated, so nobody 
can do that.

Could be useful


Anybody (also Giovanni Premuda) can spread this everywhere else.

Done. (Ubuntu Forums)


Thanks.



Do you get it?
No, I would like to see this as a news item and on the FAQs on the main 
site.


You can edit the FAQ here: http://wiki.lazarus.freepascal.org/Lazarus_Faq

I will ask to update the link on www.lazarus.freepascal.org to this 
page. The other page has not been updated in a long time. It causes 
confusion that there are two Lazarus FAQ pages.


For the news items see above. We are working on it.


But it looks like you are understimating the importance of this bug:

I don't think I underestimate the importance of this bug, maybe I 
underestimate the influence of spreading such a note.



1. Potential user (i.e. potential contributor) install lazarus.
2. Potential user launches lazarus and sees an ugly interface
3. Potential user searches around and finds out that he can rebuild 
lazarus with GTK2 interface

4. Potential user rebuilds lazarus and... the rebuild doesn't work

With the note known to everybody all stays the same, until here.


5. Potential user thinks: I knew it was to good to be true
And is surprised by the rapid progress of Lazarus in 2009 when he tries 
it next year.



6. Potential user is neither user nor potential anymore

Let's just acknowledge the fact that Lazarus is not yet ready for him.

I propose a 5A and 6A.
5A. Potential user searches around and finds the note about ignoring 
linker errors and gets a gtk2 based Lazarus and creates gtk2 apps.


6A. He hits an annoying bug in the gtk2 based Lazarus, which is not 
present when using gtk1. He says, I knew it was too good to be true and 
potential user is no user anymore.


I rather prefer to spend my time on finding solutions.
> 1. Potential user (i.e. potential contributor) install lazarus.
> 2. Potential user launches lazarus and sees an ugly interface
That is why I am trying to help with the fpc 2.2.4 release, so that we 
can release Lazarus 0.9.28 with gtk2. Others have to improve the gtk2 
support in Lazarus, I cannot do that.

> 3. Potential user searches around and finds out that he can rebuild
> lazarus with GTK2 interface
That is why I am preparing a 0.9.26.2 release (based on gtk1, because of 
stability reasons). If somebody prefers beauty over stability, then they 
can rebuild Lazarus with the gtk2 widget set, because the Makefiles and 
the IDE know how to add the linker flag for fpc 2.2.2.


> 4. Potential user rebuilds lazarus and ...
It remains to be seen how many will become Lazarus contributors. It is 
true that gtk(2) has no special maintainer, much unlike the other major 
widget sets (carbon, qt, win32 and wince).


Vincent
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Maybe one stupid question

2009-01-23 Thread Eduardo Morras

At 01:10 23/01/2009, you wrote:

Hello FPC-Pascal,

I'm using FPC 2.2.2 running over WinXP SP2. Are there any technical
reasons that expains that a program runs faster using all checks ( I/O,
Range, Overflow, Stack and Verify calls ) with optimization level 1
and using heaptrace, than the same one compiled without any check,
optimization level 2 or 3 and not using heaptrace ?


Perhaps your level 1 code fits in level 1-2 cache, and your level 2-3 
don't, causing more cache misses. Try to compile with -Os  instead 
level 1-2-3 and see if it's faster.



I had expected around a 5% faster with the non-checks config, but I
get a 2% slower program :-?

Everything has been tested using Lazarus 1 month SVN, using a 1 minute
runtime check.

--
Best regards,
 JoshyFun

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re[2]: [fpc-pascal] Maybe one stupid question

2009-01-23 Thread JoshyFun
Hello leledumbo,

Friday, January 23, 2009, 7:55:28 AM, you wrote:

l> Perhaps bugs in the optimizer, I usually get MUCH faster code with
l> optimization. Well... depending on the code. You can try examining the
l> assembler output (-a compiler switch, -alnrt for more informative output).

I had done it, but the assembler output does not help too much as the
.s files are 4 megabytes :) and the performance loose is somehow
distributed around all the code.

My last test is even worst, same settings except the heaptrace, better
performance with heaptrace activated :-? I think that I must check
that Lazarus is passing all parameters well to fpc...

-- 
Best regards,
 JoshyFun

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] cross platform version of IsCharAlpha()

2009-01-23 Thread Graeme Geldenhuys
On Mon, Jan 12, 2009 at 3:39 PM, Paul Ishenin  wrote:
>
> Here in
> http://svn.freepascal.org/svn/lazarus/trunk/components/jcf2/Utils/JcfStringUtils.pas
> I used the same code :)

Thanks Paul, I feel better already!  I'm not alone.  :-)


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal