Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Fuchs
Am 04.03.2013 01:15, schrieb Graeme Geldenhuys: [...] It was clearly stated in the past that FPC will not support the C/C++ language feature of declaration a variable in-line inside code blocks, but only in var sections. Example of not allowed code: for i: integer = 0 to 10 do begin

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Sun, 3 Mar 2013, schreef Marcos Douglas: On Sun, Mar 3, 2013 at 5:16 PM, Graeme Geldenhuys gra...@geldenhuys.co.uk wrote: On 2013-03-03 19:47, Florian Klämpfl wrote: First 10 m of a marathon done. Is that 'miles' or 'meters'? ;-) Sad. Instead of fight, why not walking together?

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Graeme Geldenhuys wrote: On 2013-03-03 23:21, Marcos Douglas wrote: Sad. Instead of fight, why not walking together? I'm not joining any fight, simply wanted to know what the 'm' stood for. I do not know nothing about compilers, but I know the Florian Klämpfl will

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Vittorio Giovara
On Mon, Mar 4, 2013 at 12:35 AM, Marcos Douglas m...@delfire.net wrote: On Sun, Mar 3, 2013 at 8:29 PM, Vittorio Giovara vittorio.giov...@gmail.com wrote: On 04/mar/2013, at 00:21, Marcos Douglas m...@delfire.net wrote: [cut] FPC Team: Try to hear Martin otherwise, because he is a

Re: [fpc-devel] Comparison FPC 2.6.2 - Delphi 7

2013-03-04 Thread Michael Schnell
On 03/02/2013 04:02 PM, Florian Klaempfl wrote: In theory yes but I still fear that the threadvars and synchronization eats much of the advantage in this case. I suppose the (high level) synchronization will be rather complex and eat performance. The low level threadvar implementation is

Re: [fpc-devel] Comparison FPC 2.6.2 - Delphi 7

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Michael Schnell wrote: On 03/02/2013 04:02 PM, Florian Klaempfl wrote: In theory yes but I still fear that the threadvars and synchronization eats much of the advantage in this case. I suppose the (high level) synchronization will be rather complex and eat

Re: [fpc-devel] Comparison FPC 2.6.2 - Delphi 7

2013-03-04 Thread Michael Schnell
On 03/04/2013 09:49 AM, Michael Van Canneyt wrote: The solution must work on ALL platforms... Of course. I don't remember ever having seen a system (Windows, Linux, x86, ARM, NIOS (similar top MIPS) ) where the C compiler does a library call when accessing a threadvar. Usually a register

Re: [fpc-devel] Comparison FPC 2.6.2 - Delphi 7

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Michael Schnell wrote: On 03/04/2013 09:49 AM, Michael Van Canneyt wrote: The solution must work on ALL platforms... Of course. I don't remember ever having seen a system (Windows, Linux, x86, ARM, NIOS (similar top MIPS) ) where the C compiler does a library call

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: On 2013-03-03 19:47, Florian Kl?mpfl wrote: First 10 m of a marathon done. Is that 'miles' or 'meters'? ;-) And if miles, what miles? In this case I would take the Scandinavian Mile, and skip next years marathon too:

Re: [fpc-devel] ppcrossarm dies when trying to build embedded rtl (svn 23683)

2013-03-04 Thread Michael Schnell
I, too, am unable to do make crossinstall for ARM using a 64 bit ppc on a 64 bit Debian. The arm cross ppc is built (and when I start it without parameter outputs the correct information). But when trying to crosscompile system.pp (seemingly the first RTL source file make crossinstall tries

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: I want to implement support of Delphi anonymous methods for fpc. Just curious... why must such a feature be allowed in Object Pascal? In Delphi, synchronization primitives like queue() and synchronize() have been adapted to work with them,

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Kostas Michalopoulos
On Mon, Mar 4, 2013 at 9:26 AM, Vittorio Giovara vittorio.giov...@gmail.com wrote: Don't use fpc if you don't like it, or send patches to improve it ;) http://programmers.stackexchange.com/questions/68740/whats-the-canonical-retort-to-its-open-source-submit-a-patch

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Marco van de Voort
In our previous episode, Boian Mitov said: Or even more drastic example like this one: Exit( AAttrItem.GetInstance().ComponentEditor.Create( Component, Designer )); end; Try to write this without anonymous methods ;-) :-D . Am I the only one who is reminded of Turbo Vision

