Re: [fpc-devel] MSSQL doesn't commit 2nd transaction

2018-06-18 Thread Michael Van Canneyt
On Mon, 18 Jun 2018, LacaK wrote: Is this a bug in fpc-db or is this some kind of MSSQL feature? Does it mean I cannot use multiple transactions with one MSSQL connection? AFAIK MS SQL Server does not natively supports concept of multiple simultaneous independent transactions per one

[fpc-devel] Privacy statement published.

2018-05-28 Thread Michael Van Canneyt
Hello, As most of you are aware, the servers of FPC (and many of the collaborators of the core team) are located in the EU. The GDPR (General Data Protection Regulation) is in effect since 25 may, and Free Pascal is also subject to its stipulations. One of the requirements is to inform

Re: [fpc-devel] NewPascal plans, Generics.Collections and FPC trunk

2018-05-02 Thread Michael Van Canneyt
On Wed, 2 May 2018, Maciej Izak wrote: Hello, I was kicked away today from core team (probably by Michael Van Canneyt). Correct. I and I alone take full responsibility. I have only warned Florian Klaempfl in advance that this could happen, none of the other members have anything to do

Re: [fpc-devel] What's the status of Maciej's Smart Pointer enhancements?

2018-04-30 Thread Michael Van Canneyt
On Mon, 30 Apr 2018, Anthony Walter wrote: Okay, I found a nice work around to allow for circular references on record types: record helpers type JSValue = record ... end; JSObject = record ... end; JSValueHelper = record helper for JSValue function AsObject: JSObject; end;

Re: [fpc-devel] What's the status of Maciej's Smart Pointer enhancements?

2018-04-30 Thread Michael Van Canneyt
On Mon, 30 Apr 2018, Maciej Izak wrote: I can imagine that checking such a field will be more fast than actually calling a routine. This is just a thought, if you had already considered such a thing, I would like to hear why you discarded it, for my education. this is exactly what is done

Re: [fpc-devel] What's the status of Maciej's Smart Pointer enhancements?

2018-04-30 Thread Michael Van Canneyt
On Mon, 30 Apr 2018, Maciej Izak wrote: 2018-04-30 14:59 GMT+02:00 Michael Van Canneyt <mich...@freepascal.org>: Maybe because your solution is simply not convincing and I wish to try and find a solution just a little harder ? Allow me to exaggerate the point a little: A bunch of c

Re: [fpc-devel] What's the status of Maciej's Smart Pointer enhancements?

2018-04-30 Thread Michael Van Canneyt
On Mon, 30 Apr 2018, Maciej Izak wrote: 2018-04-30 13:53 GMT+02:00 Michael Van Canneyt <mich...@freepascal.org>: You mean that a constructor call for a program that does not uses pointers/management operators also gets slower ? Can we solve this _without_ additional tricks ? B

Re: [fpc-devel] What's the status of Maciej's Smart Pointer enhancements?

2018-04-30 Thread Michael Van Canneyt
On Mon, 30 Apr 2018, Maciej Izak wrote: 2018-04-30 13:15 GMT+02:00 Anthony Walter : Okay great. Thanks for the information. I'll experiment with the smart pointers and their potential performance impact. In the interim I've created a solution using the approach of records

Re: [fpc-devel] Dangerous optimization in CASE..OF

2018-04-14 Thread Michael Van Canneyt
On Sat, 14 Apr 2018, Ondrej Pokorny wrote: On 14.04.2018 9:59, Michael Van Canneyt wrote: On Sat, 14 Apr 2018, Ondrej Pokorny wrote: On 02.07.2017 18:49, Jonas Maebe wrote: I would be in favour of a new intrinsic. I have to admit that for some usages I would prefer a compiler

Re: [fpc-devel] Dangerous optimization in CASE..OF

2018-04-14 Thread Michael Van Canneyt
On Sat, 14 Apr 2018, Ondrej Pokorny wrote: On 02.07.2017 18:49, Jonas Maebe wrote: I would be in favour of a new intrinsic. I have to admit that for some usages I would prefer a compiler intrinsic that returns False instead of raising an exception. Something like: function

Re: [fpc-devel] Dangerous optimization in CASE..OF

2018-04-13 Thread Michael Van Canneyt
On Fri, 13 Apr 2018, Ondrej Pokorny wrote: On 02.07.2017 18:55, Ondrej Pokorny wrote: On 02.07.2017 18:49, Jonas Maebe wrote: No, there is no built-in checked conversion from integer to arbitrary enumeration types. That's why I suggested in the bug report that started this thread to file a

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Michael Van Canneyt
On Thu, 5 Apr 2018, Martok wrote: Am 05.04.2018 um 08:35 schrieb Michael Van Canneyt: If the compiler devs wanted, they could initialize every string with the '' constant, That is in fact the -gt option. I doubt -gt does something for managed types? Pascal states: do not assume

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Michael Van Canneyt
On Thu, 5 Apr 2018, Alexander Klenin wrote: On Thu, Apr 5, 2018 at 10:24 AM, Michael Van Canneyt <mich...@freepascal.org> wrote: You explained exactly why I think the delphi docs are wrong. If delphi wanted to do things correctly and consistently they would simply say 'ever

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Michael Van Canneyt
On Thu, 5 Apr 2018, Ondrej Pokorny wrote: On 05.04.2018 8:35, Michael Van Canneyt wrote: Now, it is also correct that the compiler developers are aware that many people rely on this implementation detail. Since when is documented behavior considered as "implementation d

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Michael Van Canneyt
On Thu, 5 Apr 2018, Ondrej Pokorny wrote: On 05.04.2018 0:34, Michael Van Canneyt wrote: What, because you do not agree ? No, because I didn't get any arguments against. You did, you just don't consider them valid. There are 2 narratives, and you choose to ignore the 2nd one. Now

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-04 Thread Michael Van Canneyt
On Thu, 5 Apr 2018, Ondrej Pokorny wrote: On 04.04.2018 21:51, Jonas Maebe wrote: On 04/04/18 20:26, Ondrej Pokorny wrote: The compiler initializes the variable implicitely for myself - this is documented and I know it. There cannot be "wrong code behaviour" (as you stated) and thus I

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-03-25 Thread Michael Van Canneyt
On Sat, 24 Mar 2018, Ondrej Pokorny wrote: On 24.03.2018 23:00, Sven Barth via fpc-devel wrote: Ondrej Pokorny > schrieb am Sa., 24. März 2018, 20:49: This is not correct. Global simple variables are always initialized. At least in

Re: [fpc-devel] Multiple variable initialization

2018-03-24 Thread Michael Van Canneyt
On Sat, 24 Mar 2018, Ozz Nixon wrote: As an extension, it makes sense - but I would make it a forced command line switch and obscure $modeswitch. Modeswitched and command-line options only go so far. The problem with this approach is that, if I see someone elses code, I still have the

Re: [fpc-devel] Multiple variable initialization

2018-03-24 Thread Michael Van Canneyt
On Sat, 24 Mar 2018, Ondrej Pokorny wrote: Is there a reason why multiple variable initialization is forbidden? program Test; var   A: Integer = 0;    // allowed   B, C: Integer = 0; // not allowed I think this is confusing to read. Are B and C both initialized, or only B ? Javascript

Re: [fpc-devel] Fix CamelCase in unit and method names

2018-03-23 Thread Michael Van Canneyt
On Fri, 23 Mar 2018, Pierre Muller wrote: Le 23/03/2018 à 23:12, Michael Van Canneyt a écrit : On Fri, 23 Mar 2018, Sven Barth via fpc-devel wrote: R0b0t1 <r03...@gmail.com> schrieb am Fr., 23. März 2018, 16:07: IMHO preferably not the unit names (as in 'unit XxX') - wit

Re: [fpc-devel] Fix CamelCase in unit and method names

2018-03-23 Thread Michael Van Canneyt
On Fri, 23 Mar 2018, Sven Barth via fpc-devel wrote: R0b0t1 schrieb am Fr., 23. März 2018, 16:07: IMHO preferably not the unit names (as in 'unit XxX') - with case sensitive file names on Unix, this change might increase time for searching the respective file (somewhat).

Re: [fpc-devel] Fix CamelCase in unit and method names

2018-03-23 Thread Michael Van Canneyt
On Thu, 22 Mar 2018, R0b0t1 wrote: On Thu, Mar 22, 2018 at 10:18 AM, Juha Manninen wrote: On Thu, Mar 22, 2018 at 3:15 PM, Denis Kozlov wrote: Please do... It has caused enough eye (OCD) stress over the years ;) +1 Yes, it has bothered also

Re: [fpc-devel] Fix CamelCase in unit and method names

2018-03-22 Thread Michael Van Canneyt
On Thu, 22 Mar 2018, Tomas Hajny wrote: On Thu, March 22, 2018 12:42, Michael Van Canneyt wrote: On Thu, 22 Mar 2018, Ondrej Pokorny wrote: Hi, will a patch be applied that fixes CamelCase in unit and method names and other identifiers? Example: dateutils -> DateUtils sysut

Re: [fpc-devel] Fix CamelCase in unit and method names

2018-03-22 Thread Michael Van Canneyt
On Thu, 22 Mar 2018, Ondrej Pokorny wrote: Hello, will a patch be applied that fixes CamelCase in unit and method names and other identifiers? Example: dateutils -> DateUtils sysutils -> SysUtils typinfo -> TypInfo contnrs -> Contnrs strutils -> StrUtils EnterCriticalsection ->

Re: [fpc-devel] Improvments to HTML Web Module

2018-03-03 Thread Michael Van Canneyt
On Sat, 3 Mar 2018, African Wild Dog wrote: 2018-03-03 6:31 GMT-03:00 Michael Van Canneyt <mich...@freepascal.org>: I suppose you mean TCustomHTMLModule ? Exactly. Sorry for my typo. I mean TCustomHTMLModule. I have fixed 1 by descending TCustomHTMLModule from TSessionHTTP

Re: [fpc-devel] Improvments to HTML Web Module

2018-03-03 Thread Michael Van Canneyt
On Fri, 2 Mar 2018, African Wild Dog wrote: I would like to propose (and develop, if authorized) the following improvements to the web module specialized in generating HTML content (TCustomHTTPModule): I suppose you mean TCustomHTMLModule ? Because TCustomHTTPModule is a base class. It

Re: [fpc-devel] Abs(Variant) unexpected result

2018-02-25 Thread Michael Van Canneyt
On Sun, 25 Feb 2018, Bart wrote: On Sun, Feb 25, 2018 at 5:34 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: So, would it be possible to have an overloaded Abs(V: Variant): Variant; function in the variants unit? I advise against it. S : String; begin S:='My very nice

Re: [fpc-devel] Abs(Variant) unexpected result

2018-02-25 Thread Michael Van Canneyt
On Sun, 25 Feb 2018, Bart wrote: On Sun, Feb 25, 2018 at 5:01 PM, Jonas Maebe wrote: As Michael said, overloads are selected at compile time. This is true for both FPC and Delphi. We even have over a 100 unit tests that we ran under Delphi to reverse engineer their

Re: [fpc-devel] Abs(Variant) unexpected result

2018-02-25 Thread Michael Van Canneyt
On Sun, 25 Feb 2018, Bart wrote: On Sun, Feb 25, 2018 at 1:01 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: The compiler does not know at compile time what type the variant is, how can you expect it to choose the "right" overloaded version ? I wou

Re: [fpc-devel] Abs(Variant) unexpected result

2018-02-25 Thread Michael Van Canneyt
On Sun, 25 Feb 2018, Bart wrote: Hi, See: http://forum.lazarus.freepascal.org/index.php/topic,40223.msg277657/ This seems rather unexpected. Not really. The abs() function is overloaded for different types. The compiler does not know at compile time what type the variant is, how can

Re: [fpc-devel] End of support for Win XP?

2018-02-05 Thread Michael Van Canneyt
On Tue, 6 Feb 2018, Denis Kozlov wrote: Improved windirs.GetWindowsSpecialDir is ready: https://bugs.freepascal.org/view.php?id=33133 The submitted patch contains the following changes: 1. Added FOLDERID_* constants, required for SHGetKnownFolderPath. 2. Added mapping of legacy CSIDL_*

Re: [fpc-devel] End of support for Win XP?

2018-02-01 Thread Michael Van Canneyt
On Thu, 1 Feb 2018, Sven Barth via fpc-devel wrote: Am 01.02.2018 14:31 schrieb "Michael Van Canneyt" <mich...@freepascal.org>: On Thu, 1 Feb 2018, Denis Kozlov wrote: A proposal: 1) Use windirs.GetWindowsSpecialDir in fpttf.pp, which already uses a more back

Re: [fpc-devel] End of support for Win XP?

2018-02-01 Thread Michael Van Canneyt
On Thu, 1 Feb 2018, Denis Kozlov wrote: It still feels *very early* to drop support for Windows XP. I haven't used it properly in years, but I can't say the same about the target user audience. I still test some builds against Windows XP. It would be a shame to drop support for Windows XP

Re: [fpc-devel] End of support for Win XP?

2018-02-01 Thread Michael Van Canneyt
On Thu, 1 Feb 2018, Werner Pamler wrote: Am 30.01.2018 um 22:40 schrieb Florian Klämpfl: Am 29.01.2018 um 21:11 schrieb Russell Davies: Hi, Just curious, does the use of SHGetKnownFolderPath() in trunk package winunits-base in fpttf.pp mean the end of Windows XP support as this function

Re: [fpc-devel] Linux errors units

2018-01-18 Thread Michael Van Canneyt
On Thu, 18 Jan 2018, Desmond Coertzen wrote: Hi guys, I'm porting some old code away from libc. I'm looking for the unit that contains the linux error code enums, like EBADFD, EAGAIN, EINTR, etc Which non-libc unit do I use for these? Platform: ppcarm I already have BaseUnix, Linux,

Re: [fpc-devel] FloatHelper bugs (Issue #32837)

2018-01-11 Thread Michael Van Canneyt
On Fri, 12 Jan 2018, Ondrej Pokorny wrote: On 12.01.2018 5:13, Michael Van Canneyt wrote: On Thu, 11 Jan 2018, Bart wrote: Can I get some feedback from a devel please? Patience, please. When we are at this topic: could an FPC developer take a look at https://bugs.freepascal.org

Re: [fpc-devel] FloatHelper bugs (Issue #32837)

2018-01-11 Thread Michael Van Canneyt
On Thu, 11 Jan 2018, Bart wrote: Hi, See: https://bugs.freepascal.org/view.php?id=32837 TFloatHelper gives incorrect results for Mantissa and Exponent, also BuildUp fails. I posted a patch in the bugtracker. Can I get some feedback from a devel please? Patience, please. I have seen the

Re: [fpc-devel] TCollection.FOwner

2017-12-27 Thread Michael Van Canneyt
On Wed, 27 Dec 2017, Juha Manninen wrote: I am proposing to add a private FOwner: TPersistent; to TCollection and remove it from derived classes which already have it. At least TParams has it but it is not used. I don't want to burden TCollection with a field that will rarely be used. The

Re: [fpc-devel] Numeric error in the calculation of Variance

2017-12-24 Thread Michael Van Canneyt
On Sat, 23 Dec 2017, Anton Shepelev wrote: Hello, all May I ask you if there is any chance of fixing the error in the Math unit that I reported here: https://bugs.freepascal.org/view.php?id=32804 and provided a patch? Here is a test case: I have checked and applied the patch. I

Re: [fpc-devel] First pas2js public release

2017-12-22 Thread Michael Van Canneyt
On Thu, 21 Dec 2017, Michael Schnell wrote: On 21.12.2017 08:51, Michael Van Canneyt wrote: I know. But I believe such people are completely on the wrong track. This is, because seemingly for you (and many others), the User Communication is a most important part of the project and needs

Re: [fpc-devel] First pas2js public release

2017-12-22 Thread Michael Van Canneyt
On Thu, 21 Dec 2017, Michael Schnell wrote: On 21.12.2017 08:52, Michael Van Canneyt wrote: because I consider it a misguided approach, Could you elaborate why you think so ? Because it will only work for simple scenarios. As soon as things become moderately complex, this approach fails

Re: [fpc-devel] First pas2js public release

2017-12-21 Thread Michael Van Canneyt
On Thu, 21 Dec 2017, Michael Schnell wrote: On 20.12.2017 11:36, Michael Van Canneyt wrote: (Nothing stops really the server-side-native binary (e.g. written in Pascal) from sending a pas2js transpiled program to the browser as a part of a 'html page'/script, You could do so. But I

Re: [fpc-devel] First pas2js public release

2017-12-20 Thread Michael Van Canneyt
On Wed, 20 Dec 2017, Michael Schnell wrote: On 20.12.2017 11:36, Michael Van Canneyt wrote: You program both separately, this is natural. Obviously ! But this is not necessarily the end of what might be provided by (e.g.) Lazarus. As I wrote in another reply: I will never spend time

Re: [fpc-devel] First pas2js public release

2017-12-20 Thread Michael Van Canneyt
On Wed, 20 Dec 2017, el es wrote: Hi, On 20/12/17 10:36, Michael Van Canneyt wrote: On Tue, 19 Dec 2017, Lukasz Sokol wrote: On 18/12/17 08:59, Michael Schnell wrote: Great ! Thanks a lot to all who  enabled this fantastic enhancement to the fpc system ! I have been dreaming of being

Re: [fpc-devel] First pas2js public release

2017-12-20 Thread Michael Van Canneyt
On Tue, 19 Dec 2017, Lukasz Sokol wrote: On 18/12/17 08:59, Michael Schnell wrote: Great ! Thanks a lot to all who enabled this fantastic enhancement to the fpc system ! I have been dreaming of being able to "simply run" Lazarus projects (and legacy Delphi-) ) in a server and have the GUI

Re: [fpc-devel] First pas2js public release

2017-12-17 Thread Michael Van Canneyt
On Sun, 17 Dec 2017, Benito van der Zander wrote: Hi, Naturally, any memory pointer operation is not possible in Javascript. Code that relies on this will not work. it would be great, if pointers were added. I really don't see the point of that. As Mattias pointed out, pointers to

[fpc-devel] First pas2js public release

2017-12-16 Thread Michael Van Canneyt
Hello fellow Pascal enthousiasts, It is with great pleasure that I can finally announce the first publicly available version of pas2js. A "beta" version, version 0.8.39. The endpoint (for the time being) of nearly 10 years of (slow) development. pas2js is a Object Pascal to Javascript

Re: [fpc-devel] How does one request new features?

2017-12-04 Thread Michael Van Canneyt
On Mon, 4 Dec 2017, J. Gareth Moreton wrote: Hi everyone, I have a little question to ask. If one wishes to request new features for a future version of Free Pascal, how does one go about it and what is the process of determining if it is a good idea or should be dropped, as well as any

Re: [fpc-devel] Multiple type sections - Far forward type declarations [feasible feature request?]

2017-10-31 Thread Michael Van Canneyt
On Tue, 31 Oct 2017, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: With your extended "forward type resolution" this would no longer be possible. Theoretically it probably can, but multiple passes would be needed. This would aversely affect the comp

Re: [fpc-devel] Multiple type sections - Far forward type declarations [feasible feature request?]

2017-10-31 Thread Michael Van Canneyt
On Mon, 30 Oct 2017, Sandro Cumerlato wrote: Hello, please take a look at this small example: -- program types; type PMyTypeA = ^MyTypeA; PMyTypeB = ^MyTypeB; type MyTypeA = record foo: integer; bar: integer; end; type MyTypeB =

Re: [fpc-devel] const param documentation

2017-10-11 Thread Michael Van Canneyt
On Wed, 11 Oct 2017, Martin wrote: https://www.freepascal.org/docs-html/current/ref/refsu67.html#x179-20100014.4.4 Just came to notice something But first: I had been under the impression, that if you - define a param as const - pass a global variable - violate the contract, by

Re: [fpc-devel] comments in ipc.pp

2017-10-09 Thread Michael Van Canneyt
On Thu, 5 Oct 2017, Markus Beth wrote: Some comments in packages/rtl-extra/src/unix/ipc.pp seem to be wrong/misplaced. I propose the attached patch to fix it. Applied; rev. 37431. Thanks for the patch! Michael. ___ fpc-devel maillist -

Re: [fpc-devel] TSQLScript doesn't execute last statement not terminated by '; ' (FTerminator)

2017-09-20 Thread Michael Van Canneyt
On Sat, 16 Sep 2017, Ondrej Pokorny wrote: Hello, if I run this script with TSQLScript: INSERT INTO A (ID) VALUES (1); INSERT INTO A (ID) VALUES (2) Only the first insert is executed. Not the second one - it's ignored because it lacks the terminating ';'. Furthermore, no exception is

Re: [fpc-devel] /trunk/packages/libfontconfig/src/libfontconfig.pp

2017-09-11 Thread Michael Van Canneyt
On Mon, 11 Sep 2017, Sandro Cumerlato wrote: Hello, in file /trunk/packages/libfontconfig/src/libfontconfig.pp I found the following code: - Const {$ifdef darwin} DefaultLibName = 'libfontconfig.so'; {$else} DefaultLibName =

Re: [fpc-devel] Oracle CLOB and UTF8

2017-09-06 Thread Michael Van Canneyt
On Wed, 6 Sep 2017, Dave Connolly wrote: Hi all, I've got a database with a CLOB column containing "abcdefgáéíóúøå" I'm using the TOracleConnection to select this data and it comes back corrupted "abcdefgáéí???" This only happens when using a CLOB. If I put the same data in a VARCHAR2 or

Re: [fpc-devel] [Lazarus] Free Pascal 3.0.4-rc1 released!

2017-09-03 Thread Michael Van Canneyt
On Sun, 3 Sep 2017, Mattias Gaertner wrote: Hi, Are there already plans for the final 3.0.4 release? Yes. Marco was going to do the final tagging this weekend. I think there was 1 problem to be fixed/merged still, I don't think we'll do a rc2. So it looks like FPC 3.0.4 is imminent.

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-09-01 Thread Michael Van Canneyt
On Fri, 1 Sep 2017, Sven Barth via fpc-devel wrote: Am 01.09.2017 12:15 schrieb "Maciej Izak" : 2017-09-01 11:41 GMT+02:00 Stefan Glienke : {$EXPLICITHELPERS TH1, default for string} s.foo; // TH1.foo s.foo1; s.foo2; s.foo3; end. No,

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Michael Van Canneyt
On Tue, 29 Aug 2017, Maciej Izak wrote: 2017-08-29 17:51 GMT+02:00 Ondrej Pokorny : On 29.08.2017 17:47, Anthony Walter wrote: Out of curiosity, is there any strategy that is or can be employed to ensure new language features and mode switches automatically work with

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Michael Van Canneyt
On Tue, 29 Aug 2017, Sven Barth via fpc-devel wrote: Am 28.08.2017 23:11 schrieb "Ondrej Pokorny" : Hello! I find it unnecessary to disable record helper inheritance in Delphi mode. Due to this artificial limitation I have to change unit mode from Delphi to ObjFPC.

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-28 Thread Michael Van Canneyt
On Mon, 28 Aug 2017, Ondrej Pokorny wrote: Hello! I find it unnecessary to disable record helper inheritance in Delphi mode. Due to this  artificial limitation I have to change unit mode from Delphi to ObjFPC. Reasons: 1.) It's a limitation of a feature that FPC already has. 2.) I write

Re: [fpc-devel] Optimizing unused return values of inline functions

2017-08-22 Thread Michael Van Canneyt
On Tue, 22 Aug 2017, Kazantsev Alexey via fpc-devel wrote: On Tue, 22 Aug 2017 13:15:24 +0200 (CEST) Michael Van Canneyt <mich...@freepascal.org> wrote: Call me old-fashioned, but I much prefer With StdIO::stdOutPrinter() do begin out("Helllo World "); o

Re: [fpc-devel] Optimizing unused return values of inline functions

2017-08-22 Thread Michael Van Canneyt
On Tue, 22 Aug 2017, Thaddy de Koning wrote: On 21.08.2017 13:22, Michael Van Canneyt wrote: On Mon, 21 Aug 2017, Benito van der Zander wrote: Hi, This pattern is not inherently efficient. Why should it be ? It is not efficient, because of the pointless instruction! I am

Re: [fpc-devel] Optimizing unused return values of inline functions

2017-08-21 Thread Michael Van Canneyt
On Mon, 21 Aug 2017, Benito van der Zander wrote: Hi, This pattern is not inherently efficient. Why should it be ? It is not efficient, because of the pointless instruction! I am not speaking of the current FPC implementation. It may well be that the code is not most optimal. I am

Re: [fpc-devel] Optimizing unused return values of inline functions

2017-08-21 Thread Michael Van Canneyt
On Sun, 20 Aug 2017, Benito van der Zander wrote: Hi, why does fpc not remove the calculation of the return value of inline functions, when the return value is unused? For example type TUtility = class function doSomething: TUtility; inline; end; It is a popular pattern to add result

Re: [fpc-devel] Avoid exception if FPHTTPClient cannot connect to server?

2017-07-31 Thread Michael Van Canneyt
On Mon, 31 Jul 2017, Werner Pamler wrote: Agreed. This is the same situation as with string-to-number conversion: StrToFloat fires an exception if the string is not a valid float, but there's also a "TryStrToFloat" which by-passes the exception and just returns a false in case of an error.

Re: [fpc-devel] Avoid exception if FPHTTPClient cannot connect to server?

2017-07-31 Thread Michael Van Canneyt
On Mon, 31 Jul 2017, Werner Pamler wrote: Here is a little demo program which uses fphttpclient to download some file from some server. If the URL exists everything is fine (note on Windows, that the OpenSSL dlls must be copied to the exe directory for the demo to work). If the URL does

Re: [fpc-devel] HTML string to TFPColor

2017-07-23 Thread Michael Van Canneyt
On Sun, 23 Jul 2017, Werner Pamler wrote: Am 23.07.2017 um 18:09 schrieb Michael Van Canneyt: This exists: function ResolveHTMLEntityReference(const Name: WideString; var Entity: WideChar): Boolean; is in unit htmldefs, fcl-xml package. Thank you. Seeking more carefully would have

Re: [fpc-devel] HTML string to TFPColor

2017-07-23 Thread Michael Van Canneyt
On Sun, 23 Jul 2017, Werner Pamler wrote: Another, related topic would be: Replacement of HTML entities, e.g. convert a string such as 'cmsup2/sup' to 'cm2', or 'sin + cos ' to the one with the correct greek symbols (utf8). I have a solution in TAChart, unit TAHtml, but maybe

Re: [fpc-devel] HTML string to TFPColor

2017-07-23 Thread Michael Van Canneyt
On Sun, 23 Jul 2017, Bart wrote: On 7/23/17, ListMember wrote: How about this. To me it is more readable. type THtmlColorName = ( *hcnUnknown*, hcnWhite, hcnSilver, hcnGray, hcnBlack, I dismissed that idea, becuase now you would have to have an entry in

Re: [fpc-devel] HTML string to TFPColor

2017-07-23 Thread Michael Van Canneyt
On Sun, 23 Jul 2017, Bart wrote: On 7/23/17, Michael Van Canneyt <mich...@freepascal.org> wrote: Can you refactor the huge case to use a local proc? it hurts my eyes... Yes I can. But obviously it will keep hurting your eyes, but just in a different place in the sourcecode? I

Re: [fpc-devel] HTML string to TFPColor

2017-07-23 Thread Michael Van Canneyt
Hi, Can you refactor the huge case to use a local proc? it hurts my eyes... Michael. On Sun, 23 Jul 2017, Bart wrote: On 7/23/17, Bart wrote: My try ... Forget previous post... This should make more sense. resourcestring SInvalidHtmlColor = '"%s" is not a

Re: [fpc-devel] HTML string to TFPColor

2017-07-23 Thread Michael Van Canneyt
On Sun, 23 Jul 2017, Ondrej Pokorny wrote: Hello! I couldn't find a function that converts a #RRGGBB color to TFPColor in FPC sources. I only found HTMLToFPColor in Lazarus /trunk/components/tachart/tahtml.pas IMO it is a fairly general function and should be in FPC sources. What do you

[fpc-devel] TStringStream changes

2017-07-21 Thread Michael Van Canneyt
Hello, TStringStream now observes encoding, following the fix for: https://bugs.freepascal.org/view.php?id=30508 Basically, this is a Delphi compatibility fix. This may impact some programs which use encodings that deviate from the default system encoding. In that case, the solution is to

Re: [fpc-devel] Dangerous optimization in CASE..OF

2017-07-16 Thread Michael Van Canneyt
On Sun, 16 Jul 2017, Ondrej Pokorny wrote: On 15.07.2017 21:39, Jonas Maebe wrote: On 15/07/17 21:33, laza...@kluug.net wrote: Am Sa., Jul. 15, 2017 21:07 schrieb Jonas Maebe : I have said from the start that it is possible to store invalid values in variables

Re: [fpc-devel] Dangerous optimization in CASE..OF

2017-07-03 Thread Michael Van Canneyt
On Sun, 2 Jul 2017, Tomas Hajny wrote: By using file of enum (or any data type), you are explicitly telling the compiler it is OK. There isn't much difference between telling the compiler that all values in certain file are of certain type and telling the compiler that the next value read

Re: [fpc-devel] Dangerous optimization in CASE..OF

2017-07-02 Thread Michael Van Canneyt
On Sun, 2 Jul 2017, Tomas Hajny wrote: By declaring it as a File of Enum, you are telling the compiler that it contains only valid enums. Noone can ever ensure, that a file doesn't get corrupted / tampered with on a storage medium. No-one can ensure a memory location cannot get corrupted

Re: [fpc-devel] Dangerous optimization in CASE..OF

2017-07-02 Thread Michael Van Canneyt
On Sun, 2 Jul 2017, Tomas Hajny wrote: On Sun, July 2, 2017 16:48, Marco van de Voort wrote: In our previous episode, Martok said: It is really hard to write code that interacts with the outside world without having a validation problem. Then you arguing wrong. Then you don't need

Re: [fpc-devel] Dangerous optimization in CASE..OF

2017-07-02 Thread Michael Van Canneyt
On Sun, 2 Jul 2017, Martok wrote: Hi all, The only way to get data with an invalid value in an enum in Pascal is by using an unchecked (aka explicit) typecast, by executing code without range checking (assigning an enum from a larger parent enum type into a smaller sub-enum type), or by

Re: [fpc-devel] Dangerous optimization in CASE..OF

2017-07-02 Thread Michael Van Canneyt
On Sun, 2 Jul 2017, Florian Klämpfl wrote: So, we have a problem here: either the type system is broken because we can put stuff in a type without being able to check if it actually belongs there, or Tcgcasenode is broken because it (and _only_ it, as far as I can see) wants to be clever by

Re: [fpc-devel] Last call for 3.0.4 merges

2017-06-21 Thread Michael Van Canneyt
On Wed, 21 Jun 2017, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: > In our previous episode, Michael Van Canneyt said: >> >> already merged. Only active ones matter. >> >> Reviewed some more lists: > > It was last call

Re: [fpc-devel] Last call for 3.0.4 merges

2017-06-21 Thread Michael Van Canneyt
On Wed, 21 Jun 2017, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: >> already merged. Only active ones matter. Reviewed some more lists: It was last call for emergency revs the day before release branching, not everything you could find :-) No p

Re: [fpc-devel] Last call for 3.0.4 merges

2017-06-21 Thread Michael Van Canneyt
On Sun, 18 Jun 2017, Michael Van Canneyt wrote: On Sun, 18 Jun 2017, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: > Some quick checks (greps for the searchterm in commitlog+ filenames) The 'merge sets' are followed by a pair of numbers. W

Re: [fpc-devel] Last call for 3.0.4 merges

2017-06-21 Thread Michael Van Canneyt
On Sun, 18 Jun 2017, Michael Van Canneyt wrote: On Sun, 18 Jun 2017, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: > Some quick checks (greps for the searchterm in commitlog+ filenames) The 'merge sets' are followed by a pair of numbers. W

Re: [fpc-devel] Last call for 3.0.4 merges

2017-06-18 Thread Michael Van Canneyt
On Sun, 18 Jun 2017, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: > time, waiting for the win32/64 findfirst fix. This is now fixed, rev. 36510. I will still check the svn log of rtl/packages for any fixes that may be merged. Unless you have somewhere an

Re: [fpc-devel] Last call for 3.0.4 merges

2017-06-18 Thread Michael Van Canneyt
On Sat, 17 Jun 2017, Marco van de Voort wrote: While I have not done much the last month, I did keep up with most of the merging so most requests have been honoured, and I plan to branch mid next week or even monday if there is not much response. If I missed some, or there are important new

Re: [fpc-devel] Last call for 3.0.4 merges

2017-06-18 Thread Michael Van Canneyt
On Sat, 17 Jun 2017, Marco van de Voort wrote: While I have not done much the last month, I did keep up with most of the merging so most requests have been honoured, and I plan to branch mid next week or even monday if there is not much response. If I missed some, or there are important new

Re: [fpc-devel] CUPS support for FPC libs

2017-06-04 Thread Michael Van Canneyt
On Sun, 4 Jun 2017, Juha Manninen wrote: Regarding issue: https://bugs.freepascal.org/view.php?id=31245 Could cupsdyn.pp be moved to FPC packages? Probably, yes. In Lazarus printer4lazarus package it is wrongly tied to widgetset instead of OS. It prevents using CUPS with QT widgetset for

Re: [fpc-devel] Mantis/Bugtracker registrations fixed

2017-06-03 Thread Michael Van Canneyt
On Thu, 1 Jun 2017, Martin wrote: On 31/05/2017 15:50, Karoly Balogh (Charlie/SGR) wrote: Hi, We had numerous reports over the past few weeks, that the FPC/Lazarus Bugtracker registration verification was broken. Thanks to the work of Michael van Canneyt, it should be fixed now. If you had

Re: [fpc-devel] UTF-8 string literals

2017-05-11 Thread Michael Van Canneyt
On Wed, 10 May 2017, Martok wrote: But apparently everything is rainbows and unicorns and there is absolutely no problem with the documentation at all, so I guess this week-long discussion here never happened anyway. This is not quite correct. I have proposed to add a table to the official

Re: [fpc-devel] UTF-8 string literals

2017-05-07 Thread Michael Van Canneyt
On Sun, 7 May 2017, Mattias Gaertner wrote: On Sun, 7 May 2017 10:27:58 +0200 Florian Klaempfl wrote: [...] 2. What would happen then the other way around? When casting the string constant to a PUnicodeChar (what probably a lot of delphi code does)? Good point.

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Michael Van Canneyt
On Fri, 5 May 2017, Sven Barth via fpc-devel wrote: Am 05.05.2017 15:55 schrieb "Michael Van Canneyt" <mich...@freepascal.org>: On Fri, 5 May 2017, Mattias Gaertner wrote: On Fri, 5 May 2017 14:30:32 +0200 (CEST) Michael Van Canneyt <mich...@freepascal.org> wro

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Michael Van Canneyt
On Fri, 5 May 2017, Mattias Gaertner wrote: On Fri, 5 May 2017 15:55:32 +0200 (CEST) Michael Van Canneyt <mich...@freepascal.org> wrote: On Fri, 5 May 2017, Mattias Gaertner wrote: > On Fri, 5 May 2017 14:30:32 +0200 (CEST) > Michael Van Canneyt <mich...@freepa

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Michael Van Canneyt
On Fri, 5 May 2017, Juha Manninen wrote: On Fri, May 5, 2017 at 2:53 PM, Mattias Gaertner wrote: 1. When using a character outside BMP FPC stops with: Error: UTF-8 code greater than 65535 found For example: const Eyes = ''; I copy a related post from Lazarus

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Michael Van Canneyt
On Fri, 5 May 2017, Mattias Gaertner wrote: On Fri, 5 May 2017 14:30:32 +0200 (CEST) Michael Van Canneyt <mich...@freepascal.org> wrote: [...] > AFAIK FPC stores UTF-8 string literals (-Fcutf8) as widestrings > instead of UTF8String. Please correct me if I'm wrong. To

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Michael Van Canneyt
On Fri, 5 May 2017, Mattias Gaertner wrote: Hi, AFAIK FPC stores UTF-8 string literals (-Fcutf8) as widestrings instead of UTF8String. Please correct me if I'm wrong. This has several side effects: 1. When using a character outside BMP FPC stops with: Error: UTF-8 code greater than 65535

Re: [fpc-devel] Console encoding on Windows, output to file with ">"

2017-05-03 Thread Michael Van Canneyt
On Wed, 3 May 2017, Ondrej Pokorny wrote: Michael, because I cannot comment on a closed issue report I post my answer to https://bugs.freepascal.org/view.php?id=31746#c100091 here: > I don't think what you write is correct. As far as I can see in the code of Delphi Berlin: Delphi uses

Re: [fpc-devel] Let's Encrypt cert and mantis.freepascal.org

2017-05-03 Thread Michael Van Canneyt
On Wed, 3 May 2017, Ondrej Pokorny wrote: On 02.05.2017 19:20, Michael Van Canneyt wrote: Changed the bugtraq:url. Revision 36062. Off-topic: I now switched from mantis.freepascal.org to bugs.freepascal.org and had to block the running cheetah icon again. Remember the good webpage

Re: [fpc-devel] Let's Encrypt cert and mantis.freepascal.org

2017-05-03 Thread Michael Van Canneyt
On Wed, 3 May 2017, Tomas Hajny wrote: On Wed, May 3, 2017 00:33, Michael Van Canneyt wrote: On Tue, 2 May 2017, Martin wrote: On 02/05/2017 22:59, Michael Van Canneyt wrote: That's probably good as the fastest / short-term solution, but as long as both DNS records are valid and point

Re: [fpc-devel] Let's Encrypt cert and mantis.freepascal.org

2017-05-02 Thread Michael Van Canneyt
On Tue, 2 May 2017, Martin wrote: On 02/05/2017 22:59, Michael Van Canneyt wrote: That's probably good as the fastest / short-term solution, but as long as both DNS records are valid and point to the same IP address (and http access to both is redirected to the https version

Re: [fpc-devel] Let's Encrypt cert and mantis.freepascal.org

2017-05-02 Thread Michael Van Canneyt
On Tue, 2 May 2017, Tomas Hajny wrote: On Tue, May 2, 2017 19:20, Michael Van Canneyt wrote: On Tue, 2 May 2017, Dimitrios Chr. Ioannidis via fpc-devel wrote: Hi Michael, is it possible to add the domain mantis.freepascal.org in the let's encrypt cert or change the subversion

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