Re: [fpc-pascal] Improvement to TFPHTTPClient Class

2016-07-20 Thread African Wild Dog
2016-07-20 3:45 Michael Van Canneyt : Because all Pascal TCP toolkits out there offer a HTTP Client. (lnet, indy, > synapse). By doing this, I leave the choice up to the user which one to use > for various APIs that are built ON TOP of HTTP. > > Your use case is simply one

[fpc-pascal] Improvement to TFPHTTPClient Class

2016-07-19 Thread African Wild Dog
Hello, The current version of the TFPHTTPClient (the one shipped with fpc 3.0) is coupled to the fpc's sockets framework (fcl-net) so we can't utilize other tcp connection framework (e.g Synapse) to perform HTTP requests using TFPHTTPClient. I have made an improvement to the TFPHTTPClient class

Re: [fpc-pascal] Improvement to TFPHTTPClient Class

2016-07-19 Thread African Wild Dog
2016-07-19 4:52 GMT-03:00 Michael Van Canneyt : > > 1. The whole point of TFPHTTPClient is exactly to couple it to sockets >framework (fcl-net). >If you want to use synapse, use httpsend. lnet has a similar component >for the http protocol. > > I dont want to

[fpc-pascal] Free Pascal Foundation Roles and Goals

2016-08-18 Thread African Wild Dog
Hello, >From what i understand, the primary goal of the FPC Foundation is to raise funds to support the FPC and Lazarus development. In the future, the foundation will play another roles like e.g., coordinate and manage FPC and Lazarus projects? Best regards

[fpc-pascal] LLVM Backend Support

2016-08-18 Thread African Wild Dog
Hello, What is the current status of the LLVM backend support? Best regards ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] FPC 3.0.2 Release Date

2016-08-18 Thread African Wild Dog
Hello, There are some critical bugs in fpc 3.0 which are already fixed. So, why the 3.0.2 version was not released yet? Do you have any estimate about when it will be released? Best regards ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] LLVM Backend Support

2016-08-31 Thread African Wild Dog
Em quarta-feira, 31 de agosto de 2016, Jonas Maebe < jonas.ma...@elis.ugent.be> escreveu: > On 31/08/16 05:11, African Wild Dog wrote: >> > The code optimizers, yes. The rest, not so much. > >> Will the FPC team, somewhere in the future, adopt the LLVM as the

Re: [fpc-pascal] LLVM Backend Support

2016-08-30 Thread African Wild Dog
2016-08-19 4:55 GMT-03:00 Jonas Maebe <jonas.ma...@elis.ugent.be>: > African Wild Dog wrote: > > > What is the current status of the LLVM backend support? > > "make cycle" works on my machine for Darwin/x86-64, and most test suite > failures

[fpc-pascal] New Feature: "Management Operators"

2016-11-07 Thread African Wild Dog
Hello, I saw on the bug tracker a patch submission by Maciej Izak about the feature "Management Operators". This feature is related to Automatic Reference Counting? Regards ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Generics and Scopes

2016-11-09 Thread African Wild Dog
2016-11-07 14:15 GMT-02:00 Sven Barth <pascaldra...@googlemail.com>: > Am 07.11.2016 15:58 schrieb "African Wild Dog" <paintedlyc...@gmail.com>: > > It is intended to change such compiler behavior in the future? It is > incompatible with Delphi

Re: [fpc-pascal] Generics and Scopes

2016-11-09 Thread African Wild Dog
2016-11-10 1:30 GMT-02:00 African Wild Dog <paintedlyc...@gmail.com>: > 2016-11-07 14:15 GMT-02:00 Sven Barth <pascaldra...@googlemail.com>: > >> Am 07.11.2016 15:58 schrieb "African Wild Dog" <paintedlyc...@gmail.com>: >> > It is intend

[fpc-pascal] Variants - Auto-convert nulls

