Re: [fpc-devel] Project Idea: Mini-FPC

2011-09-10 Thread Mattias Gaertner
On Sat, 10 Sep 2011 16:51:36 +0200 (CEST) Michael Van Canneyt wrote: > > > On Sat, 10 Sep 2011, Jeff Duntemann wrote: > > > If a "mini-FPC" were to be created to help popularize the Pascal language > > and > > get beginners interested and up to speed, it would be more useful to > > provide

Re: [fpc-devel] Unicode support (yet again)

2011-09-14 Thread Mattias Gaertner
On Wed, 14 Sep 2011 08:50:22 +0200 Felipe Monteiro de Carvalho wrote: > On Wed, Sep 14, 2011 at 5:50 AM, Martin Schreiber wrote: > > Linux expects an array of bytes in filenames (no encoding, no utf-8) AFAIK. > > That's a nice theory, but: It's more than theory. You can use file names under Li

Re: [fpc-devel] Unicode support (yet again)

2011-09-14 Thread Mattias Gaertner
  Felipe Monteiro de Carvalho hat am 14. September 2011 um 10:51 geschrieben: > On Wed, Sep 14, 2011 at 9:45 AM, Mattias Gaertner > wrote: > > It's more than theory. > > You can use file names under Linux that are no valid UTF-8. > > At work I see it every we

Re: [fpc-devel] Unicode support (yet again)

2011-09-15 Thread Mattias Gaertner
On Thu, 15 Sep 2011 17:21:47 +0200 Felipe Monteiro de Carvalho wrote: > On Thu, Sep 15, 2011 at 11:15 AM, Graeme Geldenhuys > wrote: > > in fpGUI: > >   UTF8Copy(...) > >   UTF8CharAtByte(...) > > > > in fpGUI: > >  Length(...)   result is in bytes > >  UTF8Length(...)  result is in "characters"

Re: [fpc-devel] Unicode support (yet again)

2011-09-15 Thread Mattias Gaertner
On Thu, 15 Sep 2011 19:00:35 +0200 Felipe Monteiro de Carvalho wrote: > On Thu, Sep 15, 2011 at 6:01 PM, Mattias Gaertner > wrote: > > It seems to me, that all of the above functions and classes could be > > solved for applications using UTF-8 ansistrings with a special >

Re: [fpc-devel] Unicode support (yet again)

2011-09-15 Thread Mattias Gaertner
On Thu, 15 Sep 2011 22:51:36 +0200 Graeme Geldenhuys wrote: > On 15 September 2011 18:43, Hans-Peter Diettrich wrote: > > > > UTF-8 is much more complicated to handle by the user, than e.g. UTF-16. > > > I don't see this. Please give an example? Please don't. This was discussed a trillion tim

Re: [fpc-devel] building fpc / fpmake and multicore cpu ?

2011-10-01 Thread Mattias Gaertner
On Sat, 01 Oct 2011 09:24:08 +0100 Martin wrote: > I noticed, when I build fpc, then I get cpu usage between 70% and 100%. > So it appears that both cores of my pentium are used. No, it can simply mean that the OS moves the process around, which can for example reduce cooling power. > But wh

Re: [fpc-devel] new string - question on usage

2011-10-13 Thread Mattias Gaertner
  Michael Schnell hat am 13. Oktober 2011 um 10:18 geschrieben: > On 10/13/2011 04:27 AM, Hans-Peter Diettrich wrote: > > > > I don't see a speed penalty in using UTF-16. In contrast to UTF-8 it > > simplifies (and consequently speeds up) all string handling. > > If doing code  heavily doing G

[fpc-devel] StrToHostAddr

2011-11-05 Thread Mattias Gaertner
Hi all, The function StrToHostAddr in unit sockets returns for '127.0.0.1' on a little endian system the in_addr: s_bytes[1]=1 s_bytes[2]=0 s_bytes[3]=0 s_bytes[4]=127 Is this correct? The documentation for HostAddrToStr writes "Basically, it is the same as NetAddrToStr, but with the bytes in co

Re: [fpc-devel] StrToHostAddr

2011-11-05 Thread Mattias Gaertner
On Sat, 5 Nov 2011 18:09:27 +0100 Jeppe Græsdal Johansen wrote: > Den 05-11-2011 18:01, Mattias Gaertner skrev: > > This sounds as if a Net and a Host uses different ordered bytes, which > > makes the whole point of an "and" mask pointless. > Network order is alway

Re: [fpc-devel] TFPCustomCanvas Expanded Clipping

2011-11-30 Thread Mattias Gaertner
  Hans-Peter Diettrich hat am 30. November 2011 um 15:24 geschrieben: > Sven Barth schrieb: > > >> I'm not sure how far non-rectangular clipping regions are supported by > >> all widgetsets, and wouldn't rely on such a capability. > > > > You are aware that TFPCustomCanvas can be used for wid

