Re: [lazarus] How to set LCL_PLATFORM

2008-01-02 Thread Dave Parsons
On Wed, 2 Jan 2008 20:52:58 +0100, Mattias Gaertner wrote:

> On Wed, 02 Jan 2008 19:16:13 +0100 (CET)
> "Dave Parsons" <[EMAIL PROTECTED]> wrote:
> 
> > Hi all,
> > 
> > I'm beginning to put together a native OS/2 version of Lazarus
> > and I need to define a new platform.
> > >From the online documentation and the source code it seems that
> > the thing to do is to define LCL_PLATFORM.
> > fpcmake.ini has a definition of LCL_PLATFORM but it differs from
> > the definitions in the Lazarus Makefile.fpc files.
> > 
> > So my questions at the moment are, 
> > 1. is there a global way to set this or is it a case of hand editing
> >each makefile.fpc?
> > 2. what should the new platform be called?
> >OS/2 can work in non GUI mode, GUI mode using its native PM API, 
> >X using XFree and Qt3 emulation, so my preference would be os2pm.
> 
> LCL_PLATFORM is for widgetset like gtk. Maybe you want to first try to
> get gtk running on OS/2 before starting a new widgetset.

There is already a Gtk1 port for OS/2 which works with various 
X interfaces such as HOBX11, everblue or XFreeOS/2, but I want
a native OS/2 PM version.

> Otherwise: I can setup a new widgetset, but I need a good name.

Yes, that is what I mean with os2pm above but I was not thinking
of making it official at the moment since there is a lot of work
to do which may or may not succeed. I just would like a way to
minimize the amount of editing required during the initial
development/feasibility phase and to choose a name which would
be acceptable to all if the port is successful.

Cheers,
Dave



_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] madelbrot benchmark much faster

2008-01-02 Thread Marc Santhoff
Am Mittwoch, den 02.01.2008, 21:30 + schrieb Paulo Costa:
> At 18:46 02/01/2008, willem wrote:
> >Vincent has made an improved Mandelbrot benchmark.
> >
> >i  did run the original mandelbrot benchmark with N =5000. It took 2: 20 
> >minutes.
> >
> >The improved version took 2:00 minutes.
> 
> 
> If you see the gcc version you'll see that it relies on SSE2 instructions 
> to perform two double computations with one instruction:
> 
> http://shootout.alioth.debian.org/gp4/benchmark.php?test=mandelbrot〈=gcc&id=3 
> 
> "
>   Uses SSE packed doubles to run the inner loop computations in parallel.
>I don't have a machine with SSE to test with, but the assembly looks
>pretty nice.  With gcc-3.4.2 there's no difference in the assembly
>between -msse2 and -msse3, YMMV.  It uses gcc's vector extentions
>( http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Vector-Extensions.html ),
>so it will run (slowly) on hardware without SSE.
> "
> That is why it is twice as fast. The  "-funroll-loops" may help a bit also, 
> because it is very aggressive and can eradicate some loop variables...
> 
> I think that the only "easy" way for fpc to be competitive in cases like 
> these is to have explicit types for MMX and SSEn data and the "functions" 
> to operate with them, like gcc does...
> And, no I'm not the one who can send those patches :(

FYI:

There is a pascal compiler (no objects IIRC) available that generates
SIMD code for various CPUs. Maybe some code from there can be reused.

Look there:



HTH and a lucky new year,
Marc


_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Lazarus-related Searchengine

2008-01-02 Thread Johannes Mueller

Hi,

the searchfunction of the Lazarus-relevant sites isn't the best one. And 
to find all informations, you have to search on different sites and a 
standard Google-search returns a lot of irrelevant results.


Why we don't should use a mature technologie, adjusted specially for 
FPC/Lazarus?
I have defined such a sourceengine, powered by Google and build a small 
site.
On this site, everyone can find an  Lazarus/FPC-relatet  search-field  
which  returns only sites from related domains.
For comfortable use the site contains  furthermore a searchfeld for a 
standard-websearch.


Initially, the site is located under the following URL:

www.search.lazarusforum.de 

If someone know relevant sites which are not listet, please send me an 
Email, so that I could add more sites.


A new URL will follow if the site is adequate frequented.


