[fpc-devel] TFPObjectList patch

2005-06-21 Thread Ales Katona
This patch adds TFPObjectList to contnrs. It's a descendent of TFPList and uses same tricks to gain speed.(inline etc.) I've tested with bubblesort and it was 1/3 faster. P.S: I wanted to get rid of inherited calls too but FCount is private in TFPList ;( Ales Index: fcl/inc/contnrs.pp ==

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Marco van de Voort
> >At work, I have found out that decal is too bulky and too slow for some > >purposes (I've lists with millions of objects in memory). _each_ entry in > >a decal container eats 78 byte (with D6 memory manager, but will only be > >equal or larger with FPC) > > > I can immagine, the DObject is a TV

Re: [fpc-devel] ExceptAddr, but no ExceptFrameCount and ExceptFrames

2005-06-21 Thread Vincent Snijders
Florian Klaempfl wrote: Vincent Snijders wrote: If these patches are applied in the trunk, wil they be merged into the fixes branch too? Applied, I'll merge them too. I think there was a typo in the merge command. Revision 361 was merged and not revision 461. From the logfile: 2005-06-2

[fpc-devel] Pre-processing to Post-processed

2005-06-21 Thread L505
I will be working on a feature or a program that outputs post-processed code when using macros. Just to verify that this feature hasn't already been implemented or a program hasn't already been created by someone? My ideas for a compiler feature or program: -If the -Sm option is on, and a user s

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Dean Zobec
Bram Kuijvenhoven wrote: > Besides using TVarRecs, we could also use pointers (as in > classes.TList) or objects. Pointers like in TList were the things I had in mind. > This would perhaps be a bit like it is in java.util. Then we would > also need container classes for basic types such as bool

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Dean Zobec
Marco van de Voort wrote: >>Dean Zobec wrote: >> >> >>>As the project looks like a long term one and I think that fpc urgently >>>needs a optimized hash table I'll also work on a streamlined hash table >>>with a chaining technique as a collision resolution scheme and a paging >>>for the alloc

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Bram Kuijvenhoven
Dean Zobec wrote: I can immagine, the DObject is a TVarRec. The problem with speed and memory usage are the things that I don't like in Decal and it still makes me wonder if it would be better to reimplement a containers library from scratch, if we had generics to add type checking at compile t

[fpc-devel] leak in destroy

2005-06-21 Thread mariano podesta
hi people, i found a memory leak when calling Destroy explicitly. the leak is in 1.9.8 and 2.0 has anyone seen this? here is an example: program mem3; {$mode objfpc}{$H+} type TTest = class (TObject, IUnknown) private FRefCount: Integer; public // IUnknown function QueryInterface(

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Dean Zobec
Marco van de Voort wrote: >>The generic functions are very powerful and model closely the C++ STL >>library (as fpc does not have generics yet a sort of typecast is still >>required when fetching the items from the container). The library was >>not designed for speed though, from the first test th

Re: [fpc-devel] Fedora Core 4

2005-06-21 Thread Colin Western
Joost van der Sluis wrote: On Mon, 2005-06-20 at 22:12 +0100, Colin Western wrote: I found two minor problems (so far) on Fedora Core 4 (current svn): 1. The "Copyright:" tag must be "License:" in the fpc.spec file. (Apparently "Copyright:" has been deprecated for a while). 2. The samplec

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Marco van de Voort
> > Depends how the hash is parametrized. If you've a big hash array and a > > good hash function accessing has a complexity of O(1) while for a binary > > search it's O(log(n)) > > But I assume that calculating the hash becomes harder for 'better' hashes ? Only for general purpose hashes. Specif

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Dean Zobec
Michael Van Canneyt wrote: >What is the performance difference between a hash() and a binary search on >an ordered list ? I've also been working with an 'associative' stringlist, but >I was using an ordered stringlist to keep the data, so a binary search is done. > > The TStringList is a very f

Re: [fpc-devel] OpenGL patch, final(I hope)

2005-06-21 Thread Ales Katona
Florian Klaempfl wrote: Ales Katona wrote: Ok this patch does the following: Removes the writeln() in case the library fails to load. If the whole library is not found, it throws an exception which tell the library name. If any method within the library is not found it throws an exception

Re: [fpc-devel] OpenGL patch, final(I hope)

2005-06-21 Thread Michael Van Canneyt
On Tue, 21 Jun 2005, Florian Klaempfl wrote: > Ales Katona wrote: > > > Ok this patch does the following: > > > > Removes the writeln() in case the library fails to load. > > If the whole library is not found, it throws an exception which tell the > > library name. If any method within the lib

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Dean Zobec
Michael Van Canneyt wrote: >>Depends how the hash is parametrized. If you've a big hash array and a >>good hash function accessing has a complexity of O(1) while for a binary >>search it's O(log(n)) >> >> > >But I assume that calculating the hash becomes harder for 'better' hashes ? > Not alwa

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Micha Nelissen
On Tue, 21 Jun 2005 21:42:19 +0200 (CEST) [EMAIL PROTECTED] (Marco van de Voort) wrote: > > Depends how the hash is parametrized. If you've a big hash array and a > > good hash function accessing has a complexity of O(1) > > while for a binary > > search it's O(log(n)) > > This is no fair compari

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Marco van de Voort
> > I would make that the contnrs unit. I think it belongs more together with > > objects such as a stack and queue... > > > > What is the performance difference between a hash() and a binary search on > > an ordered list ? I've also been working with an 'associative' stringlist, > > but > > I

Re: [fpc-devel] OpenGL patch, final(I hope)

2005-06-21 Thread Florian Klaempfl
Ales Katona wrote: > Ok this patch does the following: > > Removes the writeln() in case the library fails to load. > If the whole library is not found, it throws an exception which tell the > library name. If any method within the library is not found it throws an > exception with the given meth

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Michael Van Canneyt
On Tue, 21 Jun 2005, Florian Klaempfl wrote: > Michael Van Canneyt wrote: > > > > > On Tue, 21 Jun 2005, Florian Klaempfl wrote: > > > > > >>Dean Zobec wrote: > >> > >>>As the project looks like a long term one and I think that fpc urgently > >>>needs a optimized hash table I'll also work o

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Florian Klaempfl
Michael Van Canneyt wrote: > > On Tue, 21 Jun 2005, Florian Klaempfl wrote: > > >>Dean Zobec wrote: >> >>>As the project looks like a long term one and I think that fpc urgently >>>needs a optimized hash table I'll also work on a streamlined hash table >>>with a chaining technique as a collisi

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Michael Van Canneyt
On Tue, 21 Jun 2005, Florian Klaempfl wrote: > Dean Zobec wrote: > > As the project looks like a long term one and I think that fpc urgently > > needs a optimized hash table I'll also work on a streamlined hash table > > with a chaining technique as a collision resolution scheme and a paging >

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Marco van de Voort
> Dean Zobec wrote: > > As the project looks like a long term one and I think that fpc urgently > > needs a optimized hash table I'll also work on a streamlined hash table > > with a chaining technique as a collision resolution scheme and a paging > > for the allocation of the nodes in the chains,

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Marco van de Voort
> The generic functions are very powerful and model closely the C++ STL > library (as fpc does not have generics yet a sort of typecast is still > required when fetching the items from the container). The library was > not designed for speed though, from the first test the DArray class is > twice a

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Florian Klaempfl
Dean Zobec wrote: > As the project looks like a long term one and I think that fpc urgently > needs a optimized hash table I'll also work on a streamlined hash table > with a chaining technique as a collision resolution scheme and a paging > for the allocation of the nodes in the chains, to have a

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Dean Zobec
John Briggs wrote: >This is a repost of an earlier response to another thread. I did not recieve >any response so I am posting this in its own thread. > >I have several old books (circa 1991), including source code, covering TP6 in >my library. > > I still remember the Algorithms + Data Structu

Re: [fpc-devel] ExceptAddr, but no ExceptFrameCount and ExceptFrames

2005-06-21 Thread Vincent Snijders
Florian Klaempfl wrote: Vincent Snijders wrote: If these patches are applied in the trunk, wil they be merged into the fixes branch too? Applied, I'll merge them too. Thanks. Vincent. ___ fpc-devel maillist - fpc-devel@lists.freepascal.or

Re: [fpc-devel] ExceptAddr, but no ExceptFrameCount and ExceptFrames

2005-06-21 Thread Florian Klaempfl
Vincent Snijders wrote: > Vincent Snijders wrote: > >> Michael Van Canneyt wrote: >> >>> >>> >>> On Tue, 21 Jun 2005, Vincent Snijders wrote: >>> Hi, Sysutil has a function ExceptAddr to current exception address, but no corresponding functions to get the frame count and the f

Re: [fpc-devel] ExceptAddr, but no ExceptFrameCount and ExceptFrames

2005-06-21 Thread Vincent Snijders
Vincent Snijders wrote: Vincent Snijders wrote: I noticed that tortoisesvn doesn't put a full path into the diff like tortoisecvs did. Attached are two patches: 1. except.patch implements ExceptFrameCount and ExceptFrames This patch is taken from the rtl/objpas/sysutils directory. 2. arg

Re: [fpc-devel] ExceptAddr, but no ExceptFrameCount and ExceptFrames

2005-06-21 Thread Florian Klaempfl
Vincent Snijders wrote: > Vincent Snijders wrote: > >> Michael Van Canneyt wrote: >> >>> >>> >>> On Tue, 21 Jun 2005, Vincent Snijders wrote: >>> Hi, Sysutil has a function ExceptAddr to current exception address, but no corresponding functions to get the frame count and the f

Re: [fpc-devel] ExceptAddr, but no ExceptFrameCount and ExceptFrames

2005-06-21 Thread Vincent Snijders
Vincent Snijders wrote: Michael Van Canneyt wrote: On Tue, 21 Jun 2005, Vincent Snijders wrote: Hi, Sysutil has a function ExceptAddr to current exception address, but no corresponding functions to get the frame count and the frames of the current exception. Are these function just not

Re: [fpc-devel] Fedora Core 4

2005-06-21 Thread Joost van der Sluis
On Mon, 2005-06-20 at 22:12 +0100, Colin Western wrote: > I found two minor problems (so far) on Fedora Core 4 (current svn): > 1. The "Copyright:" tag must be "License:" in the fpc.spec file. > (Apparently "Copyright:" has been deprecated for a while). > 2. The samplecfg script fails, probably

Re: [fpc-devel] About Turbo Vision in FreePascal

2005-06-21 Thread Marco van de Voort
> Excuseme my bad and wrong English > > I want to konow if there is a units like Turbo Vision For Borland Turbo > Pascal for Free Pascal. > There are a Units o something else that help to build windows, check > box, list box, like Turbo Vision but for Free Pascal?? Yes, a turbo vision clone is

Re: [fpc-devel] ExceptAddr, but no ExceptFrameCount and ExceptFrames

2005-06-21 Thread Vincent Snijders
Michael Van Canneyt wrote: On Tue, 21 Jun 2005, Vincent Snijders wrote: Hi, Sysutil has a function ExceptAddr to current exception address, but no corresponding functions to get the frame count and the frames of the current exception. Are these function just not yet implemented or are th

Re: [fpc-devel] ExceptAddr, but no ExceptFrameCount and ExceptFrames

2005-06-21 Thread Michael Van Canneyt
On Tue, 21 Jun 2005, Vincent Snijders wrote: Hi, Sysutil has a function ExceptAddr to current exception address, but no corresponding functions to get the frame count and the frames of the current exception. Are these function just not yet implemented or are the ommitted on purpose? Jus

[fpc-devel] ExceptAddr, but no ExceptFrameCount and ExceptFrames

2005-06-21 Thread Vincent Snijders
Hi, Sysutil has a function ExceptAddr to current exception address, but no corresponding functions to get the frame count and the frames of the current exception. Are these function just not yet implemented or are the ommitted on purpose? Regards, Vincent Snijders. _

Re: [fpc-devel] Generic Programming Units

2005-06-21 Thread Michael Van Canneyt
On Tue, 21 Jun 2005, John Briggs wrote: This is a repost of an earlier response to another thread. I did not recieve any response so I am posting this in its own thread. I have several old books (circa 1991), including source code, covering TP6 in my library. Perhaps the most interesting one