Re: [fpc-devel] RTL docs missing links

2011-12-02 Thread Mattias Gaertner
Graeme Geldenhuys hat am 2. Dezember 2011 um 08:05 geschrieben: >[...] > Excellent documentation means nothing if you can search and find something.  You make every developer of search tools/engines proud.    There is some Confucius' wisdom in your statement. The opposite with "can't" is true

Re: [fpc-devel] New FPC JVM snapshot: Android support

2011-12-12 Thread Mattias Gaertner
On Mon, 12 Dec 2011 22:04:55 +0200 ik wrote: > On Mon, Dec 12, 2011 at 21:58, Andrew Haines wrote: > > > On 12/12/11 14:55, ik wrote: > > > I'm trying to build it from the svn repo: > > > http://svn.freepascal.org/svn/fpc/branches/jvmbackend/ . > > > I get the following error: > > > > > > -

Re: [fpc-devel] MakeSkel and FPDoc projects

2011-12-17 Thread Mattias Gaertner
On Sat, 17 Dec 2011 15:41:32 +0100 Hans-Peter Diettrich wrote: >[...] > The documentation related features could become Lazarus plug-ins, of > course, similar to or as an extension of the FPDoc Editor window. But > this already existing support makes it *harder* to add further > functionality

Re: [fpc-devel] MakeSkel and FPDoc projects

2011-12-18 Thread Mattias Gaertner
On Sat, 17 Dec 2011 17:06:21 +0100 Hans-Peter Diettrich wrote: > Mattias Gaertner schrieb: > > On Sat, 17 Dec 2011 15:41:32 +0100 > > Hans-Peter Diettrich wrote: > > > >> [...] > >> The documentation related features could become Lazarus plug-ins, of >

Re: [fpc-devel] New FPC JVM snapshot: Android support