regards Johannes

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] madelbrot benchmark much faster

2008-01-02 Thread Paulo Costa

At 18:46 02/01/2008, willem wrote:

Vincent has made an improved Mandelbrot benchmark.

i  did run the original mandelbrot benchmark with N =5000. It took 2: 20 
minutes.


The improved version took 2:00 minutes.



If you see the gcc version you'll see that it relies on SSE2 instructions 
to perform two double computations with one instruction:


http://shootout.alioth.debian.org/gp4/benchmark.php?test=mandelbrot&lang=gcc&id=3 


"
 Uses SSE packed doubles to run the inner loop computations in parallel.
  I don't have a machine with SSE to test with, but the assembly looks
  pretty nice.  With gcc-3.4.2 there's no difference in the assembly
  between -msse2 and -msse3, YMMV.  It uses gcc's vector extentions
  ( http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Vector-Extensions.html ),
  so it will run (slowly) on hardware without SSE.
"
That is why it is twice as fast. The  "-funroll-loops" may help a bit also, 
because it is very aggressive and can eradicate some loop variables...


I think that the only "easy" way for fpc to be competitive in cases like 
these is to have explicit types for MMX and SSEn data and the "functions" 
to operate with them, like gcc does...

And, no I'm not the one who can send those patches :(


Paulo Costa


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] How to set LCL_PLATFORM

2008-01-02 Thread Mattias Gaertner
On Wed, 02 Jan 2008 19:16:13 +0100 (CET)
"Dave Parsons" <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> I'm beginning to put together a native OS/2 version of Lazarus
> and I need to define a new platform.
> >From the online documentation and the source code it seems that
> the thing to do is to define LCL_PLATFORM.
> fpcmake.ini has a definition of LCL_PLATFORM but it differs from
> the definitions in the Lazarus Makefile.fpc files.
> 
> So my questions at the moment are, 
> 1. is there a global way to set this or is it a case of hand editing
>each makefile.fpc?
> 2. what should the new platform be called?
>OS/2 can work in non GUI mode, GUI mode using its native PM API, 
>X using XFree and Qt3 emulation, so my preference would be os2pm.

LCL_PLATFORM is for widgetset like gtk. Maybe you want to first try to
get gtk running on OS/2 before starting a new widgetset.

Otherwise: I can setup a new widgetset, but I need a good name.


Mattias

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] madelbrot benchmark much faster

2008-01-02 Thread Vincent Snijders

willem schreef:

Vincent has made an improved Mandelbrot benchmark.

i  did run the original mandelbrot benchmark with N =5000. It took 2: 20 
minutes.




I will submit the new version in a couple of days ("Leave it a couple of 
days"): http://shootout.alioth.debian.org/gp4/faq.php#implement


Vincent

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] madelbrot benchmark much faster

2008-01-02 Thread willem

Vincent has made an improved Mandelbrot benchmark.

i  did run the original mandelbrot benchmark with N =5000. It took 2: 20 
minutes.


The improved version took 2:00 minutes.

I also tried to run the g++ mandelbrot benchmark but I got 14 errors 
because this program is very complex.


regards Wim

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] How to set LCL_PLATFORM

2008-01-02 Thread Dave Parsons
Hi all,

I'm beginning to put together a native OS/2 version of Lazarus
and I need to define a new platform.
>From the online documentation and the source code it seems that
the thing to do is to define LCL_PLATFORM.
fpcmake.ini has a definition of LCL_PLATFORM but it differs from
the definitions in the Lazarus Makefile.fpc files.

So my questions at the moment are, 
1. is there a global way to set this or is it a case of hand editing
   each makefile.fpc?
2. what should the new platform be called?
   OS/2 can work in non GUI mode, GUI mode using its native PM API, 
   X using XFree and Qt3 emulation, so my preference would be os2pm.

Thanks,
Dave


_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] [MS Windows] Standalone app with GTK widgetset

2008-01-02 Thread Damien Gerard


I did not find any documentation related to steps to reproduce to  
provide a standalone Application using the GTK2 widgetset under  
windows without Gimp and a look&feel closed to the winxp theme (using  
gtk-wimp).


Would it be interressting to make this article ?


