[fpc-pascal] Cmdline parser

2023-11-12 Thread denisgolovan via fpc-pascal
Hi all Could anybody suggest some existing command line parser for FPC having following requirements: 1. Crossplatform with stable semantics - Linux/Windows. 2. Short and long values support. 3. Support for "generic parsing". I mean being able to parse from string any unknown set of args as log

Re: [fpc-pascal] Barriers semantics

2023-08-14 Thread denisgolovan via fpc-pascal
> On 14/08/2023 18:19, denisgolovan via fpc-pascal wrote: > >> Now we have "volatile" intrinsic for assignments in place, I'd like to ask >> for another clarification. > > Just to make sure given your questions below: using volatile in the > context

[fpc-pascal] Barriers semantics

2023-08-14 Thread denisgolovan via fpc-pascal
Hi all Now we have "volatile" intrinsic for assignments in place, I'd like to ask for another clarification. Documentation states we have following barriers - ReadBarrier, WriteBarrier, ReadDependencyBarrier, ReadWriteBarrier. I'd like to get an idea how those related to more common / standard

Re: [fpc-pascal] Volatile store usage

2023-08-12 Thread denisgolovan via fpc-pascal
> On 11/08/2023 18:05, denisgolovan via fpc-pascal wrote: > >> Are "volatile" stores supported? > > They weren't, but I've added support for it now. Aha. Thanks. -- Regards, Denis Golovan ___ fpc-pascal mailli

[fpc-pascal] Volatile store usage

2023-08-11 Thread denisgolovan via fpc-pascal
Hi all I'd like to get some clarification about "volatile" intrinsic. https://wiki.freepascal.org/FPC_New_Features_Trunk#Support_for_.22volatile.22_intrinsic says just following: Support for "volatile" intrinsic Overview: A volatile intrinsic has been added to indicate to the code generato

Re: [fpc-pascal] Cache-line alignment for records