2011-12-19 Thread Mattias Gaertner
On Sun, 18 Dec 2011 13:45:07 +0100 Jonas Maebe wrote: > > On 18 Dec 2011, at 13:22, Sven Barth wrote: >[...] > > Yes, that was indeed a bit complicated, but this way I might be able to use > > the JVM compiler in Lazarus easily for the creation of Android application > > (though Lazarus first n

Re: [fpc-devel] New FPC JVM snapshot: Android support

2011-12-20 Thread Mattias Gaertner
On Tue, 20 Dec 2011 12:51:29 +0400 Alexander Shishkin wrote: > 20.12.2011 4:00, Paul Ishenin пишет: > > 18.12.2011 20:45, Jonas Maebe wrote: > > > >> And final fields. > > > > Final methods can't be overriden in the descendants. But what are final > > fields for? > > > > > It`s something like wri

Re: [fpc-devel] New FPC JVM snapshot: Android support

2011-12-20 Thread Mattias Gaertner
On Tue, 20 Dec 2011 11:12:12 +0100 Jonas Maebe wrote: > > On 20 Dec 2011, at 10:05, Sven Barth wrote: > > > You also might want to read this: > > http://wiki.freepascal.org/FPC_JVM/Language#New_language_features > > Looking over the Lazarus commit log, I noticed a small error on that > page

[fpc-devel] fpc translations

2011-12-23 Thread Mattias Gaertner
Hi devels, How does the localization of fpc work? Is there only the -Fr parameter or is there more? Does the compiler convert the encoding? I guess the files in fpc/compiler/msg are used. For example for German it uses errord.msg. What encoding has the file errord.msg? Mattias _

[fpc-devel] What is a "static" function?

2011-12-26 Thread Mattias Gaertner
Hi, What is a "static" function? class function red_(para1: jint): jint; static; external name 'red'; overload; see jvmbackend/rtl/android/jvm/androidr14.inc line 4027 Mattias ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists

Re: [fpc-devel] What is a "static" function?

2011-12-26 Thread Mattias Gaertner
On Mon, 26 Dec 2011 17:15:45 +0100 Jonas Maebe wrote: > > On 26 Dec 2011, at 16:34, Mattias Gaertner wrote: > > > What is a "static" function? > > > >class function red_(para1: jint): jint; static; external name 'red'; > > overload

[fpc-devel] encoding for file names in fpc messages

2011-12-28 Thread Mattias Gaertner
Hi, What encoding does fpc use for file names in messages? Mattias ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

[fpc-devel] FPC download link broken?

2012-01-12 Thread Mattias Gaertner
The following fpc download page contains a link to an i686 rpm, but the server has only i386 files: http://www.freepascal.org/down/i386/linux-netherlands.var I came from here clicking on Netherlands: http://www.freepascal.org/down/i386/linux.var from here clicking on Linux/i386: http://www.freep

Re: [fpc-devel] FPDoc improvements

2012-01-27 Thread Mattias Gaertner
On Fri, 27 Jan 2012 09:41:42 +0100 (CET) michael.vancann...@wisa.be wrote: >[...] > For the --input-dir there is an extra reason: the order of files is important. > Just like in the compiler, which must compile dependent units first, fpdoc > should first document dependent units. It currently does

Re: [fpc-devel] Documentation contribution

2012-02-10 Thread Mattias Gaertner
Hans-Peter Diettrich hat am 10. Februar 2012 um 12:32 geschrieben: > Again I found almost all of my notes removed from the LCL documentation. > If this is how my work is honored, I see no reason why I should spend > any more time with contributing to the Lazarus documentation :-( Have you look

[fpc-devel] copy for PChar

2012-02-19 Thread Mattias Gaertner
Hi, When I use "copy" on a PChar (e.g. copy(p,1,1)), it is very slow, because the compiler converts the PChar to a string. Is there already a function for PChar? Can an overloaded version of copy be added? Mattias ___ fpc-devel maillist - fpc-devel@

Re: [fpc-devel] copy for PChar

2012-02-19 Thread Mattias Gaertner
On Sun, 19 Feb 2012 20:01:11 +0400 Sergei Gorelkin wrote: > 19.02.2012 18:38, Mattias Gaertner пишет: > > Hi, > > > > When I use "copy" on a PChar (e.g. copy(p,1,1)), it is very slow, > > because the compiler converts the PChar to a string. > > >

Re: [fpc-devel] copy for PChar

2012-02-19 Thread Mattias Gaertner
On Sun, 19 Feb 2012 17:31:48 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: > In our previous episode, Mattias Gaertner said: > > When I use "copy" on a PChar (e.g. copy(p,1,1)), it is very slow, > > because the compiler converts the PChar to a string. &g

Re: [fpc-devel] MakeSkel problem with operators?

2012-02-20 Thread Mattias Gaertner
On Mon, 20 Feb 2012 14:00:44 +0100 (CET) michael.vancann...@wisa.be wrote: > > > On Mon, 20 Feb 2012, Hans-Peter Diettrich wrote: > > > In an attempt to check the yet undocumented FCL units for use with FPDoc > > and > > MakeSkel, I got an error in the created skeleton for gmp: > > > > > >

Re: [fpc-devel] MakeSkel problem with operators?

2012-02-20 Thread Mattias Gaertner
On Mon, 20 Feb 2012 14:04:49 +0100 Hans-Peter Diettrich wrote: > Hans-Peter Diettrich schrieb: > > > Hint: FPDoc Editor escapes these characters already :-) > > But it doesn't insert an space after "operator": > The space is not required in Free Pascal. > This might result in proble

Re: [fpc-devel] TBytes

2012-02-28 Thread Mattias Gaertner
On Tue, 28 Feb 2012 09:23:34 +0100 Sven Barth wrote: > Am 28.02.2012 05:04, schrieb Martin Schreiber: > > Hi, > > I read that we should use TBytes instead of AnsiString in order to > > implement combined binary/character buffers with automatic memory > > management. With AnsiString we used setlen

Re: [fpc-devel] New less verbose compilation of trunk

2012-03-07 Thread Mattias Gaertner
Marco van de Voort hat am 7. März 2012 um 11:27 geschrieben: > In our previous episode, Graeme Geldenhuys said: > > PS: > > Adding any more (if possible) parallel compilation support would be > > awesome too. This already saves me over 1 minute in compile time on my > > quad core. Yes, I hate it

Re: [fpc-devel] New less verbose compilation of trunk

2012-03-07 Thread Mattias Gaertner
Sven Barth hat am 7. März 2012 um 14:04 geschrieben: > Am 07.03.2012 13:11, schrieb Henry Vermaak: > > On 07/03/12 12:02, Marco van de Voort wrote: > >> In our previous episode, Henry Vermaak said: > > PS: > > Adding any more (if possible) parallel compilation support would be > > aw

Re: [fpc-devel] Re: [Lazarus] How to iterate through a TAvgLvlTree

2012-03-22 Thread Mattias Gaertner
Marc Weustink hat am 22. März 2012 um 10:31 geschrieben: > Felipe Monteiro de Carvalho wrote: > > Can I add a routine to access the AvgLvlTree as an array? To make it a > > better substitute to TFPList in objects which offer an indirect > > interface to the internal list, such as TLazAccessibleO

Re: [fpc-devel] Are "C style operators" default or not?

2012-03-27 Thread Mattias Gaertner
On Tue, 27 Mar 2012 19:41:58 +1100 Alexander Klenin wrote: > On Tue, Mar 27, 2012 at 19:30, Mark Morgan Lloyd > wrote: > > Gennadiy Poryev wrote: > >> > >> Hi all, > >> > >> I’ve recently ran into weird problem with “C style operators”. Though the > >> story is about Lazarus, I thought I better

[fpc-devel] fpc trunk rev 20753 breaks compiling Lazarus

2012-04-09 Thread Mattias Gaertner
Hi, Is this already known: Free Pascal Compiler version 2.7.1-r1:20753 [2012/04/09] for x86_64 Copyright (c) 1993-2012 by Florian Klaempfl and others Target OS: Linux for x86-64 Compiling lazutils.pas Fatal: Compilation aborted An unhandled exception occurred at $0049808E: EAccessViolatio

[fpc-devel] ppcx64 -h crashes

2012-04-10 Thread Mattias Gaertner
Hi, fpc trunk 20752 fpc -v works fpc -? works ppcx64 -v crashes: Fatal: Compilation aborted An unhandled exception occurred at $004CC878: EAccessViolation: Access violation $004CC878 $004D022D $004D1920 $00421BB7 ppcx64 -? crashes: Fatal: Co

[fpc-devel] improving error message when forgot to use cthreads unit

2012-04-28 Thread Mattias Gaertner
Hi, When someone forgets to use the cthreads unit and creates a thread the exception message is: Semaphore init failed (possibly too many concurrent threads) Can this message be improved for unix? Can it check if the thread manager is valid and then emit something like Semaphore init failed (p

Re: [fpc-devel] improving error message when forgot to use cthreads unit

2012-04-28 Thread Mattias Gaertner
On Sat, 28 Apr 2012 10:52:08 +0200 (CEST) Michael Van Canneyt wrote: > > > On Sat, 28 Apr 2012, Mattias Gaertner wrote: > > > Hi, > > > > When someone forgets to use the cthreads unit and creates a thread the > > exception message is: > > &g

Re: [fpc-devel] improving error message when forgot to use cthreads unit

2012-04-29 Thread Mattias Gaertner
On Sat, 28 Apr 2012 11:11:08 +0200 Mattias Gaertner wrote: > On Sat, 28 Apr 2012 10:52:08 +0200 (CEST) > Michael Van Canneyt wrote: > > > > > > > On Sat, 28 Apr 2012, Mattias Gaertner wrote: > > > > > Hi, > > > > > > When someo

Re: [fpc-devel] Breaking change in FPC 2.6.1

2012-05-01 Thread Mattias Gaertner
On Tue, 01 May 2012 15:05:57 +0200 Sven Barth wrote: >[...] > You can locally disable warnings by using the $warn directive (not > documented yet it seems, but available in 2.6.0). > > It looks like this: > > {$warn MSGID (on|off|error)} > > * on: MSGID will be emitted as a warning > * off: M

Re: [fpc-devel] Breaking change in FPC 2.6.1

2012-05-02 Thread Mattias Gaertner
On Wed, 02 May 2012 18:49:13 +0800 Paul Ishenin wrote: > 02.05.12 18:18, Graeme Geldenhuys wrote: > > > So instead of jumping around with various delphi versions (a bit of D7 > > and a bit of 2009 etc), maybe start from the oldest delphi version > > (eg: D7) and move towards the newest? > > May

Re: [fpc-devel] Trolling about: Breaking change in FPC 2.6.1

2012-05-02 Thread Mattias Gaertner
Giuliano Colla hat am 2. Mai 2012 um 17:21 geschrieben: > Mattias Gaertner ha scritto: >[...] > > This is starting to become off-topic. >[...] > Breaking compatibility is something very similar to leaving an old lady > in the middle of the road. Now it's off topic.

[fpc-devel] Parallel procedures

2012-06-14 Thread Mattias Gaertner
Hi, FPC does not yet have parallel loops/procedures, but there is a unit that helps to create parallel procedures/methods (mtprocs). http://wiki.freepascal.org/Parallel_procedures I use this unit since 4 years in several of my projects, which run on linux, os x and windows. Not much was done on

Re: [fpc-devel] Parallel procedures

2012-06-15 Thread Mattias Gaertner
On Fri, 15 Jun 2012 11:39:15 +1100 Alexander Klenin wrote: > On Fri, Jun 15, 2012 at 9:39 AM, Mattias Gaertner > wrote: > > What do you think? > > > > Why not -- although IMO it would be much better to have some > lagnuage-level support > for thin

[fpc-devel] Obsolete wiki page?

2012-06-15 Thread Mattias Gaertner
This page looks pretty obsolete and has mislead someone to think FPC can not handle multithreading: http://wiki.lazarus.freepascal.org/Taking_advantage_of_multi_core/multi_threading_machines Maybe it should be deleted/erased or replaced with a link to the multithreading tutorial? Mattias

Re: [fpc-devel] Obsolete wiki page?

2012-06-15 Thread Mattias Gaertner
On Fri, 15 Jun 2012 17:31:41 +0200 (CEST) "Tomas Hajny" wrote: > On Fri, June 15, 2012 16:30, Mattias Gaertner wrote: > > This page looks pretty obsolete and has mislead someone to think FPC can > > not > > handle multithreading: > &g

Re: [fpc-devel] Class field reordering

2012-07-16 Thread Mattias Gaertner
On Mon, 16 Jul 2012 09:35:16 +0200 (CEST) michael.vancann...@wisa.be wrote: >[...] > > TComponent, TWriter, TReader for example because in > > MSEide+MSEgui one can place additional components in an inserted tframe and > > combination of inherited frames and inherited forms need special handling.

Re: [fpc-devel] Class field reordering

2012-07-16 Thread Mattias Gaertner
On Mon, 16 Jul 2012 16:18:49 +0200 Martin Schreiber wrote: > On Monday 16 July 2012 14:08:23 Mattias Gaertner wrote: > > On Mon, 16 Jul 2012 09:35:16 +0200 (CEST) > > > > michael.vancann...@wisa.be wrote: > > >[...] > > > > > > > TComponent, TWr

Re: [fpc-devel] Building a new node... came up with this new error

2012-07-24 Thread Mattias Gaertner
On Tue, 24 Jul 2012 16:51:16 -0500 Andrew Brunner wrote: > $ fpc > > Fatal: In options file /etc/fpc.cfg at line 29 unexpected \var{\#ENDIFs} > encountered > > Shell script that made cfg > > sudo $FPC_CONFIG -d basepath=$FPC_DIR -o $FPC_DIR/fpc.cfg > sudo $FPC_CONFIG -d basepath=$FPC_DIR -o /e

Re: [fpc-devel] Building a new node... came up with this new error

2012-07-25 Thread Mattias Gaertner
On Wed, 25 Jul 2012 13:51:12 +0200 Jonas Maebe wrote: > > Mattias Gaertner wrote on Wed, 25 Jul 2012: > > > See also: > > http://bugs.freepascal.org/view.php?id=22505 > > Fixed in r21969, it was caused by an error in f

Re: [fpc-devel] Unicode resource strings

2012-08-20 Thread Mattias Gaertner
On Mon, 20 Aug 2012 06:52:23 +0200 Martin Schreiber wrote: > On Sunday 19 August 2012 09:41:48 Paul Ishenin wrote: > > 19.08.12, 15:18, Martin Schreiber wrote: > > > Hi, > > > In 2008 and 2011 there were threads about FPC and Unicode resource > > > strings with the conclusion that FPC does not su

Re: [fpc-devel] Unicode resource strings

2012-08-20 Thread Mattias Gaertner
On Mon, 20 Aug 2012 10:56:32 +0200 Martin Schreiber wrote: > On Monday 20 August 2012 10:35:09 Mattias Gaertner wrote: > > > > Thanks Jonas and Paul. > > > Please permit a little comment. All what was missing for good multi > > > language Unicode suppo

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Mon, 20 Aug 2012 18:46:29 +0100 Hans-Peter Diettrich wrote: > Mattias Gaertner schrieb: > > > I guess most people would say that "good multi language Unicode support > > in FPC" requires a Unicode supporting RTL. > > Please clarify: *Unicode* or UTF-16 s

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Mon, 20 Aug 2012 20:56:46 +0200 Florian Klämpfl wrote: >[...] > The current situation is: > - either somebody starts to implement support for unicodestring being > utf-8 (or whatever) on linux in a compatible way with the current > approach, then 2.8.0 will use this > - nobody works on it, the

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 13:41:38 +0500 Ivanko B wrote: > But if you are such a UTF-16 (actually UCS-2 as > that is what MSEgui supports) fan > = > If Martin can implement UTF-16 (with surrogate pair) support in MSEgui > string units (and these units fully cover absenting code of FPC

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 09:23:30 +0100 Graeme Geldenhuys wrote: >[...] > > The conversion is done only when entering and exiting the OS / GUI framework > > calls. I understand this does not happen too often. > > I beg to differ. Maybe you can name some example. Concrete problems can be solved, abst

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 11:09:28 +0200 Michael Schnell wrote: > On 08/21/2012 10:32 AM, Mattias Gaertner wrote: > > IMO unicodestring should be the same on all platforms, because > > otherwise the character size switches per platform, which is hard to > > test and asking for

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 11:17:24 +0200 Aleksa Todorovic wrote: > On Tue, Aug 21, 2012 at 9:53 AM, Martin Schreiber wrote: > > Am 21.08.2012 09:31, schrieb Graeme Geldenhuys: > > > > > > Ehm, I did both. In the beginning MSEgui switched from Widestring to utf-8 > > encoded Ansistring because of the b

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 11:07:26 +0200 Michael Schnell wrote: > On 08/21/2012 10:17 AM, Graeme Geldenhuys wrote: > > if you want to do string comparisons, one option is to normalise the > > text before you do a compare. > Other than the conversion necessary with system-calls when a different > en

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 14:19:44 +0500 Ivanko B wrote: > I have implemented multiple text edit/display widgets that do plenty > of string manipulation... all based on the UTF-8 encoding. I have > suffered NO speed penalties. > > Sure no problems for GUI. But how about processing la

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 10:24:38 +0100 Graeme Geldenhuys wrote: > On 21 August 2012 10:01, Mattias Gaertner wrote: > >> > The conversion is done only when entering and exiting the OS / GUI > >> > framework > >> > calls. I understand this does not happ

Re: [fpc-devel] Unicode in the RTL (my ideas)

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 14:59:57 +0500 Ivanko B wrote: > For that reason there is no > speed difference between using a UTF-16 or UTF-8 encoded string. Both > can be coded equally efficient. > == > No in common, since UTF-8 needs error handling, replacing for > unconvertable bytes etc o

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 15:12:03 +0500 Ivanko B wrote: > Because these documents are in UTF-8 parsing is about 2-3 > times faster on these documents, searching is about 20 to 50% faster > = > Because You name is latin ANSISTRING "Mattias Gaertner" :) Actually m

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 12:09:52 +0100 Graeme Geldenhuys wrote: >[...] > >> This is a simple example, but look at all the conversions already. Now > >> if UnicodeString uses the correct encoding on each platform, the > >> conversions would be zero! > > > > No. On Windows you have to open UTF-8 files

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 14:22:17 +0200 Michael Schnell wrote: > On 08/21/2012 11:22 AM, Mattias Gaertner wrote: > > > > Lazarus does not force "unicodestring" to anything for the simple > > reason, that it does not use it. It only provides some functions f

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 14:05:33 +0200 "Ludo Brands" wrote: > > > > > Yes. But maybe these applications can be adapted easily. > > This discussion should be about the issues where the > > conversions matter and there is no simple workaround. It > > would be good if everyone who knows such a probl

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 13:53:14 +0100 Graeme Geldenhuys wrote: > On 21 August 2012 13:03, Michael Schnell wrote: > > With "not so often" I meant program runtime: it is usually not called in a > > close long running loop. > > I have a program that does exactly that... Loads files to do CRC > check

Re: [fpc-devel] Unicode in the RTL (my ideas)

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 18:15:07 +0500 Ivanko B wrote: > For example? > == > Sometime reading directory/file names. Sometime PostgreSQL produces > UTF-8 dumps with errors causing problems to converting to single byte > encoding (KOI8-R) - me have to use the "-c" switch of ICONV for such >

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 10:23:10 -0300 Marcos Douglas wrote: >[...] > >> I guess there is no good solution for TStrings. Whatever string type is > >> chosen, some programs will suffer. > > > > Why will some suffer? Simply default UnicodeString to the correct > > encoding on each platform, and no perf

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 15:11:56 +0100 Graeme Geldenhuys wrote: > On 21 August 2012 14:54, Marco van de Voort wrote: > > > > Doesn't sound wise. length(stringtype)=n should mean that the string takes > > sizeof(char)*n bytes. (give or take the #0#0) > > > I'm not sure what you are trying to accom

Re: [fpc-devel] Unicode in the RTL (my ideas)

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 19:48:12 +0500 Ivanko B wrote: > If you replied to this mail then you lost me. > I don't understand what problem of UTF-8 for the RTL you want to point > out. Can you explain again? > == > Substringing etc manipulation only via normalizing to fixed-char type > wh

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 15:38:31 +0200 "Ludo Brands" wrote: > > > > There is the large category of network apps. Most protocols > > are utf8 > > > or have a clear preference for utf8 (json for example). > > Databases are > > > an extension of that and have the additional complication that they

Re: [fpc-devel] Unicode resource strings

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 17:21:27 +0200 Sven Barth wrote: >[...] > > length returns the number of characters. > > UTF8Length the number of codepoints. > > There must also be a function to return the number of bytes. > > Does someone know the name? > > Length(s) * SizeOf(s[1]) Cheater. ;) Mattias __

Re: [fpc-devel] Unicode in the RTL (my ideas)

2012-08-22 Thread Mattias Gaertner
On Wed, 22 Aug 2012 09:34:33 +0500 Ivanko B wrote: > > Do you mean replacing a character in an UCS-2/UCS-4 string can be > > implemented more efficiently than in an UTF-8/UTF-16 string? > > > > Sure, just scan the string char by char as array elements and replace > as matches encounter. Like wor

Re: [fpc-devel] Unicode resource strings

2012-08-22 Thread Mattias Gaertner
On Wed, 22 Aug 2012 10:37:45 +0200 Michael Schnell wrote: > On 08/21/2012 02:53 PM, Mattias Gaertner wrote: > > If the FCL moves to another string or starts enforcing an encoding the > > LCL has to be adapted. > > I believe if "String" becomes a sequence of 16 b

Re: [fpc-devel] Unicode resource strings

2012-08-22 Thread Mattias Gaertner
On Wed, 22 Aug 2012 11:35:17 +0200 Michael Schnell wrote: > On 08/22/2012 10:56 AM, Mattias Gaertner wrote: > > The UTF-8 optimized functions needs UTF-16 versions. But why do you > > mean it needs a "really thorough rework"? > Guesswork :-) > > The LCL itself

Re: [fpc-devel] Unicode resource strings

2012-08-22 Thread Mattias Gaertner
On Wed, 22 Aug 2012 22:30:52 +0500 Ivanko B wrote: > Even if you would implement something like the Unix "find" or "ls" > programs, they would be more likely to be limited by I/O and all sorts > of file/directory attribute lookups than code page conversions of file > names. > > 1) I/