--
Damien Gerard
[EMAIL PROTECTED]

People who used magic without knowing what they were doing usually  
came to a sticky end. All over the entire room, sometimes.

-- (Terry Pratchett, Moving Pictures)



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] IDE patch to "dock Messages on Editor"

2008-01-02 Thread Fabio Dell'Aria
Hi,

I'm finally here!

I have just finished to implement an unit able to dock any form in others.

Really a good and very simple tool! :)

The unique problem is that it did not works on Win32 interface (works ok on
other interfaces as QT/GTK/...) cause a specific win32 interface bug.

I have just submitted this bug on the mantis here:

http://bugs.freepascal.org/view.php?id=10539

Can you check if is possible fix it shortly please?

PS: I have try to fix it myself without success (I'm sorry).

I'm waiting for your feedback ASAP! :)

2007/12/29, Mattias Gaertner <[EMAIL PROTECTED]>:
>
> On Sat, 29 Dec 2007 12:05:09 +0100
> "Fabio Dell'Aria" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > why do not add my patch to this FAQ so all the user that needed it can
> > simply use it? :)
>
> You are welcome to add a link or start a new page and add the code as
> example. The FAQ can contain a link, but should not contain code, that
> is not maintained by the lazarus devels.
>
>
> > I have attached the patch release 2 (fix a little anchor bug).
> >
> > I'm working to dock the Main_Form(with
> > palette)/Object_Inspector/Source_Editor all in one (as in Delphi
> > 2007).
>
> Ok.
> Maybe this helps:
> Attached is an example of "Víctor R. Ruiz" <[EMAIL PROTECTED]> doing
> something similar.
>
>
> Mattias
>
>
>
> >
> > 2007/12/29, Mattias Gaertner <[EMAIL PROTECTED]>:
> > >
> > > On Sat, 29 Dec 2007 11:05:37 +0100
> > > "Fabio Dell'Aria" <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi to all,
> > > >
> > > > I have created a Patch to Dock the IDE Messages form on the
> > > > "Source Code Editor" form (at bottom).
> > > >
> > > > See the attached screenshot.
> > > >
> > > > I have just tested the Patch on Win32/QT/Gtk2 interface.
> > > >
> > > > What do you think to apply this patch to the official SVN?
> > >
> > > I think it became a FAQ. I added it:
> > >
> > >
> > >
> http://wiki.lazarus.freepascal.org/Lazarus_Faq#I_created_a_Patch_to_dock_the_IDE_Messages_form_on_the_.22Source_Code_Editor.22_form_.28at_bottom.29
> > >
> > >
> > > Mattias
> > >
> > > _
> > >  To unsubscribe: mail [EMAIL PROTECTED] with
> > > "unsubscribe" as the Subject
> > >archives at http://www.lazarus.freepascal.org/mailarchives
> > >
> >
> >
> >
>
>


-- 
Best regards...

Fabio Dell'Aria.


Re: [lazarus] Benchmarks

2008-01-02 Thread Vincent Snijders

willem schreef:


Well I have a Pentium D processor 2.80 Ghz, dual core with 1024 Mb 
memory, so I cannot compare my benchmark results

with the Gentoo Pentium 4 benchmarks.



You can compare by running the original program and time it. Save the output. Run 
the modified program and time it. Compare the output of the modified program with 
the original program.


Vincent

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Benchmarks

2008-01-02 Thread willem

Vincent Snijders wrote:

willem schreef:

Peter Vreman wrote:

At 17:01 1-1-2008, you wrote:

Vincent Snijders wrote:

willem schreef:


Benchmark results from :
http://shootout.alioth.debian.org/gp4/benchmark.php?test=sumcol&lang=all#about 

Conclusion : It would be good to have a compiler switch that 
optimizes for speed.


That is a wrong conclusion. All these programs were compiled for 
speed and not for low memory use.


Vincent
No I mean a new G1 switch who optimizes 30% better at the expensive 
of memory usage.

The memory usage may be ten times greater than the G switch.


I think your view is a bit too simplistic. Optimizing code is a 
complex task and we are continuusly working on it. Ofcourse patches 
to improve the optimizer of the compiler are always welcome. Simply 
refering to a couple of, already known, benchmarks will not help to 
get things improved. Besides that Free Pascal does a fairly good job 
against the other commericially funded compilers.