Re: [fpc-devel] Comparison FPC 2.6.2 - Delphi 7

2013-03-04 Thread Michael Schnell
On 03/04/2013 10:07 AM, Michael Van Canneyt wrote: We use pthreads on non-windows, and GetTLS/SetTLS on Windows. Thus the situation is as it was when we discussed this some years ago: a library call with each access to a threadvar, making fpc a lot slower that the C compiler (Microsoft and

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 01:47, Boian Mitov wrote: vast improvements of the code and the readability. They are unreadable to me. I recently started rewriting our libraries with anonymous methods and that alone allowed for cutting over 2 lines of code Just my dropping method names? I doubt that.

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 03:59, Alexander Klenin wrote: Because computer science is advancing, and there is a limit after which programming language can not ignore those advancements and stay relevant. Sure, I understand that. I just haven't seen an example that explains why it is needed. Kind of why I

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Martin Schreiber
On Monday 04 March 2013 09:26:53 Vittorio Giovara wrote: Martin made a point that delphi7 is faster better and whatever than fpc... so what? Don't use fpc if you don't like it, or send patches to improve it ;) You probably might know, I am the author of MSEide+MSEgui:

Re: [fpc-devel] Comparison FPC 2.6.2 - Delphi 7

2013-03-04 Thread Henry Vermaak
On Sat, Mar 02, 2013 at 05:26:02PM +0100, Marco van de Voort wrote: In our previous episode, Henry Vermaak said: I don't see why there would be more synchronization overhead than make? So why not keep it simple and let the build system handle parallel jobs? I like autobuilding. IMHO

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 09:24, Marco van de Voort wrote: In Delphi, synchronization primitives like queue() and synchronize() have been adapted to work with them, so they are actually more used than some other new features. Sure, just like Delphi implemented Advanced Records, when the Object type

Re: [fpc-devel] Comparison FPC 2.6.2 - Delphi 7