Re: [fpc-devel] But what /is/ a string?

2012-08-27 Thread Mattias Gaertner
On Sun, 26 Aug 2012 18:49:05 +0100 Graeme Geldenhuys wrote: > On 26/08/12 13:40, Marco van de Voort wrote: > > I doubt it. You maybe could (and probably would) in a new language, and have > > one single stringtype. > > > > FPC is closer to 20 stringtypes or types with autoconversions. > > > Thi

[fpc-devel] Lazarus 1.0 Release

2012-08-29 Thread Mattias Gaertner
The Lazarus team is glad to announce the release of: Lazarus 1.0 At this important stage the current team would like to thank all the past and current people who were involved in getting us here. * Thanks also go to the FPC team for providing the compiler that makes it all possibl

Re: [fpc-devel] Getting 2.6.1 from svn

2012-09-05 Thread Mattias Gaertner
Mark Morgan Lloyd hat am 5. September 2012 um 11:38 geschrieben: > Referring to http://www.freepascal.org/develop.var is there a reason why > the "Fixes to 2.6.x" section gives a URI for fixes_2_2 ? > > What's correct in this context- branches/fixes_2_6/ or > branches/fixes_2_6_0/ ? fixes_2_6 S

[fpc-devel] 2.7.1 rev 22341 causes crashes

