Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Sven Barth via fpc-pascal
Am 25.05.2018 um 08:42 schrieb Ryan Joseph: On May 25, 2018, at 1:02 PM, Sven Barth via fpc-pascal wrote: Yes, that is what it does. Though a possible optimization would be that the compiler detects "dynarr := dynarr + [elem]" and converts it to

Re: [fpc-pascal] Management operators question

2018-05-25 Thread Alexander Grotewohl
I don't really know why this NewPascal stuff is on this mailing list. On 05/25/2018 11:59 AM, Maciej Izak wrote: 2018-05-25 16:10 GMT+02:00 Tomas Hajny >: I assume that the functionality added to trunk (and as far as I remember also

Re: [fpc-pascal] Management operators question

2018-05-25 Thread Tomas Hajny
On Fri, May 25, 2018 17:27, Maciej Izak wrote: > 2018-05-25 15:58 GMT+02:00 Tomas Hajny : > >> The sentence above is not appropriate, please adjust your communication >> and stop blaming people for revenge, etc. You'll receive an official >> statement to the previous events from

Re: [fpc-pascal] Management operators question

2018-05-25 Thread Maciej Izak
2018-05-25 16:10 GMT+02:00 Tomas Hajny : > I assume that the functionality added to trunk (and as far as I remember > also announced in the list) was finished to the extent that it works and > may be used (although with some possible limitations), otherwise there > would be no

Re: [fpc-pascal] Management operators question

2018-05-25 Thread Maciej Izak
2018-05-25 15:58 GMT+02:00 Tomas Hajny : > The sentence above is not appropriate, please adjust your communication > and stop blaming people for revenge, etc. You'll receive an official > statement to the previous events from the FPC core team during the > weekend. Also, note

Re: [fpc-pascal] Management operators question

2018-05-25 Thread Tomas Hajny
On Fri, May 25, 2018 15:16, Maciej Izak wrote: > 2018-05-25 14:44 GMT+02:00 Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org>: . . > even you were against when patch for management operators was ready, so it > is not nonsense. The MO is not the part of official release and it exist

Re: [fpc-pascal] Management operators question

