Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Florian Klämpfl
Am 11. Mai 2016 12:06:07 vorm. schrieb Sven Barth : > the main problem being the location, e.g. rtl-generics or fcl-generics or > whatever... If it depends on classes: fcl-generic, else RTL-generic. > > Regards, > Sven > > > > -- > ___ > fpc-pa

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Sven Barth
Am 10.05.2016 21:18 schrieb "Florian Klämpfl" : > > Am 10.05.2016 um 10:07 schrieb Maciej Izak: > > 2016-05-09 22:11 GMT+02:00 Florian Klämpfl mailto:flor...@freepascal.org>>: > > > > Who said that? We discussed the syntax etc. and at least I see good changes to integrate it in trunk > > as

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Sven Barth
Am 10.05.2016 23:06 schrieb "Maciej Izak" : >> >> That is with (note these functions are generic): >> >> procedure Foo1(A: TArray); >> procedure Foo2(var A: TArray); >> procedure Foo3(out A: TArray); >> >> Where each can be called with a TManagedArray as the "A" argument without qualifying the Inst

Re: [fpc-pascal] fpc/lazarus and kinect sample

2016-05-10 Thread wkitty42
On 05/10/2016 04:33 PM, Björn Lundin wrote: I found the nice article "Programming the Microsoft Kinect in Pascal" by Michaël Van Canneyt, in Blaise Pascal Magazine. (Nr 5 / 2013) However, I wonder if anyone have seen the sample code somewhere published on the web ? I do not get it all quite toge

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Maciej Izak
2016-05-10 22:33 GMT+02:00 Anthony Walter : > From your example code, the usage looks exactly like what I'd want. One > question though. Would the magic code also work with var and out arguments? > Yes. > That is with (note these functions are generic): > > procedure Foo1(A: TArray); > procedur

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Maciej Izak
2016-05-10 21:18 GMT+02:00 Florian Klämpfl : > Aren't there several bug reports open which must be fixed first? There is one critical bug related to class var and generics, but as Sven said it need wait to "packages branch"... With other bugs we can +/- live. ;) btw I've started to fix few of

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Anthony Walter
Maciej, >From your example code, the usage looks exactly like what I'd want. One question though. Would the magic code also work with var and out arguments? That is with (note these functions are generic): procedure Foo1(A: TArray); procedure Foo2(var A: TArray); procedure Foo3(out A: TArray);

[fpc-pascal] fpc/lazarus and kinect sample

2016-05-10 Thread Björn Lundin
Hi! I got an xbox 360 kinect, which I'd like to use for controlling a drone (Crazyflie 2). https://www.youtube.com/watch?v=UzFwg2Fpv4E The drone software is all in a virtual machine, and I do not get the kinect to work with that machine. (3d accelerated cards are hard to get to work well) So, my

Re: [fpc-pascal] The world is ending

2016-05-10 Thread Marco van de Voort
In our previous episode, Jonas Maebe said: > > ExecuteProcess is in trunk since late march. > > > > It is fairly self contained and could be merged to 3.0.2 technically. > > I mentioned that it is in trunk, but it's incomplete: it does not > translate the command line arguments to the code page

[fpc-pascal] RTL and Unicode Strings

2016-05-10 Thread Mazo Winst
Hello all, I am very confused about the way the system codepage are determined. >From what i understand, the string codepage is determined at runtime in a platform dependent manner. Suppose that my app needs to read a file encoded with UTF-8. Suppose that my app runs on Windows, where the system c

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Florian Klämpfl
Am 10.05.2016 um 10:07 schrieb Maciej Izak: > 2016-05-09 22:11 GMT+02:00 Florian Klämpfl >: > > Who said that? We discussed the syntax etc. and at least I see good > changes to integrate it in trunk > as soon as it is ready. Neither Sven nor me would discus

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Florian Klämpfl
Am 10.05.2016 um 10:25 schrieb Maciej Izak: > 2016-05-09 23:23 GMT+02:00 Sven Barth >: > > I agree with Florian regarding the management operators. They will > probably be merged. > > > probably = wait few years + rather no probably: depends on you

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Maciej Izak
2016-05-10 11:26 GMT+02:00 Anthony Walter : > Hey I'm all for your improvements. Good work, keep it up, and I actually > appreciate it. If you want, I can write up an overview of your improvements > at getlazarus.org and provide precompiled versions for testings/use on > all platforms (win, mac, l

Re: [fpc-pascal] String theory

