Re: [fpc-devel] Patch to speed up Uppercase/Lowercase functions

2005-06-12 Thread Uberto Barbini
> > If I understood well, with modern processor an unpredicatable branch > > (i.e. one with similar probability) is much more time-consuming that an > > unnecessary function call. > > Yes, but the call needs to do memory allocation and a string copy, so it > is not just the call. I thought that Un

Re: [fpc-devel] Patch to speed up Uppercase/Lowercase functions

2005-06-12 Thread Uberto Barbini
> >That is why I use pchar and one uniquestring; > >It prevents all these automated uniquestring calls. > > Why call it when it might not be necessary?? > > My point is that you can make the function MUCH faster for the case > where the function doesn't modify the string by not calling > UniqueStri

Re: [fpc-devel] type discussion

2005-06-02 Thread Uberto Barbini
> > This only shows the implementation (and std library design) is bad (and > > that's true at least to java 1.4) > > I hear this from nearly any language with automated allocation (C#, Python, > Perl, Java). The concept is simple and attractive, the practice seems to > be different. I'm not a gre

Re: [fpc-devel] type discussion

2005-06-02 Thread Uberto Barbini
On Thursday 02 June 2005 17:07, Marc Weustink wrote: > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Jamie > McCracken > Sent: donderdag 2 juni 2005 16:32 > > >var strlist : TStringlist; > >strlist := Tstringlist.create; If the goal is this, I'd prefear a way to declare objects aut

Re: [fpc-devel] TCustomConnection - why?

2005-05-08 Thread Uberto Barbini
> yes. In that case we should make TCustomConnection an alias for > TDBDatabase. If the interfaces are identical I see no problems. Anyway could you rename TDBDatabase? It's orrible and I overlooked it when I searched for a TConnection replacement... ;) Bye Uberto __

Re: [fpc-devel] About TDataSet master/detail design in fpc

2005-05-06 Thread Uberto Barbini
> They are not yet implemented. But NestedDataset and DatasetField are > ONLY for TClientDataset, and we don't support TClientDataset (yet). Not only, they were first implemented for Oracle object field and they're used by some other custom implementation, for example InstantObject exposers use

Re: [fpc-devel] gdb for win

2005-05-01 Thread Uberto Barbini
On Sunday 01 May 2005 21:39, Florian Klaempfl wrote: > Uberto Barbini wrote: > > Hi, > > I'd like to understand which gdb is better to use for current fpc-cvs, > > the one in cvs/install/binw32 or mingw one? > > If that one in cvs/install/... makes no trouble for

[fpc-devel] gdb for win

2005-05-01 Thread Uberto Barbini
Hi, I'd like to understand which gdb is better to use for current fpc-cvs, the one in cvs/install/binw32 or mingw one? BTW what are the differences? TIA Uberto ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailma

Re: [fpc-devel] problem with "is" operator

2005-04-18 Thread Uberto Barbini
> >Sometimes I added a GetUnderObject() to my interfaces to get the actual > >object. But it's a choice up to the interface author. > >BTW I needed it to release the object through the interface. > >I suspect that if you shouldn't ever need to know the actual class when > > using interfaces (maybe

Re: [fpc-devel] problem with "is" operator

2005-04-18 Thread Uberto Barbini
> It does not seem right to declare var inst: TMyInterface if you > want inst to have circles and squares as values. I would expect > that you also have a class TFigure, of which TCircle and TSquare > both are descendants. These could also implement TMyInterface. > > You then declare var inst: TF

Re: [fpc-devel] Fpc and Ipaq

2005-04-05 Thread Uberto Barbini
> http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qtedemo.html > > This webpage is about a Qt/Embedded binding for FreePascal (FPC) > The source code of a small demo program is provided as well wow! I didn't think qt binding worked at all. mmh, I think I desperately need a Zaurus now! ;))

Re: [fpc-devel] Fpc and Ipaq

2005-04-05 Thread Uberto Barbini
> Did you check the link I gave you above :)? The 1.9.8 arm release is a > cross compiler. :(( I've read hastly and I understood that was for the arm-linux itself! I'll try asap. Uberto ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://

Re: [fpc-devel] Fpc and Ipaq

2005-04-05 Thread Uberto Barbini
On Tuesday 05 April 2005 21:13, Florian Klaempfl wrote: > Uberto Barbini wrote: > > Does anyone have experience with fpc and linux on handhelds? > > http://www.de.freepascal.org/down2-linux-arm.html > > More information can be found in the fpc wiki. Do you mean here: http

[fpc-devel] Fpc and Ipaq

2005-04-04 Thread Uberto Barbini
Does anyone have experience with fpc and linux on handhelds? May the 6th, I'll show fpc at a Delphi workshop, and I'll concentrate on thinks Delphi doesn't do. I can borrow an Ipaq with linux and opie, and I like to show some fpc application on it. Bye Uberto ___

Re: [fpc-devel] Hint: Parameter "sender" not used

2005-03-21 Thread Uberto Barbini
> > Yes! Exactly my point. But now the useful hints are sunk into tons of > > completely useless ones. > > Make your own error.msg file and change the hints you don't want to see > into notes or comments. Are you suggesting this as "quick hack" or do you find useful those hints? Are you theoricall

Re: [fpc-devel] Hint: Parameter "sender" not used

2005-03-21 Thread Uberto Barbini
> But what do you mean with published methods? The published section is > intended only for properties, which should be published in the object > inspector. I guess you mean event methods. Beside event methods, > callback functions and virtual methods could be affected too. Yes, it means anything

[fpc-devel] Hint: Parameter "sender" not used

2005-03-11 Thread Uberto Barbini
This is not a big issue, anyway could we avoid the endless list of such similar hints compiling Lazarus and our program? Don't make me wrong, I apreciate the hints of the compiler. 9 times out of 10 if I don't use a parameter in a function or a method there it is an error of mine. But in publish

Re: [fpc-devel] Compiling error: Invalid Floating point operation

2005-03-10 Thread Uberto Barbini
On Thursday 10 March 2005 19:17, Uberto Barbini wrote: > > The call to GetSystemMetrics changes the FPU control word from $1372 to > > $1272, i.e. the Rounding precision is changed from extended to double. > > > > In the attached patch I set it back to the original value. N

Re: [fpc-devel] utf8 reading

2005-03-10 Thread Uberto Barbini
On Thursday 10 March 2005 19:51, Uberto Barbini wrote: > > >UCS-2 is different from utf-16 (which is escaped), > > > > nope. UCS originally wasn't escaped, but they changed that "recently" > > Could you point me to a official document? > In the Unic

Re: [fpc-devel] utf8 reading

2005-03-10 Thread Uberto Barbini
> >UCS-2 is different from utf-16 (which is escaped), > > nope. UCS originally wasn't escaped, but they changed that "recently" Could you point me to a official document? In the Unicode site I don't find anything. Anyway with escaping UCS2 when UCS2 definition is utf-16 without encoding? Bye Ube

Re: [fpc-devel] utf8 reading

2005-03-10 Thread Uberto Barbini
> UCS-2 or UTF-16 how it called by the unicode consortium is "escaped" as > well and you've to take care of it in your code. mmh, no. UCS-2 is different from utf-16 (which is escaped), but you cannot represent all utf characters (see the case of Vogon poetry). See: http://www.uazone.com/multil

Re: [fpc-devel] Compiling error: Invalid Floating point operation

2005-03-10 Thread Uberto Barbini
> The call to GetSystemMetrics changes the FPU control word from $1372 to > $1272, i.e. the Rounding precision is changed from extended to double. > > In the attached patch I set it back to the original value. Now I can build > a new compiler again. :-) It doesn't work here. I've not swapped the c

Re: [fpc-devel] utf8 reading

2005-03-10 Thread Uberto Barbini
> > utf-8 is a unicode string. What do you mean with "not escaped" > > Unicode? Memory wasting utf-32? > > I'd see UCS2/UCS4 as not escaped Unicode. Exactly. I think that UCS2 will suffice to everyone not interested in Vogon poetry! ;)) This means to have 2 byte chars and related strings, all stri

Re: [fpc-devel] utf8 reading

2005-03-09 Thread Uberto Barbini
> >> What would be the correct solution? > > > > I am showing my ignorance of multi byte characater handling here, but > > I think it would be to write an escaped sequence as is currently done > > for wide strings. I don't think the current OutChars function is quite > > up to it, as utf8 character

Re: [fpc-devel] Improving Ref Counting

2005-02-27 Thread Uberto Barbini
> You can finalize it, so that it releases all private resources. That's > common practice in a GC environment. But then you are responsible when > the interfaced object is referenced from one of the still remaining > references, and it fails to act properly due to the missing resources. I wish I

Re: [fpc-devel] Improving Ref Counting

2005-02-27 Thread Uberto Barbini
> >>Why are you looking at GC/Refcounting when the problem is the > >> try..finally? It is better to rewrite the try..finally code using the > >> C++ ABI for exception handling. > > > > +1 > > and it'd be benefical to all applications. > > Using the C++ ABI the overhead is almost zero. Out of curi

Re: [fpc-devel] Improving Ref Counting

2005-02-27 Thread Uberto Barbini
> Thats a possibility, but then you do not win anything by running it in a > thread. It could as well be run when a memory allocation is done, and then > as a subroutine. No, because the background thread get more time slices during idle moments and none at all during intense computations. GC hav

Re: [fpc-devel] InstantObjects

2005-02-27 Thread Uberto Barbini
> > I almost finished the porting of the core part of IO to fpc. > > I am *very* interested in seeing this working :) Nice to know! ;) > > I added bugs for the (few) function I had to rewrite or modify passing > > from Delphi to fpc. > > > > Anyway I'm still in trouble with streams. > > IO use de