2018-05-25 Thread Tomas Hajny
On Fri, May 25, 2018 14:03, Maciej Izak wrote: . . > anyway you should not use management operators in FPC trunk, the work is > discontinued on the trunk and may be removed (not my fault - for one > person in FPC core with admin rights, emotional personal revenge and > victimization is more

Re: [fpc-pascal] Management operators question

2018-05-25 Thread Maciej Izak
2018-05-25 14:44 GMT+02:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > Would you please stop spreading such nonsense? No one - not even Michael - > said anything about removing it. > Spreading such nonsense? Nobody can be sure anything (for me it looks like Michael has

Re: [fpc-pascal] Management operators question

2018-05-25 Thread Sven Barth via fpc-pascal
Maciej Izak schrieb am Fr., 25. Mai 2018, 14:03: > anyway you should not use management operators in FPC trunk, the work is > discontinued on the trunk and may be removed (not my fault - for one person > in FPC core with admin rights, emotional personal revenge and >

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 25. Mai 2018, 12:45: > > > > On May 25, 2018, at 3:57 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > If I had to guess you were probably doing something with the arrays they > weren't designed for. :/ > >

Re: [fpc-pascal] Management operators question

2018-05-25 Thread Maciej Izak
2018-05-25 12:19 GMT+02:00 Ryan Joseph : > Here’s a quick demo I typed up but I don’t understand why the init/dealloc > count isn’t balanced. Calling the constructor seems to be the culprit, but > why? > all is balanced :) you forgot to handle operator : class

Re: [fpc-pascal] Libxml2 - How to get messages on Linux?

2018-05-25 Thread Henry Vermaak
On Fri, May 25, 2018 at 12:48:20PM +0200, Gabor Boros wrote: > 2018. 05. 24. 9:37 keltezéssel, Michael Van Canneyt írta: > >Are these functions callbacks ? If so, is the calling convention correct ? > > I used xmlSchemaSetValidErrors and the documentation say "Set the error and > warning callback

Re: [fpc-pascal] Libxml2 - How to get messages on Linux?

2018-05-25 Thread Gabor Boros
2018. 05. 24. 9:37 keltezéssel, Michael Van Canneyt írta: Are these functions callbacks ? If so, is the calling convention correct ? I used xmlSchemaSetValidErrors and the documentation say "Set the error and warning callback informations". Tried with and without cdecl. Meanwhile tried

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Ryan Joseph
> On May 25, 2018, at 3:57 PM, Sven Barth via fpc-pascal > wrote: > > If I had to guess you were probably doing something with the arrays they > weren't designed for. :/ > It’s a little foggy now but I think I had a dynamic array in a class which was being

[fpc-pascal] Management operators question

2018-05-25 Thread Ryan Joseph
Talking about dynamic arrays I was just curious if we could us the new management operators to make dynamic arrays that are managed on the stack. Here’s a quick demo I typed up but I don’t understand why the init/dealloc count isn’t balanced. Calling the constructor seems to be the culprit, but

[fpc-pascal] -gw3 produces garbages

2018-05-25 Thread Mr Bee via fpc-pascal
Hi all, The `-gw3` with `godwarfcpp` flag for lldb produces garbages for string type or any dynamic array types. While `-gw2` only works on string but still failed on any dynamic array types. Is there a way or configuration so we can debug string and dynamic array with lldb conveniently? I'm

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 25. Mai 2018, 10:24: > > > > On May 25, 2018, at 3:18 PM, Michael Van Canneyt > wrote: > > > > I'm guessing you are not using strings either then, for performance > reasons ? Because exactly the same happens there.

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Fr., 25. Mai 2018, 10:15: > > > On Fri, 25 May 2018, Sven Barth via fpc-pascal wrote: > > > Yes, that is what it does. Though a possible optimization would be that > the > > compiler detects "dynarr := dynarr + [elem]" and converts it to > >

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Ryan Joseph
> On May 25, 2018, at 3:18 PM, Michael Van Canneyt > wrote: > > I'm guessing you are not using strings either then, for performance reasons ? > Because exactly the same happens there. really? I had a collection class with a dynamic array for the storage and that’s

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Bart
On Fri, May 25, 2018 at 8:42 AM, Ryan Joseph wrote: > Oh Insert on the last element works like Push. There really should be a > Push/append etc.. function in there. I know it’s redundant but doing > > Insert(arr, High(arr), value) is more work than Push(arr, value)

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Michael Van Canneyt
On Fri, 25 May 2018, Ryan Joseph wrote: On May 25, 2018, at 1:06 PM, Michael Van Canneyt wrote: Dynamic arrays are reference counted. The interlocked increment is there to make the operations thread safe. I do not know whether the classes you speak of are thread

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Michael Van Canneyt
On Fri, 25 May 2018, Sven Barth via fpc-pascal wrote: Yes, that is what it does. Though a possible optimization would be that the compiler detects "dynarr := dynarr + [elem]" and converts it to "Insert(elem, dynarr, High(dynarr))". Since dynamic array helpers work could you expose a

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Ryan Joseph
> On May 25, 2018, at 1:02 PM, Sven Barth via fpc-pascal > wrote: > > Yes, that is what it does. Though a possible optimization would be that the > compiler detects "dynarr := dynarr + [elem]" and converts it to "Insert(elem, > dynarr, High(dynarr))”. 100%

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Ryan Joseph
> On May 25, 2018, at 1:06 PM, Michael Van Canneyt > wrote: > > Dynamic arrays are reference counted. The interlocked increment is there to > make the operations thread safe. I do not know whether the classes you speak > of are thread safe. If there is no

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 25. Mai 2018, 07:55: > The procedural syntax of Insert(arr, 0, value) is less enticing than > arr.Insert(0, value) also but again we can fix that with type helpers. > You are overestimating what type helpers are capable of doing for

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Michael Van Canneyt
On Fri, 25 May 2018, Ryan Joseph wrote: On May 25, 2018, at 12:43 PM, Michael Van Canneyt wrote: I think the above is "right", and completely equivalent to sets, which are in some ways like an array: a "collection" of same typed values. To add an element to a

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 25. Mai 2018, 04:35: > > > > On May 25, 2018, at 1:37 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > This is currently not supported. And to avoid backwards compatibility > problems with existing operator