2016-11-07 Thread African Wild Dog
Hello, I need the variant type converting automatically null values to the default value of the target type (e.g False for Booleans, 0 for Integers/Floats). I know that i can achieve this by setting the variable NullStrictConvert (unit Variants) to False. However, this is a global setting and

[fpc-pascal] Generics and Scopes

2016-11-07 Thread African Wild Dog
Hello, I have tried to compile some delphi projects using the latest FPC (3.0.0) release, and i got several errors related to Ggenerics feature. Reading the FPC documentation (section 8.8 - A Word About Scope) i have found that FPC requires that all external types and procedures used in the the

Re: [fpc-pascal] FPC 3.0.2 Release Date

2016-11-07 Thread African Wild Dog
2016-08-19 4:22 GMT-03:00 Jonas Maebe <jonas.ma...@elis.ugent.be>: > African Wild Dog wrote: > > > There are some critical bugs in fpc 3.0 which are already fixed. So, why > > the 3.0.2 version was not released yet? Do you have any estimate about > > when it

[fpc-pascal] Questions About Constructors

2017-03-30 Thread African Wild Dog
Hello, 1 - What happens if my constructor raise an exception? Is my destructor automatically called? 2 - Are the class fields automatically initialized to Default(T) just like in Delphi? Regards ___ fpc-pascal maillist -

Re: [fpc-pascal] Delphi RTTI vs Free Pascal RTTI

2017-03-30 Thread African Wild Dog
2017-03-25 5:40 GMT-03:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > Am 24.03.2017 19:55 schrieb "Michael Van Canneyt" <mich...@freepascal.org > >: > > > > > > > > On Fri, 24 Mar 2017, African Wild Dog wrote: > >

[fpc-pascal] Critical Section and Recursive Calls

2017-03-30 Thread African Wild Dog
Hello, I'm writing a function protected by a critical section which can have recursive calls under certain conditions. Using the TCriticalSection class, after my thread acquires a critical section, if my thread make 6 additional calls to TCriticalSection.Enter, to release the critical section my

Re: [fpc-pascal] Questions About Constructors

2017-03-31 Thread African Wild Dog
2017-03-30 4:25 GMT-03:00 Michael Van Canneyt <mich...@freepascal.org>: > > > On Thu, 30 Mar 2017, African Wild Dog wrote: > > Hello, >> >> 1 - What happens if my constructor raise an exception? Is my destructor >> automatically called? >> > >

[fpc-pascal] String Constants and Source File Code Page (Cross-platform)

2017-03-31 Thread African Wild Dog
Hello, What is the recomended way to deal with string constants in units which are shared in cross-platforms projects? For example, i started a project in Linux, where the source code files are saved in UTF-8. If i use theses files in Windows, the constants aren't automatically converted to the

[fpc-pascal] Delphi RTTI vs Free Pascal RTTI

2017-03-24 Thread African Wild Dog
Hello, I need to write a code compatilble with both free pascal and delphi using the old style RTTI. What are the diferences between delphi's and free pascal's approach/types? I took a look at delphi's and fpc's TypInfo unit and it looks like the types/functions are compatible. Regards

[fpc-pascal] Interface Inheritance Bug

2017-03-18 Thread African Wild Dog
Hello, Test env: debian jessie amd64 - fpc 3.0.2 It seems free pascal have a bug when handling interface inheritance using generics. When i try to compile the unit bellow, i get this error: "interface_bug.pas(41,44) Error: Incompatible types: got "TImplementor" expected "IParentInterface""

Re: [fpc-pascal] Interface Inheritance Bug