[fpc-devel] InstantObjects

2005-02-27 Thread Uberto Barbini
I almost finished the porting of the core part of IO to fpc. I added bugs for the (few) function I had to rewrite or modify passing from Delphi to fpc. Anyway I'm still in trouble with streams. IO use descendants of TRead and TWrite like files. It goes back when an error rises and it needs readi

Re: [fpc-devel] Improving Ref Counting

2005-02-27 Thread Uberto Barbini
On Sunday 27 February 2005 15:29, Peter Vreman wrote: > Why are you looking at GC/Refcounting when the problem is the try..finally? > It is better to rewrite the try..finally code using the C++ ABI for > exception handling. +1 and it'd be benefical to all applications. Bye Uberto ___

Re: [fpc-devel] Improving Ref Counting

2005-02-27 Thread Uberto Barbini
> Afaik the simplest GC's need to have exclusive access to the heap and > stack, so it cant be run in parallell with ordinary processing. What you mean with parallell? I imagine that it's protected into a critical section. Anyway I'm not a GC expert but there's tons of stuff on GC theories and al

Re: [fpc-devel] Improving Ref Counting

2005-02-27 Thread Uberto Barbini
> A more simplictic alternative could be to have objects (declared to be > managed) managed in the same way as ansistrings. This is exactly what delphi do with interfaces, the result is an orrible mess, and passing them as parameters a nightmare. Refcounted objects are possible, python used them