Peter
Yes optimizing code is a complex job.

The Free Pascal compiler does already a lots of optimization.
Like constant merging, shifts in stead of multiply, stack frame 
omission and so on.


But the Free Pascal compiler performs bad in the Mandelbrot benchmark.

number 1 is C++ g++
number 4 is Java 6
number 19 is Free Pascal

In the test Cpu time as N increases

number 3 is C gcc
number 18 is Java 6
number 26 is Free Pascal

I did download the Mandelbrot pascal source and I compiled it in the 
Lazarus Ide.

I got two hints about the ov div instead of / .
and I got a runtime error when I tried to run this programm.

The problem lies in the conversion from integer to real and vice versa.

When I did a expliciet conversion from real to integer with round(), 
the Mandelbrot benchmark runs fine.


How much speed improvement did that give? Did it give the exact same 
results?

Where are reals converted to integers?



If you implement the G1 switch which an automic conversion the / 
arithmic operator to div operator then you gain
speed at the cost of memory usage. The developer can then always use 
the aritmic operator / .




var
cx : double
i, j: integer;

i := 3; j := 4;

cx := i / j; (cx = 0.75)
cx := i div j; (cx = 0)

The results are different. So this optimization is not correct.

Vincent

Ha Ha Vincent optimization is complex :-)


Well I have a Pentium D processor 2.80 Ghz, dual core with 1024 Mb 
memory, so I cannot compare my benchmark results

with the Gentoo Pentium 4 benchmarks.

I looked at Mandelbrot cpp code , this code is very complex, the Lazarus 
Pascal Mandelbrot code is simple,

but much easier to understand. The cpp is compiled for the Pentium 4.
To give you an idea of how complex optimization is I give you here the 
optimization switches of c++ :


Optimization Options
-falign-functions=n -falign-jumps=n -falign-labels=n
-falign-loops=n -fbounds-check -fmudflap -fmudflapth -fmudflapir
-fbranch-probabilities -fprofile-values -fvpt -fbranch-tar‐
get-load-optimize -fbranch-target-load-optimize2 -fbtr-bb-exclusive
-fcaller-saves -fcprop-registers -fcse-follow-jumps
-fcse-skip-blocks -fcx-limited-range -fdata-sections -fde‐
layed-branch -fdelete-null-pointer-checks -fearly-inlining -fex‐
pensive-optimizations -ffast-math -ffloat-store -fforce-addr
-ffunction-sections -fgcse -fgcse-lm -fgcse-sm -fgcse-las
-fgcse-after-reload -floop-optimize -fcrossjumping -fif-conversion
-fif-conversion2 -finline-functions -finline-functions-called-once
-finline-limit=n -fkeep-inline-functions -fkeep-static-consts
-fmerge-constants -fmerge-all-constants -fmodulo-sched
-fno-branch-count-reg -fno-default-inline -fno-defer-pop
-floop-optimize2 -fmove-loop-invariants -fno-function-cse
-fno-guess-branch-probability -fno-inline -fno-math-errno
-fno-peephole -fno-peephole2 -funsafe-math-optimizations -fun‐
safe-loop-optimizations -ffinite-math-only -fno-trapping-math
-fno-zero-initialized-in-bss -fomit-frame-pointer -foptimize-reg‐
ister-move -foptimize-sibling-calls -fprefetch-loop-arrays -fpro‐
file-generate -fprofile-use -fregmove -frename-registers -fre‐
order-blocks -freorder-blocks-and-partition -freorder-functions
-frerun-cse-after-loop -frerun-loop-opt -frounding-math -fsched‐
ule-insns -fschedule-insns2 -fno-sched-interblock -fno-sched-spec
-fsched-spec-load -fsched-spec-load-dangerous
-fsched-stalled-insns=n -fsched-stalled-insns-dep=n
-fsched2-use-superblocks -fsched2-use-traces -freschedule-mod‐
ulo-scheduled-loops -fsignaling-nans -fsingle-precision-constant
-fstack-protector -fstack-protector-all -fstrength-reduce
-fstrict-aliasing -ftracer -fthread-jumps -funroll-all-loops
-funroll-loops -fpeel-loops -fsplit-ivs-in-unroller
-funswitch-loops -fvariable-expansion-in-unroller -ftree-pre
-ftree-ccp -ftree-dce -ftree-loop-optimize -ftree-loop-linear
-ftree-loop-im -ftree-loop-ivcanon -fivopts -ftree-dominator-opts
-ftree-dse -ftree-copyrename -ftree-sink -ftree-ch -ftree-sra
-ftree-ter -ftree-lrs -ftree-fre -ftree-vectorize
-ftree-vect-loop-