2016-05-10 Thread Jonas Maebe
On 10/05/16 17:48, Tony Whyman wrote: On 10/05/16 14:15, Bart wrote: It already is [part of the string type. See the StringCodePage function. > I don't think this is what I meant as StringCodePage is a unicode > string function. I am looking at the single byte string types. StringCodePage()

Re: [fpc-pascal] String theory

2016-05-10 Thread Jürgen Hestermann
Am 2016-05-10 um 17:48 schrieb Tony Whyman: I don't think this is what I meant as StringCodePage is a unicode string function. I am looking at the single byte string types. On 10/05/16 14:15, Bart wrote: It already is [part of the string type. See the StringCodePage function. Codepages a

Re: [fpc-pascal] String theory

2016-05-10 Thread Tony Whyman
I don't think this is what I meant as StringCodePage is a unicode string function. I am looking at the single byte string types. On 10/05/16 14:15, Bart wrote: It already is [part of the string type. See the StringCodePage function. ___ fpc-pascal m

Re: [fpc-pascal] String theory

2016-05-10 Thread Bart
On 5/10/16, Tony Whyman wrote: > .. Pascal could be improved by including (for string types) the code > page as part of the string data itself rather than having to infer it. It already is [part of the string type. See the StringCodePage function. Bart ___

Re: [fpc-pascal] The world is ending

2016-05-10 Thread Jonas Maebe
marcov wrote on Tue, 10 May 2016: In our previous episode, Jonas Maebe said: As to the original question: most RTL routines don't care about what the default code page is of ansistrings. Of the ones that do, most have been adapted to deal with changing the default ansistring code page (http://

Re: [fpc-pascal] The world is ending

2016-05-10 Thread Marco van de Voort
In our previous episode, Jonas Maebe said: > As to the original question: most RTL routines don't care about what > the default code page is of ansistrings. Of the ones that do, most > have been adapted to deal with changing the default ansistring code > page (http://wiki.freepascal.org/FPC_U

Re: [fpc-pascal] The world is ending

2016-05-10 Thread Michael Van Canneyt
On Tue, 10 May 2016, Graeme Geldenhuys wrote: On 2016-05-10 09:40, Michael Van Canneyt wrote: > No idea. As far as I understand pretty much nothing has been done to the > RTL regarding text encodings, so I wouldn't expect too much. Why do you say that ? What would you expect to be done ?

Re: [fpc-pascal] The world is ending

2016-05-10 Thread Jonas Maebe
Graeme Geldenhuys wrote on Tue, 10 May 2016: On 2016-05-10 09:40, Michael Van Canneyt wrote: > No idea. As far as I understand pretty much nothing has been done to the > RTL regarding text encodings, so I wouldn't expect too much. Why do you say that ? What would you expect to be done ? By

Re: [fpc-pascal] The world is ending

2016-05-10 Thread Graeme Geldenhuys
On 2016-05-10 09:40, Michael Van Canneyt wrote: >> > No idea. As far as I understand pretty much nothing has been done to the >> > RTL regarding text encodings, so I wouldn't expect too much. > Why do you say that ? > > What would you expect to be done ? > By that I meant a lot in the RTL is sti

[fpc-pascal] String theory

2016-05-10 Thread Tony Whyman
While my first thought over the "String Type" or "End of World" threads was this is another "how many angels to the pinhead" type discussion. However, having worked through it, I believe that there is an issue here and Pascal could be improved by including (for string types) the code page as pa

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Anthony Walter
Maciej, Hey I'm all for your improvements. Good work, keep it up, and I actually appreciate it. If you want, I can write up an overview of your improvements at getlazarus.org and provide precompiled versions for testings/use on all platforms (win, mac, linux, raspbian).. I asked Sven the other da

Re: [fpc-pascal] The world is ending

2016-05-10 Thread Michael Van Canneyt
On Tue, 10 May 2016, Graeme Geldenhuys wrote: On 2016-05-10 03:17, Mazo Winst wrote: 1 - So, is there a way to set the codepage to be used by the String type regardless of the platform? Yes, apparently via SetMultiByteConversionCodePage(). I still need to check the documentation to find out

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Maciej Izak
2016-05-09 23:23 GMT+02:00 Sven Barth : > I agree with Florian regarding the management operators. They will > probably be merged. > probably = wait few years + rather no ;) > What I'm not in favor of however is overloading of "." and such (but you > haven't put that up for discussion yet, thu

Re: [fpc-pascal] Warning not to use the "String" type with FPC 3.x

2016-05-10 Thread Graeme Geldenhuys
On 2016-05-09 14:41, Michael Schnell wrote: > You can't seriously suggest to dump all code that ever had been written > in Pascal (Delphi Dialect). No, just search and replace all String types with AnsiString and force a specific encoding. Or search and replace all String types with UnicodeString

Re: [fpc-pascal] The world is ending

2016-05-10 Thread Graeme Geldenhuys
On 2016-05-10 03:17, Mazo Winst wrote: > 1 - So, is there a way to set the codepage to be used by the String type > regardless of the platform? Yes, apparently via SetMultiByteConversionCodePage(). I still need to check the documentation to find out more details. I think this is what Lazarus is do

Re: [fpc-pascal] Smart Pointers

2016-05-10 Thread Maciej Izak
2016-05-09 22:11 GMT+02:00 Florian Klämpfl : > Who said that? We discussed the syntax etc. and at least I see good > changes to integrate it in trunk > as soon as it is ready. Neither Sven nor me would discuss a feature if we > are in doubt that it will > make it in trunk. I have feeling that Sv