2013-03-04 Thread Marco van de Voort
In our previous episode, Henry Vermaak said: Manually maintaining dependencies between compilation units is stone-age. I just add all the objects to a variable in a Makefile. The result is that I have a 27000 line c library that compiles in *half* the time it takes to compile a 4000 line

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Martin Schreiber wrote: On Monday 04 March 2013 09:26:53 Vittorio Giovara wrote: Martin made a point that delphi7 is faster better and whatever than fpc... so what? Don't use fpc if you don't like it, or send patches to improve it ;) You probably might know, I am the

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 04:54, Boian Mitov wrote: In this case, not only you save declaration, you save the need to write a whole new class just for the task. All my code live in classes already, so I would simply have benefited by having a properly defined method. Then pass the method pointer to the

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Schnell
On 03/04/2013 11:17 AM, Graeme Geldenhuys wrote: Was advanced records really needed, NO. As discussed in another thread: It does make sense to allow for a kind of class that does not need to reside on the heap and, (residing on the stack or global space) does not need instantiation to gain

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: In Delphi, synchronization primitives like queue() and synchronize() have been adapted to work with them, so they are actually more used than some other new features. Sure, just like Delphi implemented Advanced Records, when the Object

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Aleksa Todorovic
On Mon, Mar 4, 2013 at 11:01 AM, Graeme Geldenhuys gra...@geldenhuys.co.ukwrote: On 2013-03-04 01:47, Boian Mitov wrote: vast improvements of the code and the readability. They are unreadable to me. I recently started rewriting our libraries with anonymous methods and that alone allowed

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef Martin Schreiber: In MSEgui development I am happy if users report what they need in their daily work and what is inconvenient in current MSEgui implementation. I then try to examine the problem, find out how it can be solved and implement an universal solution

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 01:16, Marcos Douglas wrote: I know. I just used the last mail on this thread -- in that case, your mail. Sorry. You should know better, and to never use any of my replies for something like that. I have no patience or sense of humour. ;-) Yes, I agree... but I feel a fight

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 10:27, Michael Schnell wrote: It does make sense to allow for a kind of class that does not need to reside on the heap and, (residing on the stack or global space) And that is exactly what the Object type [already] does... and was introduced into the language in Turbo Pascal

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Schnell
On 03/04/2013 11:50 AM, Graeme Geldenhuys wrote: I still use the Object type to this day for performance or ease of use. AFAIK, some of my colleagues do same. For me the triple choice of a class, record and object notation for a type defining a combination of data and associated functions is

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Florian Klämpfl
Am 04.03.2013 01:00, schrieb Graeme Geldenhuys: 4.4 seconds (Kylix under Linux) vs 89 seconds (FPC under Linux)... That is just too a huge performance difference to justify. Yes, we all know the argument about more platforms, maintainable code etc, but that couldn't possible be the only

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 04:54, Boian Mitov wrote: Here is example: Parallel execution with selection of executor: for i := 0 to AMaxScaleIndex - 1 do begin APerIterationLocations.Add( TRTDynamicListTVLImageRect.Create() ); AExecutionTask.Add( AExecutor.Execute( procedure() begin

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 05:00, Boian Mitov wrote: One thing for sure, I probably will very much never need to declare TThread inherited classes. I can use a single anonymous method for that, thanks to the ability of the anonymous method to capture local and member variables. This is something not doable

Re: [fpc-devel] Comparison FPC 2.6.2 - Delphi 7

2013-03-04 Thread Tomas Hajny
On Mon, March 4, 2013 10:33, Michael Schnell wrote: On 03/04/2013 10:07 AM, Michael Van Canneyt wrote: We use pthreads on non-windows, and GetTLS/SetTLS on Windows. Thus the situation is as it was when we discussed this some years ago: a library call with each access to a threadvar, making

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 05:57, Alexander Klenin wrote: On Mon, Mar 4, 2013 at 2:38 PM, Martin laza...@mfriebe.de wrote: Closures, do not need to be written/declared in the middle of other code (in-line) Strictly speaking, they do not. However, if the closures are required to be named, their expressive

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 06:06, Boian Mitov wrote: It may be a good idea to analyze the current Delphi implementation. In essence the anonymous method expands to a class and interface. The interface Execute method has the parameters of the anonymous function. and the corresponding interface has the

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Vittorio Giovara
On Mon, Mar 4, 2013 at 10:25 AM, Kostas Michalopoulos badsectorac...@gmail.com wrote: On Mon, Mar 4, 2013 at 9:26 AM, Vittorio Giovara vittorio.giov...@gmail.com wrote: Don't use fpc if you don't like it, or send patches to improve it ;)

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Alexander Klenin
On Mon, Mar 4, 2013 at 10:35 PM, Martin laza...@mfriebe.de wrote: On 04/03/2013 06:06, Boian Mitov wrote: It may be a good idea to analyze the current Delphi implementation. In essence the anonymous method expands to a class and interface. The interface Execute method has the parameters of

Re: [fpc-devel] Comparison FPC 2.6.2 - Delphi 7

2013-03-04 Thread Michael Schnell
On 03/04/2013 12:29 PM, Tomas Hajny wrote: It's questionable whether it should be responsibility of a compiler to provide efficient support for threadvars, If the target platform does not support threadvars a compiler can't do it at all. If the target platform only provides library calls,

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Martin Schreiber
On Monday 04 March 2013 12:05:37 Florian Klämpfl wrote: Am 04.03.2013 01:00, schrieb Graeme Geldenhuys: 4.4 seconds (Kylix under Linux) vs 89 seconds (FPC under Linux)... That is just too a huge performance difference to justify. Yes, we all know the argument about more platforms,

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Marcos Douglas
On Mon, Mar 4, 2013 at 5:26 AM, Vittorio Giovara vittorio.giov...@gmail.com wrote: On Mon, Mar 4, 2013 at 12:35 AM, Marcos Douglas m...@delfire.net wrote: On Sun, Mar 3, 2013 at 8:29 PM, Vittorio Giovara vittorio.giov...@gmail.com wrote: On 04/mar/2013, at 00:21, Marcos Douglas

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Mattias Gaertner
On Mon, 04 Mar 2013 11:17:53 + Martin laza...@mfriebe.de wrote: On 04/03/2013 04:54, Boian Mitov wrote: Here is example: Parallel execution with selection of executor: for i := 0 to AMaxScaleIndex - 1 do begin APerIterationLocations.Add( TRTDynamicListTVLImageRect.Create() );

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Mattias Gaertner wrote: On Mon, 04 Mar 2013 11:17:53 + Martin laza...@mfriebe.de wrote: On 04/03/2013 04:54, Boian Mitov wrote: Here is example: Parallel execution with selection of executor: for i := 0 to AMaxScaleIndex - 1 do begin APerIterationLocations.Add(

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 13:22:11 +0100 Martin Schreiber mse00...@gmail.com wrote: [...] You completely miss the point. If there are only approx 25 features/properties which make the compiler each 10% slower than in total FPC is 10 (1.1^25=10.9) times slower than before. Is this correct? It

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 12:05, schrieb Florian Klämpfl: Am 04.03.2013 01:00, schrieb Graeme Geldenhuys: 4.4 seconds (Kylix under Linux) vs 89 seconds (FPC under Linux)... That is just too a huge performance difference to justify. Yes, we all know the argument about more platforms, maintainable code etc,

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef Martin Schreiber: On Monday 04 March 2013 12:05:37 Florian Klämpfl wrote: Am 04.03.2013 01:00, schrieb Graeme Geldenhuys: 4.4 seconds (Kylix under Linux) vs 89 seconds (FPC under Linux)... That is just too a huge performance difference to justify. Yes, we all

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 13:38, schrieb Daniël Mantione: 1. Operator overloading Operators are some of the most common tokens in source code. Without operator overloading, if you parse an operator, you simply generate a tree node. With operator overloading, for each operator that you parse, you have

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Sven Barth wrote: Am 04.03.2013 13:38, schrieb Daniël Mantione: 1. Operator overloading Operators are some of the most common tokens in source code. Without operator overloading, if you parse an operator, you simply generate a tree node. With operator overloading,

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Sven Barth
Am 04.03.2013 13:23, schrieb Michael Van Canneyt: On Mon, 4 Mar 2013, Mattias Gaertner wrote: On Mon, 04 Mar 2013 11:17:53 + Martin laza...@mfriebe.de wrote: On 04/03/2013 04:54, Boian Mitov wrote: Here is example: Parallel execution with selection of executor: for i := 0 to

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Sven Barth wrote: Am 04.03.2013 13:23, schrieb Michael Van Canneyt: On Mon, 4 Mar 2013, Mattias Gaertner wrote: On Mon, 04 Mar 2013 11:17:53 + Martin laza...@mfriebe.de wrote: On 04/03/2013 04:54, Boian Mitov wrote: Here is example: Parallel execution with

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 12:51, Sven Barth wrote: If you guys would read what I wrote in one of my first answers to Vasiliy in this thread than you would know that I want him to implement this possiblity as well... but after all, who reads the mails of some strange computer science student who just

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 13:38:50 +0100 (CET) Daniël Mantione daniel.manti...@freepascal.org wrote: [...] Some features only request procesing power if you use them. However, the features in Florian's list require continuous processing power. Two examples how features can impact overall speed:

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Marco van de Voort
In our previous episode, Mattias Gaertner said: are 50 units loaded, this means 50 symtable lookups, simply because the operator might be overloaded. Is there no cache? Something like: Give me all '+' operator overloads in all used units of interface, implementation. From what I

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef Mattias Gaertner: Is there no cache? Something like: Give me all '+' operator overloads in all used units of interface, implementation. Actually a cache was part of my symtable redesign years ago. It never made it into the compiler. But it was designed with a

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Sven Barth
Am 04.03.2013 01:15, schrieb Graeme Geldenhuys: On 2013-03-02 19:03, vrt277 wrote: I want to implement support of Delphi anonymous methods for fpc. Just curious... why must such a feature be allowed in Object Pascal? Referring to the recent butchering of the Object Pascal language thread we

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 13:46, schrieb Michael Van Canneyt: On Mon, 4 Mar 2013, Sven Barth wrote: Am 04.03.2013 13:38, schrieb Daniël Mantione: 1. Operator overloading Operators are some of the most common tokens in source code. Without operator overloading, if you parse an operator, you simply

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 14:28, schrieb Daniël Mantione: Op Mon, 4 Mar 2013, schreef Mattias Gaertner: Is there no cache? Something like: Give me all '+' operator overloads in all used units of interface, implementation. Actually a cache was part of my symtable redesign years ago. It never made it

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef Mattias Gaertner: Can this be cached? Maybe the compiler can reuse some results? No. The symtable lookups can be parsed, but the candidate selection, which I believe is actually more compute intensive, is dependend on the actual situation where the operator is

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef Sven Barth: Did you work out the concept somewhere? It quite likely there is some archived copy of it in the old CVS repository, but I am sure it's better to start from scratch. The compiler was still using objects at that time, for example.

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 14:18:09 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: In our previous episode, Mattias Gaertner said: are 50 units loaded, this means 50 symtable lookups, simply because the operator might be overloaded. Is there no cache? Something like: Give me all

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Martin Schreiber
On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their FPC counterpart which is especially surprising for Delphi because Delphi widestrings are not reference counted. Some more tests, starting MSEide, loading and

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Martin Schreiber wrote: On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their FPC counterpart which is especially surprising for Delphi because Delphi widestrings are not reference counted. Some

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 14:48, schrieb Marco van de Voort: In our previous episode, Martin Schreiber said: Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their FPC counterpart which is especially surprising for Delphi because Delphi widestrings are not reference counted. Some more

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 14:57, schrieb Martin Schreiber: On Monday 04 March 2013 14:37:40 Daniël Mantione wrote: Originally the compiler was doing the candidate selection with a simple loop through the parameters that took the first suitable match. When the type conversion matters became more complex

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 14:50:17 +0100 Martin Schreiber mse00...@gmail.com wrote: On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their FPC counterpart which is especially surprising for Delphi because Delphi widestrings

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef Mattias Gaertner: On Mon, 4 Mar 2013 14:37:40 +0100 (CET) Daniël Mantione daniel.manti...@freepascal.org wrote: Op Mon, 4 Mar 2013, schreef Mattias Gaertner: Can this be cached? Maybe the compiler can reuse some results? No. The symtable lookups can be

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Mattias Gaertner wrote: On Mon, 4 Mar 2013 14:50:17 +0100 Martin Schreiber mse00...@gmail.com wrote: On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their FPC counterpart which is especially

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Alexander Klenin
On Mon, Mar 4, 2013 at 10:34 PM, Martin laza...@mfriebe.de wrote: Nevertheless, I agree what the implementation plan can be detailed even further: 1) Anonymous procedures *without* closures -- basically, just another syntax for nested procedures. That might be interested for mode Delphi No,

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 11:17, Martin wrote: I added: - the name Bar - Used is at reference - the keyword closure The above code would then create the exact same closure, as your code does. And it does not need an anonymous method. +1 Much better solution, an in my opinion, much easier to

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 13:05, Michael Van Canneyt wrote: And the first to use anonymous functions in FPC distributed code, I will personally make him eat his keyboard. Without pepper and salt. Thank you!! :) Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Tomas Hajny
On Mon, March 4, 2013 14:54, Mattias Gaertner wrote: On Mon, 4 Mar 2013 14:50:17 +0100 Martin Schreiber mse00...@gmail.com wrote: On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their FPC counterpart which is

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 15:02:34 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: On Mon, 4 Mar 2013, Mattias Gaertner wrote: On Mon, 4 Mar 2013 14:50:17 +0100 Martin Schreiber mse00...@gmail.com wrote: On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: Both

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Graeme Geldenhuys
Thanks for taking the time with your detailed explanation. Regards, G. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Tue, 5 Mar 2013, Alexander Klenin wrote: 4) With both lambda and as syntax: ATree.VisitPreorder(lambda TVisitor as X + 5); Now, my argument is that (2) does indeed have only a marginal advantage over (1), but (4) is powerful enough to really make functional-style programming practically

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Marco van de Voort
In our previous episode, Sven Barth said: widestrings are not reference counted. Some more tests, starting MSEide, loading and highlighting the 277441 lines MacOSAll.pas from FPC 2.4.0: FPC 2.6.2 Windows 3.2..3.5s Delphi 7 Windows 4.0s FPC 2.6.2 Linux5.0s Kylix 3

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: Any idea, why FPC Linux is slower than FPC Windows? Loading and highlighting does not sound like a task where many OS calls are involved. Codepage conversions, most likely: Martin uses UTF-16 everywhere. On Windows, FPC uses the native

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 15:00:30 +0100 (CET) Daniël Mantione daniel.manti...@freepascal.org wrote: Op Mon, 4 Mar 2013, schreef Mattias Gaertner: On Mon, 4 Mar 2013 14:37:40 +0100 (CET) Daniël Mantione daniel.manti...@freepascal.org wrote: Op Mon, 4 Mar 2013, schreef Mattias

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 15:28:07 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] I play chess. The rules of chess have not evolved in a long time. It doesn't make the game less popular or interesting to those that play it. Actually, yes it does. ;) I dare you to propose a new

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 12:44, Sven Barth wrote: that really contain class helpers). Maybe we can add an additional has_operators flag and ignore all units when searching for overloads that don't have this flag set (the flag would propagate from the See, so Martin posting performance results after

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 14:09, Alexander Klenin wrote: On Mon, Mar 4, 2013 at 10:34 PM, Martin laza...@mfriebe.de wrote: Nevertheless, I agree what the implementation plan can be detailed even further: 1) Anonymous procedures *without* closures -- basically, just another syntax for nested procedures.

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Sven Barth
Am 04.03.2013 15:42, schrieb Martin: but (4) is powerful enough to really make functional-style programming practically I can live with that. I find it odd so that as is used in the reverse order compared to current use. The use of as is based on an idea of mine. C# for example has = and

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Mattias Gaertner wrote: On Mon, 4 Mar 2013 15:02:34 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: On Mon, 4 Mar 2013, Mattias Gaertner wrote: On Mon, 4 Mar 2013 14:50:17 +0100 Martin Schreiber mse00...@gmail.com wrote: On Monday 04 March 2013

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Alexander Klenin
On Tue, Mar 5, 2013 at 1:28 AM, Michael Van Canneyt mich...@freepascal.org wrote: Pascal is declarative, Please... no, Pascal is not declarative, and we have establised that fact just about two weeks ago. not functional. Trying to import elements from the second into the first is misguided.

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 14:49, Sven Barth wrote: Am 04.03.2013 15:42, schrieb Martin: but (4) is powerful enough to really make functional-style programming practically I can live with that. I find it odd so that as is used in the reverse order compared to current use. The use of as is based on

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Alexander Klenin
On Tue, Mar 5, 2013 at 1:49 AM, Sven Barth pascaldra...@googlemail.com wrote: The use of as is based on an idea of mine. C# for example has = and Oxygene has - which I didn't consider much Pascal like. Also the compiler needs to know the type of the lambda so it can correctly typecheck its code

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 14:31, schrieb Sven Barth: Am 04.03.2013 13:46, schrieb Michael Van Canneyt: On Mon, 4 Mar 2013, Sven Barth wrote: Am 04.03.2013 13:38, schrieb Daniël Mantione: 1. Operator overloading Operators are some of the most common tokens in source code. Without operator

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 16:16, schrieb Sven Barth: Am 04.03.2013 14:31, schrieb Sven Barth: Am 04.03.2013 13:46, schrieb Michael Van Canneyt: On Mon, 4 Mar 2013, Sven Barth wrote: Am 04.03.2013 13:38, schrieb Daniël Mantione: 1. Operator overloading Operators are some of the most common tokens in

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef Sven Barth: It seems that I only achived around 0.1 to 0.2 seconds when compiling the compiler (manually, with -B). But it's now checking only unit System and unit constexp (part of the compiler) for operator overloads. It's also interesting to see that not

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Florian Klämpfl
Am 04.03.2013 15:33, schrieb Mattias Gaertner: But I was talking about operator overloads. AFAIK there far less operator overloads. And if a unit uses operator overloads, then usually only a few, but many times. I guess many units do not use overloaded operators at all. Is it possible to

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Florian Klämpfl
Am 04.03.2013 15:40, schrieb Graeme Geldenhuys: On 2013-03-04 12:44, Sven Barth wrote: that really contain class helpers). Maybe we can add an additional has_operators flag and ignore all units when searching for overloads that don't have this flag set (the flag would propagate from the

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 16:38, schrieb Daniël Mantione: Op Mon, 4 Mar 2013, schreef Sven Barth: It seems that I only achived around 0.1 to 0.2 seconds when compiling the compiler (manually, with -B). But it's now checking only unit System and unit constexp (part of the compiler) for operator

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 16:51, schrieb Florian Klämpfl: Am 04.03.2013 15:40, schrieb Graeme Geldenhuys: On 2013-03-04 12:44, Sven Barth wrote: that really contain class helpers). Maybe we can add an additional has_operators flag and ignore all units when searching for overloads that don't have this flag

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread luiz americo pereira camara
2013/3/4 Martin Schreiber mse00...@gmail.com: On Monday 04 March 2013 00:29:51 Vittorio Giovara wrote: Could be interesting to see the speed and size of the binary produced by the two compilers, slower compilation time over faster or smaller code is something I would pick any time! Please

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef luiz americo pereira camara: Is the bigger code just a side effect of a cross platform RTL or the generated code is really bigger / slower? There are again multiple reasons. One is indeed that the code is multiple-platform and therefore some abstraction exist in

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Alexander Klenin
On Tue, Mar 5, 2013 at 2:10 AM, Martin laza...@mfriebe.de wrote: First: Stressing out: I don't like it. But if we must have one, the lambda approach is the best one yet. Reason: At least the type is declared at a pascal-like location. I certainly agree that it is subjective in the sense that

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 15:53, Sven Barth wrote: Then I'll commit my changes :) Thanks for your efforts Sven. Regards, - Graeme - ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Sven Barth
Am 04.03.2013 16:13, schrieb Alexander Klenin: On Tue, Mar 5, 2013 at 1:49 AM, Sven Barth pascaldra...@googlemail.com wrote: The use of as is based on an idea of mine. C# for example has = and Oxygene has - which I didn't consider much Pascal like. Also the compiler needs to know the type of

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 16:05, Alexander Klenin wrote: Anonymous functions (with good syntax, of course) fall in this category. The world recognized that fact -- rather slowly, to be sure, but remember that whiles and fors also took decades to be accepted as standard constructs. I am not going to ask for

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Martin Schreiber
On Monday 04 March 2013 15:19:56 Tomas Hajny wrote: Any idea, why FPC Linux is slower than FPC Windows? Loading and highlighting does not sound like a task where many OS calls are involved. Is the starting MSEide (as mentioned above) bit included in the measured time? That would

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread luiz americo pereira camara
2013/3/4 Daniël Mantione daniel.manti...@freepascal.org: Op Mon, 4 Mar 2013, schreef luiz americo pereira camara: Is the bigger code just a side effect of a cross platform RTL or the generated code is really bigger / slower? [..] Code generation quality is another factor. While FPC has

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 16:05, Alexander Klenin wrote: Both lambda and as keywords are quite debatable, of course. IMHO the existing procedure/function keywords should be kept. But with the requirement of using a defined type Foo( function as TVisitor; Result := x+5 end; ); or Foo( function as

  1   2   >