2012-09-10 Thread Mattias Gaertner
Hi, Since revision 22341 various strange crashes appear in Lazarus and applications (Windows and Linux). See http://bugs.freepascal.org/view.php?id=22842 Log entry says: r22341 | florian | 2012-09-06 17:11:58 +0200 (Thu, 06 Sep 2012) | 1 line * when creating method pointers, put them into regis

Re: [fpc-devel] XML Parser problems with C-Data and Character Encoding

2012-09-27 Thread Mattias Gaertner
Andrew Brunner hat am 26. September 2012 um 21:21 geschrieben: >[...] > If c-data contains any character whose ordinal value is greater than 127 > the XML parser raises an exception. Have you tried setting the right encoding in the xml? >[...] > Is there a ANY case where dropping c-data is OK

Re: [fpc-devel] Local variable names and colision with attributes/properties names

2012-09-27 Thread Mattias Gaertner
On Thu, 27 Sep 2012 13:52:53 -0300 Marcos Douglas wrote: > On Thu, Sep 27, 2012 at 12:34 PM, Graeme Geldenhuys > wrote: > > On 2012-09-27 16:08, michael.vancann...@wisa.be wrote: > >> > >> The compiler helps you by forcing you to use a prefix in objfpc mode in > >> case you forgot. > > > > The c