2023-03-27 Thread denisgolovan via fpc-pascal
> It is possible > (https://gitlab.com/freepascal.org/fpc/source/-/blob/main/tests/test/talignrec1.pp), > but it is subject to the same limitations when declaring variables of > those types. > > Jonas Aha. Nice! Does it work recursively? I mean - does it work when aligned record is itself a f

Re: [fpc-pascal] Cache-line alignment for records

2023-03-27 Thread denisgolovan via fpc-pascal
> However, the maximum alignment you can specify this way is limited per > target (hardcoded in the compiler). In 3.2.x, it's 16 bytes for most > desktop targets. On 3.3.x, it's 64 bytes for most desktop targets. > > Jonas But it's still not possible to attach alignment to type itself instead

Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-22 Thread denisgolovan via fpc-pascal
> If you want to pass a pointer to ^T in a generic function is there anyway > safe to do this currently? Pascal doesn’t allow ^ types in function arguments > (why?) and generics don’t seems to support pointers either (why?). > > generic TValues = array[0..0] of T; > generic PValues = ^speciali

Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-20 Thread denisgolovan via fpc-pascal
That seriously improves generic code readability. Definitely worth trying to upgrade. Thanks a lot! 20:15, 20 апреля 2022 г., "Sven Barth via fpc-pascal" :Dear FPC community,The FPC developers are pleased to announce the implementation of a new feature: implicit generic function specializations. Th

Re: [fpc-pascal] Compiler internals. Changing dynamic arrays format

2022-04-13 Thread denisgolovan via fpc-pascal
> On 2022-04-13 00:34, denisgolovan via fpc-pascal wrote: > Your comment about conditional defines goes in the right direction - > basically: > > 1) Separate your changes into parts affecting the compiler behaviour > (e.g. the changes impacting the compiled structures an

[fpc-pascal] Compiler internals. Changing dynamic arrays format

2022-04-12 Thread denisgolovan via fpc-pascal
Hi all I've been maintaining a set of private patches for some quite old FPC revision for some years. The idea behind those patches to ease interoperation between FPC and LuaJIT FFI by pointer tagging for dynamic arrays. For that to happen I was forced to modify "tdynarray" record (increase its

Re: [fpc-pascal] Inactive account on GitLab

2021-09-10 Thread denisgolovan via fpc-pascal
> I starred the projects of those bugs (FPC/FPC/Source and > FPC/Lazarus/Lazarus) but my todo list is still empty. > Not a biggie now that I know how to find my bugs, though I'd prefer to > find them with the proper filter (the first one with author_username) > and not with a full text search. Sam

Re: [fpc-pascal] Inactive account on GitLab

2021-09-09 Thread denisgolovan via fpc-pascal
> FPC's git and issue trackers are hosted on Gitlab itself, we have no > authority to do > user management. Ok. I managed to sign up and login. Does it mean my old issues cannot be linked to my GitLab account? -- Regards, Denis Golovan ___ fpc-pascal

[fpc-pascal] Inactive account on GitLab

2021-09-09 Thread denisgolovan via fpc-pascal
Hi all Could anybody look at GitLab MageSlayer account? I can neither login nor change my password. Maybe my mail has not been transferred? -- Regards, Denis Golovan ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.o

Re: [fpc-pascal] Management operators memleaks

2021-06-14 Thread denisgolovan via fpc-pascal
> I have not looked at your test case yet, but it *might* be related to > issue #37164 ( https://bugs.freepascal.org/view.php?id=37164 ). Thanks for the point, Sven. Is there something I can do to prioritize the issue? -- Regards, Denis Golovan ___ fp

Re: [fpc-pascal] Management operators memleaks

2021-06-13 Thread denisgolovan via fpc-pascal
Could anybody reply? Am I doing something wrong? Are management operators supported or not? -- Regards, Denis Golovan ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Management operators memleaks

2021-06-11 Thread denisgolovan via fpc-pascal
Hi all I created a test case for rather unusual behaviour of management operators in fpc 3.3.1. In some specific cases they produce memory leaks. I suspect it's some compiler issue. Could somebody take a look at https://bugs.freepascal.org/view.php?id=38990 ? P.S. Sorry for attaching quite larg

Re: [fpc-pascal] Option type

2021-06-02 Thread denisgolovan via fpc-pascal
> Well as already discovered type like strings can not go into a "record case" > > But... The above record is anyway of constant size. I.e. the memory for > the field is always included, even if it is not used. > > Since the "false" block is empty, you can do > > type > generic TOption = recor

Re: [fpc-pascal] Option type

2021-06-01 Thread denisgolovan via fpc-pascal
> You simply can't use managed types in a variant clause and as T could be > a managed type the compiler does not allow it. Well. I thought it should be precisely the case for variant clause to properly handle. Compiler knows IsSome field is used to determine if some contains initialized value

Re: [fpc-pascal] Option type

2021-06-01 Thread denisgolovan via fpc-pascal
> You need to use a constraint like: > > type > generic TOption = record > case IsSome:boolean of > true: ( some: T ); > false: (); > end; > > Not sure why though. > > Regards, > Ryan Joseph That would limit supported types to class instances. I'll like to avoid that. Ideally TOption type sh

[fpc-pascal] Option type

2021-06-01 Thread denisgolovan via fpc-pascal
Hi all I am trying to implement Option type in FPC. type generic TOption = record case IsSome:boolean of true: ( some: T ); false: (); end; However fpc just emits errors: Error: Type parameters may require initialization/finalization - cannot be used in variant records Could an

Re: [fpc-pascal] Extended type under Win64

2020-02-26 Thread denisgolovan via fpc-pascal
> In theory yes, but it's not recommended, because Microsoft does not recommend > it (not to mention that it isn't even remotely tested as much as the normal > Win64 target). > > Regards, > Sven Got it. Thanks for the clarification. -- Regards, Denis Golovan ___

Re: [fpc-pascal] Extended type under Win64

2020-02-26 Thread denisgolovan via fpc-pascal
> The Extended type is not available for x86_64-win64. You either need to use > Double or the software floating point support in unit sfpux80 (though that is > only available in 3.2 and newer). So, Linux x64 having hardware Extended support is just an exception? Or maybe it's possible to build

[fpc-pascal] Extended type under Win64

2020-02-25 Thread denisgolovan via fpc-pascal
Hi all I'm trying to get an idea if Extended float is/can actually be 80bit? I have FPC built under Linux x64 and it works fine (co-processor command are actually used). But I haven't found any reliable information about Win64 support. Brief FPC source grepping showed FPC_HAS_TYPE_EXTENDED defin

[fpc-pascal] IDLE_PRIO with FPC-compiled processes

2020-01-26 Thread denisgolovan via fpc-pascal
Hi all Have anybody experienced exceptions "Failed to create new thread" when FPC-compiled process priority changed with schedtool -D [pid]? -- Regards, Denis Golovan ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.