Re: [fpc-devel] Improving Ref Counting

2005-02-27 Thread Uberto Barbini
> A GC needs to trace an object's references to see if anything still > points to it. How else can it decide whether an object is no longer in use? Yes, this is right, but it hasn't to decide if reference are valid or invalid. Moreover also the simpliest GC techniques (mark'n'swift) are quite slow

Re: [fpc-devel] Improving Ref Counting

2005-02-27 Thread Uberto Barbini
> > I also thought immediately what Uberto already said: how do you recognize > > a valid/invalid reference without accessing memory that is invalid in the > > mean time. > > How does a GC do this? It would have the same problem? A GC dont' try to recognize a valid/invalid reference, it is invoked

Re: [fpc-devel] Improving Ref Counting

2005-02-27 Thread Uberto Barbini
> 6) Whenever an exception is thrown, wait until its either handled or > fully propagated and then perform some garbage collection. (traverse the > single linked list of all managed objects and for each object check > whether anything that references it is still valid and delete if > appropriate).

Re: [fpc-devel] compiling fpc from cvs

2005-02-22 Thread Uberto Barbini
On Tuesday 22 February 2005 08:09, Peter Vreman wrote: > > So let's assume I'm a completely idiot and I have downloaded fpc from cvs > > to > > compile it on a windows system. Do I have any hope to compile it? > > Install fpc 1.0.10 > Download fpc from cvs > Start cmd.exe > Go to the new fpc direct

Re: [fpc-devel] compiling fpc from cvs

2005-02-21 Thread Uberto Barbini
On Monday 21 February 2005 21:45, Marco van de Voort wrote: > > Where can I find info about compiling fpc from cvs? > > http://www.stack.nl/~marcov/buildfaq.pdf If there ain't a simple way to compile on win then study all these 24 pages, I think I'll surrender! ;)) Anyway, page 5 you describe th

Re: [fpc-devel] compiling fpc from cvs

2005-02-21 Thread Uberto Barbini
On Monday 21 February 2005 21:04, Uberto Barbini wrote: > Where can I find info about compiling fpc from cvs? > I browsed doc and faq but I wasn't able to understand exactly where to > start. BTW today's daily win bin snapshot doesn't run (segmentation fault > in install

[fpc-devel] compiling fpc from cvs

2005-02-21 Thread Uberto Barbini
Where can I find info about compiling fpc from cvs? I browsed doc and faq but I wasn't able to understand exactly where to start. BTW today's daily win bin snapshot doesn't run (segmentation fault in install.exe). Bye Uberto ___ fpc-devel maillist -

Re: [fpc-devel] InstantObjects

2005-02-19 Thread Uberto Barbini
On Tuesday 01 February 2005 10:11, Marco van de Voort wrote: > > On Tue, 1 Feb 2005 [EMAIL PROTECTED] wrote: > > > Classes: > > > 1 - fpc lacks a HexToBin and BinToHex functions. [It has them but only > > > as private methods of TParser] > > > > These functions are in sysutils or strutils. They hav

Re: [fpc-devel] InstantObjects

2005-02-19 Thread Uberto Barbini
> > As you can see there's nothing really serious, I can contribute code if > > you tell me. > > I hope IO will be useful to fpc and lazarus projects. > > I'm sure it will be. Feel free to send patches to me for anything you > think needs fixing. Ok, now I'll download fpc from cvs and I'll create

[fpc-devel]Amd64?

2004-08-26 Thread Uberto Barbini
Hi, is it possible to compile pascal programs for amd64? We have a Delphi program that needs more of 3Gb ram user space... it'd be a perfect excuse to begin to use fpc at work. Bye Uberto ___ fpc-devel maillist - [EMAIL PROTECTED] http://lists.freepa

[fpc-devel] Eclipse for FPC (?)

2003-11-17 Thread Uberto Barbini (Gamasoft)
Hi, did anyone ever consider to create a FPC plugin for Eclipse? I'm using Eclipse at work and it's by far the best ide I ever seen, it's also very easy to enhance it and language neutral, although a such plugin is not really trivial. Bye Uberto ___