[fpc-devel] Lazarus 1.0.2 Release

2012-10-10 Thread Mattias Gaertner
The Lazarus team is glad to announce the release of Lazarus 1.0.2. This is a bug fix release. Here is the list of changes: http://wiki.lazarus.freepascal.org/Lazarus_1.0_fixes_branch#Fixes_for_1.0.2_.28Merged.29 The release is available for download at the SourceForge download page: http://source

Re: [fpc-devel] XML Components

2012-11-02 Thread Mattias Gaertner
Andrew Brunner hat am 2. November 2012 um 13:59 geschrieben: > > > On Nov 2, 2012, at 7:24 AM, Michael Van Canneyt > wrote: > > > > > > > On Thu, 1 Nov 2012, Andrew Brunner wrote: > > > >> I'm having a problem getting the XML parser to read. > >> > >> Is there any way I can get the attached prog

Re: [fpc-devel] XML Components

2012-11-02 Thread Mattias Gaertner
Sergei Gorelkin hat am 2. November 2012 um 14:32 geschrieben: > 02.11.2012 17:08, Michael Van Canneyt пишет: > > > > > > On Fri, 2 Nov 2012, Andrew Brunner wrote: > > > >> > >> I think it would be a good solution and even prove faster in controlled > >> environments. Plus all > >> data is stored

