Re: [fpc-pascal] Why win64 program are considerably bigger in exe size than win 32?

2017-12-31 Thread Sven Barth via fpc-pascal
Am 31.12.2017 00:19 schrieb "Martok" : Am 22.12.2017 um 09:30 schrieb Dennis: > I am upgrading my program from win 32 to win 64 using the new Lazarus 1.8. > I discovered my program exe size increased from 6M to 9M. Just for fun, I wrote a small program to parse Linker

Re: [fpc-pascal] Translate C code

2018-01-06 Thread Sven Barth via fpc-pascal
Am 06.01.2018 12:23 schrieb "Ryan Joseph" : > On Jan 6, 2018, at 5:25 PM, Karoly Balogh (Charlie/SGR) < char...@scenergy.dfmk.hu> wrote: > > So it doesn't crash, because it never loads from this "invalid" address it > calculates. Are we talking about the address on

Re: [fpc-pascal] Final Methods support

2018-01-06 Thread Sven Barth via fpc-pascal
Am 06.01.2018 17:31 schrieb "Marcos Douglas B. Santos" : Does FPC have support for final methods? Please see -> http://docwiki.embarcadero.com/RADStudio/Tokyo/en/ Methods_(Delphi)#Final_Methods Should be supported since 2009, so that would be from at least 2.6.0. Regards,

Re: [fpc-pascal] String message methods and the self parameter

2018-01-06 Thread Sven Barth via fpc-pascal
Am 06.01.2018 17:25 schrieb "Ewald" : Hi, When reading https://www.freepascal.org/docs-html/ref/refsu31.html# x82-1040006.5.7 I stumbled on the following text at the bottom of the page: "In addition to this mechanism, a string message method accepts a self parameter:

Re: [fpc-pascal] First pas2js public release

2018-01-07 Thread Sven Barth via fpc-pascal
On 07.01.2018 15:03, Ingemar Ragnemalm wrote: > and here is an (almost) fully working snake game: > > http://ragnemalm.se/images/santa/snake/snake.html > Perhaps you should write somewhere how the snake is controlled. I personally am used to using all four cursor keys to control the snake's

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Sven Barth via fpc-pascal
Am 09.01.2018 02:59 schrieb "Ryan Joseph" : > On Jan 9, 2018, at 3:30 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > > Recently I did a very simple test with Delphi XE3 using TList and a stock TList. Adding 50,000 and 200,000 integer values to each

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread Sven Barth via fpc-pascal
Am 11.01.2018 13:33 schrieb "Mattias Gaertner" : On Wed, 10 Jan 2018 11:40:48 -0700 (MST) warleyalex via fpc-pascal wrote: >[...] > · Add(item [,...]) / Push(item [,...]) : increases Length by one and adds one or more item at the end

Re: [fpc-pascal] Generics vs templates

2018-01-11 Thread Sven Barth via fpc-pascal
Am 11.01.2018 08:06 schrieb "Michael Schnell" <mschn...@lumino.de>: On 09.01.2018 08:04, Sven Barth via fpc-pascal wrote: But you need to program in a way that allows the usage of multiple, different types. That can more often than not lead to worse performance. Seemingly it

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread Sven Barth via fpc-pascal
Am 11.01.2018 08:16 schrieb "warleyalex via fpc-pascal" < fpc-pascal@lists.freepascal.org>: Anyway, what I couldn't find is the built-in kind of *pseudo-methods for the record data type*, set of operations, for inserting, removing, sorting and otherwise manipulate the content, for instance:

Re: [fpc-pascal] Possible Memory Leak in TThread.Synchronize

2018-01-03 Thread Sven Barth via fpc-pascal
Am 03.01.2018 12:32 schrieb "Tony Whyman" : function CheckSynchronize(...) and this ends with: else begin { for Queue entries we dispose the entry and raise the exception } Dispose(tmpentry); if Assigned(exceptobj) then raise

Re: [fpc-pascal] Generics vs templates

2018-01-09 Thread Sven Barth via fpc-pascal
Am 09.01.2018 08:13 schrieb "Ryan Joseph" <r...@thealchemistguild.com>: > On Jan 9, 2018, at 2:04 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > But you need to program in a way that allows the usage of multiple, different types. Th

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Sven Barth via fpc-pascal
Am 08.01.2018 12:52 schrieb "Ryan Joseph" <r...@thealchemistguild.com>: > On Jan 8, 2018, at 5:58 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > FPC essentially reparses a generic during specialization so I'd say that they definitel

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Sven Barth via fpc-pascal
Am 08.01.2018 08:50 schrieb "Ryan Joseph" : I was talking with a c++ developer who explained how templates are implemented in c++ and how use some recursive method which causes them to totally murder compile times. This isn’t the first I’ve heard of the problem though

Re: [fpc-pascal] AppImage

2018-01-16 Thread Sven Barth via fpc-pascal
Am 16.01.2018 20:41 schrieb "Graeme Geldenhuys" < mailingli...@geldenhuys.co.uk>: On 2018-01-16 06:51, Sven Barth via fpc-pascal wrote: > So, yeah, I'm definitely skeptical about such approaches. > All valid points. But if it was such a big concern, then why was Apple happ

Re: [fpc-pascal] AppImage

2018-01-15 Thread Sven Barth via fpc-pascal
Am 16.01.2018 00:50 schrieb "Graeme Geldenhuys" < mailingli...@geldenhuys.co.uk>: On 2018-01-15 20:54, Michael Van Canneyt wrote: > It's nothing but a zip with the needed dependencies. > More precisely, they use a standard ISO image that gets loop mounted. Simply rename any *.AppImage

Re: [fpc-pascal] Dot syntax for types?

2018-01-14 Thread Sven Barth via fpc-pascal
Am 14.01.2018 03:42 schrieb "Ryan Joseph" : I remember I heard about a mode switch that requires "type groups” (what are these called btw?) to use a . and be prefixed. For example: type TGLType = (GL_FLOAT, GL_UNSIGNED_BYTE); TGLType.GL_FLOAT would be the

Re: [fpc-pascal] Dot syntax for types?

2018-01-14 Thread Sven Barth via fpc-pascal
On 14.01.2018 09:56, Michael Van Canneyt wrote: > > > On Sun, 14 Jan 2018, Ryan Joseph wrote: > >> I remember I heard about a mode switch that requires "type groups” >> (what are these called btw?) to use a . and be prefixed. For example: >> >> type >> TGLType = (GL_FLOAT,

[fpc-pascal] fcl-web on Microsoft's kernel mode HTTP(S) server

2018-01-19 Thread Sven Barth via fpc-pascal
Hello together! In revision 38013 I extended fcl-web with the support to use it together with Microsoft's kernel mode HTTP(S) server (aka http.sys). What does this mean? First of that doesn't mean that you're running kernel mode code. Instead http.sys receives requests to the ports it observes

Re: [fpc-pascal] directive for -CR

2018-01-18 Thread Sven Barth via fpc-pascal
Am 19.01.2018 01:55 schrieb "Mattias Gaertner" : Hi, Is there a compiler directive to enable/disable method call and typecast checks (option -CR). Similar to $R+- for range checks? It's {$ObjectChecks On/Off/+/-}. See here:

Re: [fpc-pascal] Dynamic Packages

2018-01-22 Thread Sven Barth via fpc-pascal
Am 22.01.2018 18:19 schrieb "Anthony Walter" : What's the current development status on loading/unloading packages dynamically? Generating metadata required for the loading of a package as well as extending the RTL for dynamically loaded units are the two main items that are

Re: [fpc-pascal] AppImage

2018-01-16 Thread Sven Barth via fpc-pascal
Am 16.01.2018 22:58 schrieb "Rainer Stratmann" <rainerstratm...@t-online.de >: Am Dienstag, 16. Januar 2018, 22:41:34 schrieb Sven Barth via fpc-pascal: > This won't work in the more diverse > Linux world where users are more free to decide. But if you take a closer

Re: [fpc-pascal] Dot syntax for types?

2018-01-14 Thread Sven Barth via fpc-pascal
On 14.01.2018 16:19, Michael Van Canneyt wrote: > > > On Sun, 14 Jan 2018, Sven Barth via fpc-pascal wrote: > >> On 14.01.2018 09:56, Michael Van Canneyt wrote: >>> >>> >>> On Sun, 14 Jan 2018, Ryan Joseph wrote: >>> >>>>

Re: [fpc-pascal] Generics vs templates

2018-01-09 Thread Sven Barth via fpc-pascal
Am 10.01.2018 07:39 schrieb "Marco van de Voort" <mar...@stack.nl>: In our previous episode, Sven Barth via fpc-pascal said: > Precisely these virtual methods are one point. They might not add much by > themselves, but if they're called for each Add or Remove operation they

Re: [fpc-pascal] Generics vs templates

2018-01-09 Thread Sven Barth via fpc-pascal
Am 10.01.2018 05:10 schrieb "Ryan Joseph" : > On Jan 10, 2018, at 6:37 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > > When using the Generics.Collections unit of Delphi I can define a list class that can hold Integer data types, by doing the

Re: [fpc-pascal] Compiler hangs while generating debug information

2018-01-11 Thread Sven Barth via fpc-pascal
Am 11.01.2018 18:47 schrieb "Nitorami" : Any opinions ? You can try to minimize your source by removing parts to see what might cause the problem. Alternatively you can debug the compiler in Lazarus. Regards, Sven ___

Re: [fpc-pascal] _Release call location for unused function results

2018-01-30 Thread Sven Barth via fpc-pascal
Am 30.01.2018 15:07 schrieb "Maciej Izak" : > > question is: would we like to enabling this for all Delphi modes? > > Everything that needs this is essentially feature abuse. I would not enable > it by default +1 . Anyway I am still considering : commit or not :P. While

Re: [fpc-pascal] question about _fpc_local_unwind

2018-02-02 Thread Sven Barth via fpc-pascal
Am 02.02.2018 15:50 schrieb "Matias Vara" : Thanks for the answer, I will imitate in Toro the behavior of Win64. Maybe it wound be better if you try to use the i386-embedded or x86_64-embedded targets. The non-embedded targets are simply not geared towards usage on a bare

Re: [fpc-pascal] Is there a smart way to save/restore NotifyEvents and objects?

2018-02-02 Thread Sven Barth via fpc-pascal
Am 02.02.2018 17:53 schrieb "Dennis" : I have list of objects which contains references to other objects. I need to save all these objects to harddisk to be restored on a latter day. I know how to stream the data fields of these objects to a TFileStream but the tricky part

Re: [fpc-pascal] question about _fpc_local_unwind

2018-02-02 Thread Sven Barth via fpc-pascal
Am 02.02.2018 18:12 schrieb "Matias Vara" <matiasev...@gmail.com>: Hello, 2018-02-02 17:17 GMT+01:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > Am 02.02.2018 15 <02%2002%2020%2018%2015>:50 schrieb "Matias Vara" < > matia

Re: [fpc-pascal] Is there a smart way to save/restore NotifyEvents and objects?

2018-02-03 Thread Sven Barth via fpc-pascal
Am 03.02.2018 09:11 schrieb "Michael Van Canneyt" : On Sat, 3 Feb 2018, Dennis Poon wrote: >> >> If your objects inherit from TComponent and you use published properties >> you can use the streaming screen of the RTL. >> >> I am curious how TComponent save and restore

Re: [fpc-pascal] Is there a smart way to save/restore NotifyEvents and objects?

2018-02-03 Thread Sven Barth via fpc-pascal
Am 03.02.2018 10:08 schrieb "Michael Van Canneyt" <mich...@freepascal.org>: On Sat, 3 Feb 2018, Sven Barth via fpc-pascal wrote: Am 03.02.2018 09:11 schrieb "Michael Van Canneyt" <mich...@freepascal.org>: > > > > On Sat, 3 Feb 2018, Dennis Poon w

Re: [fpc-pascal] Range checks

2018-01-27 Thread Sven Barth via fpc-pascal
On 27.01.2018 15:10, C Western wrote: > The following innocuous looking code generates a range check error: > > {$R+} > function Count: qword; > begin >   Result := 0; > end; > var >   i: Integer; > begin >   for i := 0 to Count-1 do >     WriteLn(i); > end. > > I can (more or less) see why, but

Re: [fpc-pascal] Operator overload resolution with arrays

2018-02-05 Thread Sven Barth via fpc-pascal
Am 05.02.2018 13:02 schrieb "Martok" : Hi all, I'm having some logical problems with fgl generic lists and operator overloads. This is essentially the same issue as discussed last year on the forum as . I know

Re: [fpc-pascal] Operator overload resolution with arrays

2018-02-05 Thread Sven Barth via fpc-pascal
Am 05.02.2018 15:49 schrieb "Maciej Izak" : specialization for the same generic type can behaves in different way! for example final code for TFoo< TSomeArray> will be different than for TFoo declared in other module (!). What if TFoo has some class var + class constructor ?

Re: [fpc-pascal] Operator overload resolution with arrays

2018-02-05 Thread Sven Barth via fpc-pascal
Am 05.02.2018 17:50 schrieb "Martok" : Am 05.02.2018 um 15:49 schrieb Maciej Izak: > for example final code for TFoo< TSomeArray> will be different than for > TFoo declared in other module (!). Crap. True. Now I see why it is how it is. The maximum extent would be to

Re: [fpc-pascal] Scoped enums and inferred types

2018-02-21 Thread Sven Barth via fpc-pascal
Am 21.02.2018 09:48 schrieb "Ryan Joseph" : > On Feb 21, 2018, at 2:57 PM, Michael Van Canneyt wrote: > > The job of the compiler is to create correct code. Not to ensure you write readable code. Every feature that is introduced > offers more

Re: [fpc-pascal] Scoped enums and inferred types

2018-02-20 Thread Sven Barth via fpc-pascal
Am 21.02.2018 04:09 schrieb "Ryan Joseph" : Is this a missing feature or do you need to enable it or something? There is none. The compiler does not know the type of the parameter, because overload selection occurs only after all parameters have been parsed. So

Re: [fpc-pascal] Proper preprocessor?

2018-06-21 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Do., 21. Juni 2018, 15:53: > I’m actually making rapid progress on a macro function syntax where the > parameters are replaced by the inputs when called: > > {$define put(x):='into_x’} > > put(100); // replaces to ‘into_100’ > > Do I have permission to develop this feature

Re: [fpc-pascal] Proper preprocessor?

2018-06-21 Thread Sven Barth via fpc-pascal
Am 21.06.2018 um 17:25 schrieb Ryan Joseph: On Jun 21, 2018, at 10:08 PM, Sven Barth via fpc-pascal wrote: For more questions you can start a thread in fpc-devel. That's the purpose of that mailing list after all. Thanks, I’ll post there tomorrow about the technical stuff. At first

Re: [fpc-pascal] Proper preprocessor?

2018-06-21 Thread Sven Barth via fpc-pascal
Am 22.06.2018 um 06:35 schrieb Ryan Joseph: Here’s a macro I like from C. It captures the assert expression and prints it back out into the console (it would halt the program also). Can this be done in Pascal? In C they return the file name and line number also which is really nice. {$define

Re: [fpc-pascal] Proper preprocessor?

2018-06-22 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Fr., 22. Juni 2018, 08:01: > > > On Fri, 22 Jun 2018, Ryan Joseph wrote: > > > > > > >> On Jun 22, 2018, at 12:21 PM, Michael Van Canneyt < > mich...@freepascal.org> wrote: > >> > >> 'Nice' is not an argument. > >> > >> If someone else assumes that assert() works

Re: [fpc-pascal] Proper preprocessor?

2018-06-22 Thread Sven Barth via fpc-pascal
denisgolovan schrieb am Fr., 22. Juni 2018, 10:24: > Generics are rather limited in that respect. > At least some construction should exist to instantiate those generics. > e.g. to create several public structs, interfaces, free functions > (possibly instancing generics) in one go. > Do you

Re: [fpc-pascal] access violation?

2018-07-28 Thread Sven Barth via fpc-pascal
Am 27.07.2018 um 19:41 schrieb Ryan Joseph: On Jul 27, 2018, at 11:24 AM, Mattias Gaertner wrote: You can't if you compile with -CR. The RTL is not compiled with objectchecks, so it works there. According to this test not only can you call methods on nil objects but it calls the method

Re: [fpc-pascal] access violation?

2018-07-30 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mo., 30. Juli 2018, 18:05: > > > > On Jul 28, 2018, at 2:03 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > The method you provided below would not fail anyway, because it doesn't > dereference Self.

Re: [fpc-pascal] Generics - extending TFPGObjectList

2018-07-25 Thread Sven Barth via fpc-pascal
Am 26.07.2018 um 02:31 schrieb Vojtěch Čihák: Hello, I needed to extend TFPGObjectList and I found two wierd things (FPC 3.1.1 r39507): program project1; {$mode objfpc}{$H+} uses   Classes, FGL; type   TBaseClass = class (TObject)   end;   TIDClass = class (TBaseClass)     ID:

Re: [fpc-pascal] Generics - extending TFPGObjectList

2018-07-26 Thread Sven Barth via fpc-pascal
Vojtěch Čihák schrieb am Do., 26. Juli 2018, 13:40: > Thanks for reply. > > > > Ad 2) I opened issue: https://bugs.freepascal.org/view.php?id=34037 > > > > Ad 1) Are there any plans for improvement of generic inheritance? Related > to my example, instead of > > > > generic TFPGObjectListEx =

Re: [fpc-pascal] access violation?

2018-07-31 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Di., 31. Juli 2018, 18:15: > > > > On Jul 30, 2018, at 11:08 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > If the method doesn't access Self then there is nothing you can do. > > Is this somethin

Re: [fpc-pascal] Operator overload bug

2018-08-04 Thread Sven Barth via fpc-pascal
On 28.07.2018 16:38, John Doe wrote: > On Mon, Jul 23, 2018 at 1:49 PM, Sven Barth via fpc-pascal > <mailto:fpc-pascal@lists.freepascal.org>> wrote: > > Ryan Joseph <mailto:r...@thealchemistguild.com>> schrieb am Mo., 23. Juli 2018, > 17:35: > &

Re: [fpc-pascal] Operator overload bug

2018-08-04 Thread Sven Barth via fpc-pascal
On 04.08.2018 17:31, Ben Grasset wrote: > On Sat, Aug 4, 2018 at 10:38 AM, Sven Barth via fpc-pascal > <mailto:fpc-pascal@lists.freepascal.org>> wrote: > > On 28.07.2018 16:38, John Doe wrote: > > On Mon, Jul 23, 2018 at 1:49 PM, Sven Barth via fpc-pascal

Re: [fpc-pascal] Syntax changes suggestions

2018-07-27 Thread Sven Barth via fpc-pascal
R0b0t1 schrieb am Do., 26. Juli 2018, 09:53: > On Mon, Jul 23, 2018 at 11:11 AM, Ryan Joseph > wrote: > > > > > >> On Jul 22, 2018, at 4:54 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> > >> And that's why

Re: [fpc-pascal] How __FPC_specific_handler() is invoked

2018-07-25 Thread Sven Barth via fpc-pascal
Matias Vara schrieb am Mi., 25. Juli 2018, 12:55: > > El mar., 24 jul. 2018 a las 13:57, Sven Barth via fpc-pascal (< > fpc-pascal@lists.freepascal.org>) escribió: > >> Matias Vara schrieb am Di., 24. Juli 2018, 11:04: >> >>> Hello, >>> >&g

Re: [fpc-pascal] Rebuilding RTL

2018-08-07 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mi., 8. Aug. 2018, 00:02: > If I cd to the rtl directory in the fpc sources and run make they are > compiled into the /rtl/units/x86_64-darwin directory. > > 1) How do I compile the ppc386 units? the readme says there’s a FPC > variable for on the makefile configs but I

Re: [fpc-pascal] Rebuilding RTL

2018-08-07 Thread Sven Barth via fpc-pascal
Am 08.08.2018 um 00:42 schrieb Ryan Joseph: On Aug 7, 2018, at 4:17 PM, Sven Barth via fpc-pascal wrote: Are you sure that you used the correct compiler? Try to pass -n to tell it to ignore the fpc.cfg and see whether it picks up the correct ones when you pass them with - Fu (-Fo

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-15 Thread Sven Barth via fpc-pascal
Am 15.08.2018 um 11:17 schrieb Michael Van Canneyt: On Wed, 15 Aug 2018, Dennis wrote: Michael Van Canneyt wrote: On Wed, 15 Aug 2018, Dennis wrote: I was trying to use a generic class TDictionary  with type T. This class has a method that compares a variable of T with another one.

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-15 Thread Sven Barth via fpc-pascal
Am 15.08.2018 um 10:59 schrieb Dennis: Why class operator is accepted for advanced records but not old fashion object??? Because objects are not records. Internally they are handled more closely to classes than records. Regards, Sven ___ fpc-pascal

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-16 Thread Sven Barth via fpc-pascal
Am 15.08.2018 um 17:29 schrieb Michael Van Canneyt: On Wed, 15 Aug 2018, Sven Barth via fpc-pascal wrote: But maybe you are using mode delphi ? If so, try separating out the object definition in a separate unit which is not compiled in delphi mode. A global operator won't help at all

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-16 Thread Sven Barth via fpc-pascal
Am 16.08.2018 um 12:47 schrieb Michael Van Canneyt: Am 15.08.2018 um 17:29 schrieb Michael Van Canneyt: On Wed, 15 Aug 2018, Sven Barth via fpc-pascal wrote: But maybe you are using mode delphi ? If so, try separating out the object definition in a separate unit which is not compiled

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-16 Thread Sven Barth via fpc-pascal
Am 16.08.2018 um 12:23 schrieb Dennis Poon: Sven Barth via fpc-pascal wrote: Am 15.08.2018 um 10:59 schrieb Dennis: Why class operator is accepted for advanced records but not old fashion object??? Because objects are not records. Internally they are handled more closely to classes than

Re: [fpc-pascal] Rebuilding RTL

2018-08-08 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mi., 8. Aug. 2018, 18:48: > Btw, what are all these messages I get when building the compiler? I don’t > know if they should be ignored or I caused them myself. > > objc1.inc(360,3) Note: tgobj: (FreeTemp) freeing of temp at pos > -2147483648 requested > They are due to

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-19 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Sa., 18. Aug. 2018, 19:38: > > > > On Aug 17, 2018, at 7:19 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > However for classes there is the problem of temporary variables. Take a > := b + c + d. That i

Re: [fpc-pascal] Very slow startup of Frepascal programs on just one system

2018-08-22 Thread Sven Barth via fpc-pascal
James schrieb am Mi., 22. Aug. 2018, 11:06: > Any ideas on what may be going on? This is pretty much un-usable with > these huge delays every time I need to start one of my freepascal > programs. > As a test try to disable your anti virus and/or Windows Defender. Regards, Sven >

Re: [fpc-pascal] How is interface variable implemented?

2018-08-25 Thread Sven Barth via fpc-pascal
Dennis schrieb am Fr., 24. Aug. 2018, 13:11: > The run results: > Object call Time Taken Seconds: 2.1899964194744825E-001 > Interface call Time Taken Seconds: 2.799001622200E-001 > > so, the time difference is about 27% > > > My question is, where is this extra time spent? > > I am assuming

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-17 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 17. Aug. 2018, 18:22: > > > > On Aug 16, 2018, at 8:55 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > It shouldn't be hard. Feel free to provide a patch together with some > tests and it will

Re: [fpc-pascal] Link with GCC object files

2018-08-22 Thread Sven Barth via fpc-pascal
Andreas schrieb am Mi., 22. Aug. 2018, 12:59: > Hi, I have a question. Is it possible to link FPC for Linux (PC and ARM) > with GCC or other C++ object files? > You can use the $L directive for this ( https://freepascal.org/docs-html/current/prog/progsu43.html#x50-490001.2.43 ). If you use C++

Re: [fpc-pascal] Syntax changes suggestions

2018-07-18 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mi., 18. Juli 2018, 21:41: > > > > On Jul 18, 2018, at 12:47 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > A point against stack based classes is that Object Pascal's object model > is highly geared to

Re: [fpc-pascal] Syntax changes suggestions

2018-07-18 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mi., 18. Juli 2018, 21:37: > > > > On Jul 18, 2018, at 12:44 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > And to give you a slightly different example: around a year ago or so I > implemented

Re: [fpc-pascal] Syntax changes suggestions

2018-07-20 Thread Sven Barth via fpc-pascal
Am 20.07.2018 um 00:53 schrieb Ben Grasset: If a feature works as intended and is useful (which is all that matters), how is it "blind copying"? Because a feature might change the language in a way that's not in the spirit of the language. Look at how Delphi implemented attributes: they're

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Sven Barth via fpc-pascal
Marco van de Voort schrieb am Di., 17. Juli 2018, 16:50: > To be honest, I'm wondering why Sven actually bothers to answer this > nonsense. > Trust me, I wonder the same  Regards, Sven > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Sven Barth via fpc-pascal
Am 17.07.2018 um 20:00 schrieb Ryan Joseph: On Jul 17, 2018, at 11:27 AM, Jim Lee wrote: Likewise, "modern" programming languages are all converging on a common feature set, like cultural cross-pollination. if that’s our mindset then how do we account for times when we’ve actually

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Sven Barth via fpc-pascal
Am 17.07.2018 um 22:32 schrieb Ryan Joseph: On Jul 17, 2018, at 2:15 PM, Sven Barth via fpc-pascal wrote: Those specific features you mention were added because of Delphi compatibility not because someone thought they are good. Florian even likened records with methods to a can of worms

Re: [fpc-pascal] How to translate Delphi Assembly MOV EAX,[EBP+4]

2018-07-18 Thread Sven Barth via fpc-pascal
Dennis schrieb am Mi., 18. Juli 2018, 19:01: > Thanks. > > So the following will give an address+frame of the calling routine ? > get_caller_addr(get_frame), get_caller_frame(get_frame) > As long as you pass it to the "raise ... at", yes. Regards, Sven >

Re: [fpc-pascal] Syntax changes suggestions

2018-07-18 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mi., 18. Juli 2018, 19:00: > > > > On Jul 18, 2018, at 7:14 AM, Ben Grasset wrote: > > > > Classes are unsuitable performance-wise for many use cases, and TP > objects lack important features such as variant parts. Advanced records are > a great lightweight in-between

Re: [fpc-pascal] Syntax changes suggestions

2018-07-18 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mi., 18. Juli 2018, 19:15: > > > > On Jul 17, 2018, at 2:41 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > There is a more important difference: the developers and the users. Only > because the latte

Re: [fpc-pascal] How to translate Delphi Assembly MOV EAX,[EBP+4]

2018-07-18 Thread Sven Barth via fpc-pascal
Dennis schrieb am Mi., 18. Juli 2018, 17:19: > The following delphi code when compiled by FPC, raised these errors: > Compile Project, Target: lib\x86_64-win64\Project1.exe: Exit code 1, > Errors: 10, Warnings: 2 > StrBuffer.pas(100,19) Error: Unknown identifier "EAX" > StrBuffer.pas(100,23)

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Sven Barth via fpc-pascal
Am 16.07.2018 um 19:55 schrieb R0b0t1: - Try except finally blocks I can support this one, I am surprised it is not already supported. Wasn't this mentioned in another recent thread as existing? Does it exist in at least Delphi mode? This is not supported and the last time it was discussed

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Sven Barth via fpc-pascal
Santiago A. schrieb am Mo., 16. Juli 2018, 16:27: > El 16/07/2018 a las 15:02, Sven Barth via fpc-pascal escribió: > > Santiago A. schrieb am Mo., 16. Juli 2018, 13:41: > >> I have some suggestions of change to freepascal syntax, just to debate >> >>

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Sven Barth via fpc-pascal
Am 16.07.2018 um 23:14 schrieb R0b0t1: On Mon, Jul 16, 2018 at 3:28 PM, Sven Barth via fpc-pascal wrote: Am 16.07.2018 um 19:55 schrieb R0b0t1: - Try except finally blocks I can support this one, I am surprised it is not already supported. Wasn't this mentioned in another recent thread

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Sven Barth via fpc-pascal
Am 17.07.2018 um 04:48 schrieb Ryan Joseph: On Jul 16, 2018, at 7:02 AM, Sven Barth via fpc-pascal wrote: Might come, though not in that way (take your example: what if you pass the instance to some other code that stores it beyond the life time of the function) That’s what you guys said

Re: [fpc-pascal] No type info available for this type (Enumerated type with constant assignment)

2018-07-23 Thread Sven Barth via fpc-pascal
Martok schrieb am Mo., 23. Juli 2018, 17:15: > Am 23.07.2018 um 17:05 schrieb Sven Barth via fpc-pascal: > > Is this kind of enumerated type with constant assignment not > supported > > by FPC 3.0.4? > > > >TMonthType = (January

Re: [fpc-pascal] Operator overload bug

2018-07-23 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mo., 23. Juli 2018, 17:35: > > > > On Jul 23, 2018, at 12:00 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Yes, it's a bug, so please report it. > > Thanks, reported. The severity is “min

Re: [fpc-pascal] Operator overload bug

2018-07-23 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am So., 22. Juli 2018, 18:11: > I mentioned this as an aside a while ago but I don’t remember getting a > response so I’d like to formally reintroduce the issue. > > Should I file a bug report for this or is it expected behavior? Personally > I’d really like to get implicit

Re: [fpc-pascal] Syntax changes suggestions

2018-07-23 Thread Sven Barth via fpc-pascal
Am 21.07.2018 um 22:43 schrieb Ben Grasset: On Fri, Jul 20, 2018 at 1:20 AM, Sven Barth via fpc-pascal <mailto:fpc-pascal@lists.freepascal.org>> wrote: Because a feature might change the language in a way that's not in the spirit of the language. Look at how Delphi im

Re: [fpc-pascal] Syntax changes suggestions

2018-07-18 Thread Sven Barth via fpc-pascal
R0b0t1 schrieb am Mi., 18. Juli 2018, 21:46: > On Wed, Jul 18, 2018 at 2:04 PM, Ryan Joseph > wrote: > > > > > >> On Jul 18, 2018, at 12:44 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> > >> And to give you a

Re: [fpc-pascal] Pascal units to connect to an Exchange server

2018-07-19 Thread Sven Barth via fpc-pascal
Bo Berglund schrieb am Do., 19. Juli 2018, 21:52: > On Thu, 19 Jul 2018 15:29:12 -0300, luciano de souza > wrote: > > >Hello all, > >From a Linux machine connected to a Windows machine by VPN, I’d like > >to send e-mails programmatically using a Microsoft Exchange account. > >Using Windows

Re: [fpc-pascal] Pascal units to connect to an Exchange server

2018-07-19 Thread Sven Barth via fpc-pascal
luciano de souza schrieb am Do., 19. Juli 2018, 20:29: > Hello all, > From a Linux machine connected to a Windows machine by VPN, I’d like > to send e-mails programmatically using a Microsoft Exchange account. > Using Windows resources, I could call Outlook automation API to do > this task. But

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Sven Barth via fpc-pascal
Santiago A. schrieb am Mo., 16. Juli 2018, 13:41: > I have some suggestions of change to freepascal syntax, just to debate > > (All are backward compatible) > > - Declaring variables inside blocks, and loop variables > -> reduces readability -> no interest - Autofree pointers > Might come,

Re: [fpc-pascal] No type info available for this type (Enumerated type with constant assignment)

2018-07-23 Thread Sven Barth via fpc-pascal
Dennis schrieb am Mo., 23. Juli 2018, 12:24: > Is this kind of enumerated type with constant assignment not supported > by FPC 3.0.4? > >TMonthType = (January=1, February, May=5,June, July); > The enumeration type itself is supported, however TypeInfo() and thus GetEnumName() and friends

Re: [fpc-pascal] How __FPC_specific_handler() is invoked

2018-07-24 Thread Sven Barth via fpc-pascal
Matias Vara schrieb am Di., 24. Juli 2018, 11:04: > Hello, > > I am writing my own __FPC_specific_handler() but I can't figure out when > this function is registered. I guess this function is registered to the OS > to be invoked when an exception happens. In the assembler code I have > something

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Sven Barth via fpc-pascal
Henry Vermaak schrieb am Di., 17. Juli 2018, 11:05: > On Mon, Jul 16, 2018 at 03:02:42PM +0200, Sven Barth via fpc-pascal wrote: > > Santiago A. schrieb am Mo., 16. Juli 2018, 13:41: > > > > > I have some suggestions of change to freepascal syntax, just to debate >

Re: [fpc-pascal] with in classes/records

2018-09-09 Thread Sven Barth via fpc-pascal
Am 09.09.2018 um 16:16 schrieb Michael Van Canneyt: On Sun, 9 Sep 2018, Ryan Joseph wrote: It seems syntacticly possible that default properties could be recursive by having a default property reference a record/class with another default property. Should that be allowed? I don't think

Re: [fpc-pascal] with in classes/records

2018-09-06 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Do., 6. Sep. 2018, 16:33: > > > > On Sep 6, 2018, at 9:25 PM, Michael Van Canneyt > wrote: > > > > No, the whole point of default is that they should be for any kind of > field. > > For example if you want a nullable boolean, you'll do something like > > > > Type > >

Re: [fpc-pascal] Unbuffering I/O

2018-08-29 Thread Sven Barth via fpc-pascal
Am 29.08.2018 um 18:25 schrieb Mark Morgan Lloyd: On 29/08/18 16:00, Henry Vermaak wrote: On Wed, Aug 29, 2018 at 03:01:54PM +, Mark Morgan Lloyd wrote:> I think I've seen this question asked before, my apologies if this was> recently.> > I've got two programs intended to be functionally

Re: [fpc-pascal] with in classes/records

2018-09-04 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Di., 4. Sep. 2018, 11:27: > > > > On Sep 4, 2018, at 2:06 PM, Ryan Joseph > wrote: > > > > Sorry I didn’t think enough before I sent this. > > > > We *must* allow this assignment to make operator overloads work. += > operators are also basically assigning TWrapper to

Re: [fpc-pascal] Embedding DLL into EXE for Windows 32 bit?

2018-07-07 Thread Sven Barth via fpc-pascal
Zoe Peterson schrieb am Sa., 7. Juli 2018, 10:04: > > 3) Codesign the DLL and executable and verify that they haven't been > modified. There's code to do that on Stack Overflow, though it wasn't > tested on Lazarus: > https://stackoverflow.com/questions/5993877/checking-digital- >

Re: [fpc-pascal] TFPGObjectList error

2018-07-03 Thread Sven Barth via fpc-pascal
Am 01.07.2018 um 04:14 schrieb Michalis Kamburelis: 2018-07-01 4:01 GMT+02:00 Vojtěch Čihák : this seems to be misleading error message. TFPGObjectList works well for objects (classes). When I tried to push record to it, I got the same error message. TVec3 is not class, right? Indeed, it's a

Re: [fpc-pascal] Loss of precision when using math.Max()

2018-07-13 Thread Sven Barth via fpc-pascal
Martok schrieb am Fr., 13. Juli 2018, 16:37: > The other links were about intermediates of runtime calculations, so this > change > is correct: > > I have added support for the directive $EXCESSPRECISION: it forces that > all binary float operations are executed with > > the highest available

Re: [fpc-pascal] Managed record questions

2018-03-07 Thread Sven Barth via fpc-pascal
Am 08.03.2018 04:44 schrieb "Ryan Joseph" : 1) Given the example below we have a template for a standard ref counted record. Shouldn’t there be some “meta record” type that implements this automatically? I’m thinking about adding this to some types but the idea of

Re: [fpc-pascal] Managed record questions

2018-03-08 Thread Sven Barth via fpc-pascal
Am 08.03.2018 08:33 schrieb "Maciej Izak" : No, this doesn't beg the question, because Object Pascal classes are > designed in the principle to reduce on the heap. Changing this would not > only mean quite some changes in the compiler/RTL with no real gain, but it > would

Re: [fpc-pascal] Managed record questions

2018-03-08 Thread Sven Barth via fpc-pascal
Am 08.03.2018 12:51 schrieb "Ryan Joseph" <r...@thealchemistguild.com>: > On Mar 8, 2018, at 5:42 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > You are supposed to use try...finally for this. The finally-block is always executed when

Re: [fpc-pascal] Managed record questions

2018-03-08 Thread Sven Barth via fpc-pascal
Am 08.03.2018 09:44 schrieb "Ryan Joseph" : 2) We need to remember to call Free() at the end of the function and take precaution to not exit early and leak memory (maybe even using a goto to break out of nested loops or nested functions, who knows). You are supposed

<    1   2   3   4   5   6   7   8   9   10   >