Re: [fpc-pascal] FileAge() issue?

2016-01-14 Thread Michael Van Canneyt
On Thu, 14 Jan 2016, silvioprog wrote: Hello, I'm trying to get the datetime from a file, but it seems that the FileAge() function doesn't work properly. See only the second from the results below: FPC: 20/05/2014 10:33:*50* It seems like a rounding difference. home: >ls -l --time-style=+

Re: [fpc-pascal] AVR Busy Wait implementation

2016-01-14 Thread Christo Crause
There is a lot of useful information in avr-gcc code, once you can see past the peculiarities of C. See the implementation of avr-gcc's delay here: cvs.savannah.gnu.org/viewvc/avr-libc/include/util/delay.h and delay_basic.h in the same folder. Basically they use op codes with fixed cpu cycles to co

[fpc-pascal] [PATCH] Adds the method `TFPGMap.TryGetValue()`

2016-01-14 Thread silvioprog
Hello, Issued at #29397 [1]. Thank you! [1] http://bugs.freepascal.org/view.php?id=29397 -- Silvio Clécio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] FileAge() issue?

2016-01-14 Thread silvioprog
Hello, I'm trying to get the datetime from a file, but it seems that the FileAge() function doesn't work properly. See only the second from the results below: FPC: 20/05/2014 10:33:*50* Delphi (Seattle): 20/05/2014 10:33:*49* NodeJS: Tue May 20 2014 10:33:*49* GMT-0300 (E. South America Standar

Re: [fpc-pascal] Is the TFPGMap.KeyData()/TDictionary.TryGetValue() faster than TStringList.Values[]?

2016-01-14 Thread silvioprog
On Thu, Jan 14, 2016 at 8:13 PM, silvioprog wrote: > On Thu, Jan 14, 2016 at 4:43 AM, Michael Van Canneyt < > mich...@freepascal.org> wrote: > [...] > You can include them in your tests to get a more complete picture. > > > I'm going to do it and get back soon showing the results ... :-) > [..

Re: [fpc-pascal] Is the TFPGMap.KeyData()/TDictionary.TryGetValue() faster than TStringList.Values[]?

2016-01-14 Thread silvioprog
On Thu, Jan 14, 2016 at 6:27 AM, Marco van de Voort wrote: > In our previous episode, Maciej Izak said: > > > > > My results for FPC and TDictionary from Generics.Collections ( > > https://github.com/dathox/generics.collections ): > > If you need the in-order capacity of tstringlist then you can

Re: [fpc-pascal] Is the TFPGMap.KeyData()/TDictionary.TryGetValue() faster than TStringList.Values[]?

2016-01-14 Thread silvioprog
On Thu, Jan 14, 2016 at 4:43 AM, Michael Van Canneyt wrote: > On Wed, 13 Jan 2016, silvioprog wrote: > >> Hello, >> >> I need two fast list features: >> >> Add(Key: string, Value: string); >> Get(Key: string, Value: string): string; > > [...] > TStringList.Values is extremely slow, this is known

Re: [fpc-pascal] Is the TFPGMap.KeyData()/TDictionary.TryGetValue() faster than TStringList.Values[]?

2016-01-14 Thread silvioprog
On Thu, Jan 14, 2016 at 4:27 AM, Maciej Izak wrote: > Please disconsider this link above, the correct link is: >> http://pastebin.com/SUxJ1kKc. >> >> > My results for FPC and TDictionary from Generics.Collections ( > https://github.com/dathox/generics.collections ): > > TStringList: 00:00:03.644

Re: [fpc-pascal] AVR Busy Wait implementation

2016-01-14 Thread Marc Santhoff
On Do, 2016-01-14 at 21:33 +0100, Simon Ameis wrote: > In general I already know these documents; what I'm looking for is an > implementation of a busy wait, not how to use it. > For C/C++ it's easy to get the code files. But I don't know where to get > compiler built-in procedures for gcc or other

Re: [fpc-pascal] AVR Busy Wait implementation

2016-01-14 Thread Simon Ameis
In general I already know these documents; what I'm looking for is an implementation of a busy wait, not how to use it. For C/C++ it's easy to get the code files. But I don't know where to get compiler built-in procedures for gcc or other language's compilers. The algorithm itself isn't that compl

[fpc-pascal] Objects, open arrays and memory leaks

2016-01-14 Thread Santiago A.
Hello: I'm using Free Pascal Compiler version 3.0.0 [2015/11/16] for i386 I'm getting memory leaks (on winXP and Linux) . I have tracked to this. (Note: they are objects, not classes) type TArray=object InnerList:array of integer; constructor Init; end; constructor TArray.Init; begin Set

Re: [fpc-pascal] Is the TFPGMap.KeyData()/TDictionary.TryGetValue() faster than TStringList.Values[]?

2016-01-14 Thread Marco van de Voort
In our previous episode, Maciej Izak said: > > > My results for FPC and TDictionary from Generics.Collections ( > https://github.com/dathox/generics.collections ): If you need the in-order capacity of tstringlist then you can use http://www.stack.nl/~marcov/genlight.pas - It is iterator based t