[fpc-devel] Lazarus Release 1.0.4

2012-12-02 Thread Mattias Gaertner
The Lazarus team is glad to announce the release of Lazarus 1.0.4. This is a bug fix release. Here is the list of changes: http://wiki.lazarus.freepascal.org/Lazarus_1.0_fixes_branch#Fixes_for_1.0.4_.28Merged.29 The release is available for download at the SourceForge download page: http://source

Re: [fpc-devel] Unhelpful error message

2012-12-02 Thread Mattias Gaertner
On Sun, 02 Dec 2012 11:46:54 + Mark Morgan Lloyd wrote: > I've just had a slight problem compiling Lazarus where FPC was reporting > this: > > main.pp(5001,1) Fatal: Syntax error, "BEGIN" expected but "shl" found > > The reason was that I'd not spotted that Subversion had inserted a like l

Re: [fpc-devel] Forwarded message about FPC status

2012-12-21 Thread Mattias Gaertner
Graeme Geldenhuys hat am 21. Dezember 2012 um 13:49 geschrieben: > On 21/12/12 12:26, Michael Van Canneyt wrote: > > > > We know what to do. What we lack, is time. > > > > Status currently: > > > Thanks for the update. Most of what you mentioned was unknown to any > person outside the FPC core te

Re: [fpc-devel] Forwarded message about FPC statusy