Re: [lazarus] Making GTK Thread Safe

2008-01-02 Thread Giuliano Colla

Al Boldi ha scritto:

Al Boldi wrote:

Micha Nelissen wrote:

Al Boldi wrote:

I think the race comes in when you have two competing threads wanting
to synchronize the the main thread.  It just hangs.

Are you sure? This should work properly. Can you provide example (in a
bugreport)?

Well, it's not easily repeatable, and seems to be very OS dependent.  On
linux, I work around this problem by inserting a sleep(0) just before the
synchronize.

But there is another problem, it seems FreeOnTerminate doesn't actually
free the memory on exit, unless the main thread actually waits for it to
terminate, and this is on linux again.  Can you confirm this?


I played with this some more, and it turns out that not only is 
FreeOnTerminate completely broken but Free only frees the OS-thread memory 
if the thread is still running or is preceded by a WaitFor.  This is on 
fpc2.0.2/linux.  Maybe this has been fixed in 2.2.0?


Below is the test-code.

Can somebody confirm this on other platforms/fpcVersions.



I've made some quick tests, with what I have ready at hand and with my 
test app. Not so different from yours, except that it allows me more 
options. Platform Linux, fpc 2.0.4 and 2.2.0, Lazarus.fixes and Lazarus 
trunk latest svn. Widgetset gtk1.


With fpc 2.0.4, FreeOnTerminate leaks memory whatever I've tried.

With fpc 2.2.0, using Synchronize, I've been unable to get rid of memory 
leaks if the thread is terminated within an OnClose event.

If the thread is terminated before closing the form, it behaves properly.

With fpc 2.2.0, if I don't use Synchronize, but rather a message queue 
processed by the OnIdle handler, then I don't experience any memory 
leak, whatever is the thread termination.


My conclusion: fpc 2.0.4 has almost certainly some bug on 
FreeOnTerminate. In many cases it segfaults, meaning, I guess, that 
there's some NilAndFree in place of FreeAndNil :-)


With fpc 2.2.0 it's harder to tell at first glance, but one would say 
that the problem is on Lazarus side, because the fpc rtl Syncronize 
provide just a thread safe frame, and leaves all the work to the main 
thread loop.


Synchronize is heavily widgetset dependent. That's why I only report 
gtk1 results. With gtk2 I've met inconsistent results from one revision 
to the next, with qt synchronize for me doesn't work at all.


Giuliano

--
Giuliano Colla

Whenever people agree with me, I always feel I must be wrong (O. Wilde)

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Lazarus and Linux on a usb pen drive

2008-01-02 Thread Antonio Sanguigni
I'm just creating for fun a new Puppy Linux derived distro with FPC and
Lazarus already installed. This kind of mini distro is able to easily suite
on a pen drive, so Lazarus developers can bring with them their favourite
development environment.
Now, it is almost ready but I would like to have a good background desktop
image. I found on the ML some splash screens. The blu one is the Lazarus one
but it has a low resolution. I found another proposed splash screen with a
higer resolution but it was not adopted for Lazarus.

Any idea where I can find a good background image for that ?
Do you think this kind of distro can be useful to spread Lazarus and FPC
verb ;) ?

Antonio
-- 
Antonio Sanguigni alias slapshot
--
GioveLUG (Linux User Group) - http://www.giovelug.org
Edupup (Educational distro) - http://www.edupup.org


Re: [lazarus] Benchmarks

2008-01-02 Thread Vincent Snijders

willem schreef:

Peter Vreman wrote:

At 17:01 1-1-2008, you wrote:

Vincent Snijders wrote:

willem schreef:


Benchmark results from :
http://shootout.alioth.debian.org/gp4/benchmark.php?test=sumcol&lang=all#about 

Conclusion : It would be good to have a compiler switch that 
optimizes for speed.


That is a wrong conclusion. All these programs were compiled for 
speed and not for low memory use.


Vincent
No I mean a new G1 switch who optimizes 30% better at the expensive 
of memory usage.

The memory usage may be ten times greater than the G switch.


I think your view is a bit too simplistic. Optimizing code is a 
complex task and we are continuusly working on it. Ofcourse patches to 
improve the optimizer of the compiler are always welcome. Simply 
refering to a couple of, already known, benchmarks will not help to 
get things improved. Besides that Free Pascal does a fairly good job 
against the other commericially funded compilers.


Peter
Yes optimizing code is a complex job.

The Free Pascal compiler does already a lots of optimization.
Like constant merging, shifts in stead of multiply, stack frame omission 
and so on.


But the Free Pascal compiler performs bad in the Mandelbrot benchmark.

number 1 is C++ g++
number 4 is Java 6
number 19 is Free Pascal

In the test Cpu time as N increases

number 3 is C gcc
number 18 is Java 6
number 26 is Free Pascal

I did download the Mandelbrot pascal source and I compiled it in the 
Lazarus Ide.

I got two hints about the ov div instead of / .
and I got a runtime error when I tried to run this programm.

The problem lies in the conversion from integer to real and vice versa.

When I did a expliciet conversion from real to integer with round(), the 
Mandelbrot benchmark runs fine.


How much speed improvement did that give? Did it give the exact same results?
Where are reals converted to integers?



If you implement the G1 switch which an automic conversion the / 
arithmic operator to div operator then you gain
speed at the cost of memory usage. The developer can then always use the 
aritmic operator / .




var
  cx : double
  i, j: integer;

  i := 3; j := 4;

  cx := i / j; (cx = 0.75)
  cx := i div j; (cx = 0)

The results are different. So this optimization is not correct.

Vincent

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Benchmarks

2008-01-02 Thread willem

Lee Jenkins wrote:

willem wrote:


Benchmark results from :
http://shootout.alioth.debian.org/gp4/benchmark.php?test=sumcol&lang=all#about 



 



To me, it looks like FreePascal is ranking up there almost every 
test.  I don't understand the post.  Can you clarify?




The results of Free Pascal in the Mandelbrot benchmark.
are not good.

In 2 tests the rankings are 19 and 26.
The problem lies in the conversion from integer to real and vice versa.
In C integers may be implicitly converted to real and vice versa.

The G1 switch allows Free Pascal to implicitly convert integers to real 
and vice versa.


regards Wim.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Benchmarks

2008-01-02 Thread willem

Peter Vreman wrote:

At 17:01 1-1-2008, you wrote:

Vincent Snijders wrote:

willem schreef:


Benchmark results from :
http://shootout.alioth.debian.org/gp4/benchmark.php?test=sumcol&lang=all#about 

Conclusion : It would be good to have a compiler switch that 
optimizes for speed.


That is a wrong conclusion. All these programs were compiled for 
speed and not for low memory use.


Vincent
No I mean a new G1 switch who optimizes 30% better at the expensive 
of memory usage.

The memory usage may be ten times greater than the G switch.


I think your view is a bit too simplistic. Optimizing code is a 
complex task and we are continuusly working on it. Ofcourse patches to 
improve the optimizer of the compiler are always welcome. Simply 
refering to a couple of, already known, benchmarks will not help to 
get things improved. Besides that Free Pascal does a fairly good job 
against the other commericially funded compilers.


Peter
Yes optimizing code is a complex job.

The Free Pascal compiler does already a lots of optimization.
Like constant merging, shifts in stead of multiply, stack frame omission 
and so on.


But the Free Pascal compiler performs bad in the Mandelbrot benchmark.

number 1 is C++ g++
number 4 is Java 6
number 19 is Free Pascal

In the test Cpu time as N increases

number 3 is C gcc
number 18 is Java 6
number 26 is Free Pascal

I did download the Mandelbrot pascal source and I compiled it in the 
Lazarus Ide.