2017-03-19 Thread African Wild Dog
2017-03-19 5:25 GMT-03:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > I think this will happen with non-generic interfaces as well. So please > test with those and if possible also with 3.1.1 and report a bug if > necessary (preferable with a non-generic example, makes things

Re: [fpc-pascal] Interface Inheritance Bug

2017-03-19 Thread African Wild Dog
2017-03-19 15:20 GMT-03:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > But without the cast you get the same error, yes? > > Regards, > Sven > > Yes, i need to cast. Regards ___ fpc-pascal maillist -

Re: [fpc-pascal] Interface Inheritance Bug

2017-03-19 Thread African Wild Dog
2017-03-19 5:25 GMT-03:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > Am 19.03.2017 05:07 schrieb "African Wild Dog" <paintedlyc...@gmail.com>: > > > > Hello, > > > > Test env: debian jessie amd64 - fpc 3.0.2 > > >

Re: [fpc-pascal] Generics Bug

2017-03-19 Thread African Wild Dog
2017-03-18 19:29 GMT-03:00 African Wild Dog <paintedlyc...@gmail.com>: > 2017-03-18 18:41 GMT-03:00 Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org>: > > Nested specializations are currently not supported though they *might* >> work with 3.1.1. &g

Re: [fpc-pascal] Thread Variables Initial Values

2017-03-17 Thread African Wild Dog
2017-03-17 13:09 GMT-03:00 Michael Van Canneyt : > > Nil. > > What exactly is not clear about the documentation ? > The documentation says ".. Note that the copy is made with the original value of the variable ..". But, whats is the original value? I think the

[fpc-pascal] Hash List

2017-03-17 Thread African Wild Dog
Hello, Ia there any hash list implementation in free Pascal? Ghashmap has no documentation. Is it stable for production use? Regards ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Threadvar member field

2017-03-17 Thread African Wild Dog
2017-03-17 5:50 GMT-03:00 Michael Schnell <mschn...@lumino.de>: > On 16.03.2017 19:38, African Wild Dog wrote: > >> I have a class where its instances are shared between multiple threads. >> How can I declare one variable per instance per thread? >> > Does this

Re: [fpc-pascal] Hash List

2017-03-17 Thread African Wild Dog
Thanks for your reply Giuliano, Silvio. To be more specific, i need a generic hash map similar to the Delphi's TDictionary. It seems THashmap from the ghashmap unit is the most close to TDictionary. Regards ___ fpc-pascal maillist -

[fpc-pascal] Forward Generic Type Declaration Bug

2017-03-18 Thread African Wild Dog
Hello, Please confirm if this is a bug. When I try to compile the unit below I get the error: "generics_bug.pas(14,43) Fatal: Internal error 2012101001" It seems the compiler has bug when handling forward generics declaration. Tested on: Debian Jessie amd64 - fpc 3.0.2 === CODE === *unit*

Re: [fpc-pascal] Generics Bug

2017-03-18 Thread African Wild Dog
2017-03-18 18:41 GMT-03:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: Nested specializations are currently not supported though they *might* work > with 3.1.1. > I will do test some tests with 3.1.1. Thanks. Regards ___ fpc-pascal

[fpc-pascal] Generics Bug

2017-03-18 Thread African Wild Dog
Hello, Please confirm this bug. The unit code bellow won't compile (fpc 3.0.2 - debian jessie amd64): "generics_bug.pas(17,48) Fatal: Syntax error, "," expected but "<" found" === CODE === *unit* generics_bug; {$mode delphi} *interface* *type* TPair = *record* Key:

Re: [fpc-pascal] Forward Generic Type Declaration Bug

2017-03-18 Thread African Wild Dog
2017-03-18 18:40 GMT-03:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > Forward declarations for generic types are not supported. > > Are there plans for add suport for this in fpc 3.2? ___ fpc-pascal maillist -

[fpc-pascal] Thread Variables Initial Values

2017-03-17 Thread African Wild Dog
Hello, The documentation is not clear about the initial values of thread variables: *"If threads are used then a copy is made for each thread (including the main thread). Note that the copy is made with the original value of the variable, not with the value of the variable at the time the

[fpc-pascal] Threadvar member field

2017-03-16 Thread African Wild Dog
I have a class where its instances are shared between multiple threads. How can I declare one variable per instance per thread? The code below does not compile (fpc 3.0.0): TMyClass = class public threadvar MyValue: Integer; end; Regards ___

Re: [fpc-pascal] String Constants and Source File Code Page (Cross-platform)

2017-03-31 Thread African Wild Dog
2017-03-31 15:43 GMT-03:00 Jonas Maebe : > > http://wiki.freepascal.org/FPC_Unicode_support#Source_file_codepage > http://wiki.freepascal.org/FPC_Unicode_support#String_constants > > Thank you! Regards ___ fpc-pascal maillist -

[fpc-pascal] Platform Dependent Integer Types

2017-04-06 Thread African Wild Dog
Which integer types have their size dependent on platform? E.g. in Delphi, LongInt can 32 or 64 bits depending on the platform. The documentation says "every platform has a ”native” integer size, depending on whether the platform is 8-bit, 16-bit, 32-bit or 64-bit. e.g. On AVR this is 8-bit. ",

Re: [fpc-pascal] Hash List

2017-04-13 Thread African Wild Dog
2017-04-12 10:57 GMT-03:00 Michael Van Canneyt : we could put it in contnrs, and alias it in inifiles.pp > > +1 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Platform Dependent Integer Types

2017-04-07 Thread African Wild Dog
2017-04-07 12:10 GMT-03:00 Michael Van Canneyt : > > NativeInt and NativeUInt are indeed provided for Delphi compatibility. > > Which integer type to chose : That depends. What do you want to achieve > exactly ? > > In Delphi, if i want an integer type which depends on the

Re: [fpc-pascal] Platform Dependent Integer Types

2017-04-07 Thread African Wild Dog
2017-04-07 12:33 GMT-03:00 Michael Van Canneyt <mich...@freepascal.org>: > > > On Fri, 7 Apr 2017, African Wild Dog wrote: > > 2017-04-07 12:10 GMT-03:00 Michael Van Canneyt <mich...@freepascal.org>: >> >> >>> NativeInt and NativeUInt are indeed

Re: [fpc-pascal] Platform Dependent Integer Types

2017-04-07 Thread African Wild Dog
2017-04-07 11:15 GMT-03:00 Marco van de Voort <mar...@stack.nl>: > In our previous episode, African Wild Dog said: > > Which integer types have their size dependent on platform? > > E.g. in Delphi, LongInt can 32 or 64 bits depending on the platform. > > In Delphi

Re: [fpc-pascal] Platform Dependent Integer Types

2017-04-07 Thread African Wild Dog
2017-04-06 18:50 GMT-03:00 Mattias Gaertner : > Why do you think that Delphi's longint has 64bits anywhere? > Delphi's NativeInt is 32 or 64bit depending on platform. > >

[fpc-pascal] TInterfacedObject destructor reentrance bug

2017-07-15 Thread African Wild Dog
Hello, I have found a bug in the TInterfacedObject. Better than explaining is to examine and execute the code below. When executing the code below the destructor of the class TCustomDestructorClass is called infinitely. This is due to calling the procedure Foo inside the destructor of

Re: [fpc-pascal] TInterfacedObject destructor reentrance bug

2017-07-19 Thread African Wild Dog
2017-07-16 6:03 GMT-03:00 Michael Van Canneyt : > > > Please report it in the bugtracker, so it won't be forgotten. > > Michael. > Done. #0032168 . Regards ___ fpc-pascal maillist

Re: [fpc-pascal] Mutual Reference Interfaces and Memory Leaks

2017-06-27 Thread African Wild Dog
2017-06-26 12:45 GMT-03:00 Marcos Douglas B. Santos : > > Hi, > > I wrote an article about it https://goo.gl/Lij4hu > But you need to translate from Portuguese to English. > > Best regards, > Marcos Douglas > There are some parts of your article which are in English and you

[fpc-pascal] Mutual Reference Interfaces and Memory Leaks

2017-06-26 Thread African Wild Dog
Hello, What is the recommended way to avoid memory leaks in mutual interface references? >From delphi 10.1 Berlin it is possible to use [unsafe] e [weak] attributes. http://blog.marcocantu.com/blog/2016-april-weak-unsafe-interface-references.html . Is there a workaround in Free Pascal 3?

Re: [fpc-pascal] FCL-WEB and PostgreSQL Support: Current Status

2017-09-27 Thread African Wild Dog
2017-09-27 12:29 GMT-03:00 Michael Van Canneyt : > > 2 - Are they recommended for use in production environments? >> > > Absolutely. I use them in very high-load (and we're talking VERY high load) > environments, with 24/7 availability. > > Could you tell which web server

[fpc-pascal] FCL-WEB and PostgreSQL Support: Current Status

2017-09-27 Thread African Wild Dog
Hello, I am about to start a new project for a very small web application. I have some questions: 1 - Are the fcl-web and postgres packages stable? 2 - Are they recommended for use in production environments? 3 - Do they have any serious bug (for example, memory leaks)? Regards

Re: [fpc-pascal] WinHTTP.h Translation

2017-11-10 Thread African Wild Dog
2017-11-10 4:48 GMT-02:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > > Yes, unit WinHTTP in packages/winunits-base. > > This unit is missing in Lazarus setup. Thanks for the feedback. Regards ___ fpc-pascal maillist -

[fpc-pascal] Memory Leak's in XMLRead unit

2017-11-07 Thread African Wild Dog
Hello, Using ReadXMLFile function from XMLRead unit generates memory leaks when trying to read a invalid XML content. CODE program xml_leak_test; uses heaptrc, Classes, DOM, XMLRead; var XMLDocument: TXMLDocument; InvalidStream: TStringStream; const INVALID_XML_CONTENT

[fpc-pascal] WinHTTP.h Translation

2017-11-09 Thread African Wild Dog
Hello, Does Free Pascal has any header translations for WinHTTP.h ? Ragards ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Memory Leak's in XMLRead unit

2017-11-08 Thread African Wild Dog
2017-11-07 23:57 GMT-02:00 Michael Van Canneyt : > > The "memory leak" is the exception object: you are not catching the > exception. > > Change your program to the below, and you'll see that it is not leaking > memory in the XML routines itself. > > Michael. > In fact,

[fpc-pascal] fcl-web (WebLaz) - Duplicate Module Error

2017-12-10 Thread African Wild Dog
Hello, Please confirm if this is a bug: I have created a HTTP Server Application project and added a module called "test_module" with an action "test_action". When i run my application, when i access "http://localhost:8080/test_ module/test_action" for the first time it works, but in the

[fpc-pascal] FCL-WEB HELP

2018-02-22 Thread African Wild Dog
Hello, After trying unsuccessfully, I decided to ask for help. I have a webmodule with five actions. The five actions share the same page layout (including globals css and js files). Each action can add action's specific css's and js's files and each action defines a specific content. How to

Re: [fpc-pascal] fcl-web - html web modules

2018-02-23 Thread African Wild Dog
2018-02-23 19:36 GMT-03:00 Michael Van Canneyt : > > What is not clear ? There are several samples available that show their > use ? > > Also the WIKI has some pages about it > http://wiki.freepascal.org/fcl-web > > There are some articles >

[fpc-pascal] fcl-web - html web modules

2018-02-23 Thread African Wild Dog
Hello, How to use action and sessions with HTML Web Modules? It seems fcl-web is an incomplete work. How can i help? Is there any list of incomplete implementations/to-do works? Regards ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] [FCL-WEB] Multiple Modules - On Session

2018-03-19 Thread African Wild Dog
Hello, I am trying to implement authentication in my application using the provided IniWebSession unit. I have created a separate module to handle authentication. So, i have two modules modules. In my main module, in the OnRequest event handle, i check for session variables ('username') to