2012-12-25 Thread Mattias Gaertner
On Tue, 25 Dec 2012 12:55:41 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: >[...] > The numbers Martin names (up till 10 times slower, even without linking) are > the numbers I have in mind too. IMHO denial without tests is unfair. Maybe the parallelization could be improved? This would

Re: [fpc-devel] Forwarded message about FPC statusy

2012-12-25 Thread Mattias Gaertner
On Tue, 25 Dec 2012 18:01:50 +0100 Florian Klaempfl wrote: > Am 25.12.2012 15:28, schrieb Mattias Gaertner: > > On Tue, 25 Dec 2012 12:55:41 +0100 (CET) > > mar...@stack.nl (Marco van de Voort) wrote: > > > >> [...] > >> The numbers Martin names (up til

Re: [fpc-devel] AMD & Intel CPUCount (was: Feature announcement: Extension of TThread's interface)

2012-12-27 Thread Mattias Gaertner
On Thu, 27 Dec 2012 23:06:41 +0100 Ewald wrote: > Right, since the /proc/cpuinfo (a) is not available on many platforms > and (b) has no standard output format, I decided to fix the half done > CPUID approach. Here it goes (note: don't shoot me if my assembly is a > bit weird, I've only learned p

Re: [fpc-devel] utf8 in 2.6.0

2013-01-05 Thread Mattias Gaertner
On Sat, 5 Jan 2013 13:06:42 + Frank Church wrote: >[...] > It is obvious that Unicode is not a simple topic and among FPC/Lazarus > developers/contributors,I suspect that few if any at all, have a detailed > grasp of how it all hangs together in the current state of implementation. > It bring

Re: [fpc-devel] for-in-index loop

2013-01-24 Thread Mattias Gaertner
On Thu, 24 Jan 2013 21:30:23 +0100 Florian Klämpfl wrote: > Am 24.01.2013 20:36, schrieb Alexander Klenin: > > That's debatable. > > As long as there is only some few line idea, there cannot debated much. > Just an example: what happens with i if I start to delete from s during > the for loop?

Re: [fpc-devel] for-in-index loop

2013-01-25 Thread Mattias Gaertner
Michael Van Canneyt hat am 25. Januar 2013 um 09:26 geschrieben: >[...] > You are totally missing the point. > > Finding a use case to justify a feature is not difficult. > I could probably find some more use cases to justify other 'missing features'. > > The point is: it is not because it can be

Re: [fpc-devel] for-in-index loop

2013-01-25 Thread Mattias Gaertner
Michael Schnell hat am 25. Januar 2013 um 10:35 geschrieben: > On 01/23/2013 12:54 AM, vrt277 wrote: > > > > Hi FPC team, > > > > There is good proposed extension of for-in loop on fpc wiki: get > > enumerator Position if available > >

Re: [fpc-devel] for-in-index loop

2013-01-25 Thread Mattias Gaertner
Mattias Gaertner hat am 25. Januar 2013 um 10:52 geschrieben: > > Michael Schnell hat am 25. Januar 2013 um 10:35 > geschrieben: > > > On 01/23/2013 12:54 AM, vrt277 wrote: > > > > > > Hi FPC team, > > > > > > There is good proposed exte

Re: [fpc-devel] for-in-index loop

2013-01-25 Thread Mattias Gaertner
Michael Schnell hat am 25. Januar 2013 um 11:09 geschrieben: > On 01/25/2013 10:52 AM, Mattias Gaertner wrote: > > The above UTF8 example misses some points > My question was about the want for a construct that allows for accessing > the n'th printable character in an

Re: [fpc-devel] for-in-index loop

2013-01-25 Thread Mattias Gaertner
Michael Schnell hat am 25. Januar 2013 um 11:22 geschrieben: > On 01/25/2013 11:12 AM, Michael Van Canneyt wrote: > > > > Pchar ? > > > You seem to miss my point: the n'th printable character in an utf-8 > coded string (may same be stored as a pchar or a string) starts at the > m'th byte (m>=n).

  1   2   3   4   5   6   7   8   >