I got two hints about the ov div instead of / .
and I got a runtime error when I tried to run this programm.

The problem lies in the conversion from integer to real and vice versa.

When I did a expliciet conversion from real to integer with round(), the 
Mandelbrot benchmark runs fine.


If you implement the G1 switch which an automic conversion the / 
arithmic operator to div operator then you gain
speed at the cost of memory usage. The developer can then always use the 
aritmic operator / .


regards Wim



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Strange behavior of the IDE with a particular image

2008-01-02 Thread Damien Gerard


On Jan 2, 2008, at 10:55 AM, Damien Gerard wrote:




Sorry for the inconvenience I have rebooted the Windows and it works  
fine...

So it seems there is nothing to do with Lazarus.
But it was at the exact time when I load the image...




--
Damien Gerard
[EMAIL PROTECTED]

People who used magic without knowing what they were doing usually  
came to a sticky end. All over the entire room, sometimes.

-- (Terry Pratchett, Moving Pictures)



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Strange behavior of the IDE with a particular image

2008-01-02 Thread Damien Gerard


On Jan 2, 2008, at 10:37 AM, Damien Gerard wrote:



I have a strange behavior with the lastest version of Lazarus (win32/ 
fpc 2.2.1).


- Create a new project
- Add a TImage
- Add the attached picture
- Edit the code / f12, right clic... The IDE often minimizes and it  
is really annoying.


Can someone reproduce it or I miss an already reported bug ?



It seems to be periodic once the IDE has been minimized.


Picture:
http://ftn.shikami.org/misc/Lazarus/header.png




--
Damien Gerard
[EMAIL PROTECTED]

People who used magic without knowing what they were doing usually  
came to a sticky end. All over the entire room, sometimes.

-- (Terry Pratchett, Moving Pictures)



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] converting a console app to a gui app

2008-01-02 Thread Graeme Geldenhuys
On 02/01/2008, Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
>
> I would not recommend such a scheme, when asked to do this. It's bound
> to create more problems than it will solve.


That was my thoughts as well. Thanks for the response Michael.  I'll
relay the message back to that developer.


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Strange behavior of the IDE with a particular image

2008-01-02 Thread Damien Gerard


I have a strange behavior with the lastest version of Lazarus (win32/ 
fpc 2.2.1).


- Create a new project
- Add a TImage
- Add the attached picture
- Edit the code / f12, right clic... The IDE often minimizes and it is  
really annoying.


Can someone reproduce it or I miss an already reported bug ?

Picture:
http://ftn.shikami.org/misc/Lazarus/header.png



--
Damien Gerard
[EMAIL PROTECTED]

People who used magic without knowing what they were doing usually  
came to a sticky end. All over the entire room, sometimes.

-- (Terry Pratchett, Moving Pictures)



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] converting a console app to a gui app

2008-01-02 Thread Michael Van Canneyt


On Wed, 2 Jan 2008, Graeme Geldenhuys wrote:

> Hi,
> 
> I've been asked by someone if it's possible to convert a console
> application systematically to a gui application.  One form at a time.
> So during the conversion process the application needs to be able to
> handle input from GUI Forms and from the console.
> 
> 
> > 1. is it possible to read input from the text console while those
> > forms are displayed?
> 
> 
> Is this possible?  My first thought would be no, due to the different
> event loops being used.  Am I correct in this assumption?

It is technically possible:
You could try to insert a second loop in the OnIdle of the gui loop,
which then checks and optionally runs the console message loop.

But I'm not sure that this will work, and if it does, whether the result
will be a responsive application. I would think not.

I would not recommend such a scheme, when asked to do this. It's bound
to create more problems than it will solve.

Michael.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Currency Type gets cast a Integer

2008-01-02 Thread Graeme Geldenhuys
On 01/01/2008, Damien Gerard <[EMAIL PROTECTED]> wrote:
>
> For example 150.95 will be stored as 15095.
>
> For FreePascal, I don't know how it is really managed behing the
> scene, but in many languages or tools it is like that (D, sqlite, MS
> SQL...).


That is such a cleaver idea!  If only I thought about that in a
ReInsurance project I worked on a few years back. Rounding errors
drove us nuts!


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives