[fpc-devel] arch x64 - type of expresion result

2011-04-17 Thread darekm
Hi I have program procedure fun(a : integer);overload; begin write('integer ',a); end; procedure fun(a:int64);overload; begin write('int64 ',a); end; var w : word; begin w:=3; fun(w+3); end; Why on arch x64 program write 'int64 6' but on i386 'integer 6' Where I can read about this b

[fpc-devel] Android native application with local webserver

2011-04-13 Thread darekm
Hello I finish first stage to move my webapp as native Android application. Its consists one java file with declaration webWiew, and all rest, written in FPC, is build as library. Of course start is thought jni, but after that http server (based on Synapse) is started, and build in browser can play

[fpc-devel] [PATCH] XMLCFG AnsiString<>DOMString conversion

2010-11-03 Thread darekm
When I using xmlCfg unit i found problem with storing literals in arbitrary code page. XMLCfg perform automatic conversion with omit some chars. I've change it to use utf8string instead of. Maybe this patch will be interesting. Index: packages/fcl-xml/src/xmlcfg.pp

Re: [fpc-devel] fpc on arm-linux-uclibc and OABI

2010-03-01 Thread darekm
> /usr/local/lib/fpc/2.5.1/units/arm-linux/rtl/system.o: In function > `SYSTEM_SYSTEM_EXIT': > system.pp:(.text.n_system_system_exit+0x10): undefined reference to > `_haltproc_eabi' > noy1.lpr(23) Error: Error while linking > noy1.lpr(23) Fatal: There were 1 errors compiling module, stopping > Fata

[fpc-devel] generics with is operator

2010-01-24 Thread darekm
Hi I found problem with is operator using with generics This program is not compile error is: Class or Object types "TList$LongInt" and "TList$ShortString" are not related But I think it should be possible {$mode objfpc} type generic TList<_T>=class(TObject) public data : _T; pr

Re: [fpc-devel] FormatFloat

2009-12-30 Thread darekm
> > On 30 Dec 2009, at 18:25, dar...@emadar.com wrote: > >>> >>> On 30 Dec 2009, at 17:27, dar...@emadar.com wrote: >>> this program: var d1,d2 : double; >>d1,d2 : extended; begin d1:=105; d2:=1.05e2; writeln(d1-d2); end; >>> >>> result: 6.9388939907E-18

Re: [fpc-devel] FormatFloat

2009-12-30 Thread darekm
> > On 30 Dec 2009, at 16:20, dar...@emadar.com wrote: > >> I try to resolve http://bugs.freepascal.org/view.php?id=15308 >> problem is with str >> str(1.0:10,s); writeln(s); >> str(1.05:10,s);writeln(s); >> str(1.05e2,s);writeln(s); >> give results (: >> >> 1.000E+00 >> 1.0E+ >> 1.0500

Re: [fpc-devel] FormatFloat

2009-12-30 Thread darekm
> > On 30 Dec 2009, at 17:27, dar...@emadar.com wrote: > >> this program: >> var >> d1,d2 : double; d1,d2 : extended; >> begin >> d1:=105; >> d2:=1.05e2; >> writeln(d1-d2); >> end; > > That's only part of a program, it does not compile. You may have typed it > in your mail and accidentally

Re: [fpc-devel] FormatFloat

2009-12-30 Thread darekm
> dar...@emadar.com escreveu: >> I try to resolve http://bugs.freepascal.org/view.php?id=15308 >> > > Is not that fixed by svn rev 14490? > >> problem is with str >> str(1.0:10,s); writeln(s); >> str(1.05:10,s);writeln(s); >> str(1.05e2,s);writeln(s); >> give results (: >> >> 1.000E+00 >> 1

Re: [fpc-devel] FormatFloat

2009-12-30 Thread darekm
> > On 30 Dec 2009, at 16:20, dar...@emadar.com wrote: > >> I try to resolve http://bugs.freepascal.org/view.php?id=15308 >> problem is with str >> str(1.0:10,s); writeln(s); >> str(1.05:10,s);writeln(s); >> str(1.05e2,s);writeln(s); >> give results (: >> >> 1.000E+00 >> 1.0E+ >> 1.0500

[fpc-devel] FormatFloat

2009-12-30 Thread darekm
I try to resolve http://bugs.freepascal.org/view.php?id=15308 problem is with str str(1.0:10,s); writeln(s); str(1.05:10,s);writeln(s); str(1.05e2,s);writeln(s); give results (: 1.000E+00 1.0E+ 1.050E+0002 ^^// moving where I can find implementation of str Darek __

Re: [fpc-devel] how to build FPC for armel

2009-12-12 Thread darekm
> > On 12 Dec 2009, at 15:38, dar...@emadar.com wrote: > >> /home/darek2008/fpcarm/arm-linux-uclibc/bin/ld:./link.res: file format >> not >> recognized; treating as linker script >> /home/darek2008/fpcarm/arm-linux-uclibc/bin/ld:./link.res:289: syntax >> error I found the error link.res should be

Re: [fpc-devel] how to build FPC for armel

2009-12-12 Thread darekm
> > On 12 Dec 2009, at 01:14, dar...@emadar.com wrote: > >> this is good (mentioned bug goes off) configuration >> make crossinstall CPU_TARGET=arm OS_TARGET=linux >> CROSSBINDIR=/home/darek2008/fpcarm/arm-linux-uclibc/bin >> CROSSOPT="-dFPC_ARMEL -CfSOFT -gl -O2" >> INSTALL_PREFIX=/home/darek2008/

[fpc-devel] how to build FPC for armel

2009-12-11 Thread darekm
To resolve problem from http://bugs.freepascal.org/view.php?id=15312 about EABI binares (compiler says that is EABI, but its not EABI, -CaEABI and FPC_ARMEL are enable) I try to build FPC for Target OS: Linux for ARMEL (as Jonas say) But all try was wrong CPU_TARGET=armel : not build CPU_TARG

[fpc-devel] SSE in FPC

2008-11-28 Thread darekm
Hi Are in FPC some instruction set contains streaming SIMD (SSE) like in GCC: http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/X86-Built_002din-Functions.html or in Microsoft Visual http://msdn.microsoft.com/en-us/library/kcwz153a(VS.80).aspx -- Darek ___

Re: [fpc-devel] LockFree Queue algorithm

2008-01-29 Thread DarekM
Michael Schnell pisze: I have to think a bit more about the locking mechanism you suggest. I;ve added some links on my site I intended to use a single word as a semaphore to protect the access to the structure and fall back to an OS-based wait (e.g. by TCriticalSection) if it can't be acqui

Re: [fpc-devel] LockFree Queue algorithm

2008-01-27 Thread DarekM
Florian Klaempfl pisze: An if is unimportant, more important is the number of locked operations, especially on multi core systems they might eat hundreds of clock cycles. There are atomic operations, the should not eat much more than ordinal INC or ADD, and second CAS is invoked only one ti

Re: [fpc-devel] LockFree Queue algorithm

2008-01-27 Thread DarekM
Martin Friebe pisze: You will need to test it, but the following may also work procedure tFlQueue.push(const tm : tNodeQueue); var newTemp, lastTail, newTail : integer; begin newTemp := temp; while newTemp >= fsize begin // if it is true, every thread is going to attempt to fix it, befo

Re: [fpc-devel] LockFree Queue algorithm

2008-01-27 Thread DarekM
Martin Friebe pisze: What about a long running (eg daemon) application? If temp/tail hits the upper boundary of Integer? (If I understand it correctly) I don't know if interlockedIncrement gives a boundary error, but if not, it still fails. - With currently integer, it gets a negative value, on

Re: [fpc-devel] LockFree Queue algorithm

2008-01-27 Thread DarekM
Micha Nelissen pisze: DarekM wrote: Hi This is my proposition of algorithm and its implementing multithreaded FIFO queue without lock. Hmm 'Push' and 'Pop' sound like a stack, but the implementation seems to implement a FIFO indeed, with a head and tail. It s

[fpc-devel] LockFree Queue algorithm

2008-01-26 Thread DarekM
Hi This is my proposition of algorithm and its implementing multithreaded FIFO queue without lock. First use array of pointers to handle messages. I've use it in my program, it works. I think it may by useful. site: http://www.emadar.com/fpc/lockfree.htm source: http://www.emadar.com/fpc/flqueu

Re: [fpc-devel] improvement SSE and string+char

2007-12-09 Thread DarekM
Florian Klaempfl pisze: DarekM schrieb: Hi I've notice two improvement 1. equation in SSE # Var Zr located in register mreg0md # Var Zi located in register mreg1md # Var Ti located in register mreg3md # Var Tr located in register mreg2md # [39] Tr := Zr * Zr; movsd%xmm0,

[fpc-devel] improvement SSE and string+char

2007-12-09 Thread DarekM
Hi I've notice two improvement 1. equation in SSE # Var Zr located in register mreg0md # Var Zi located in register mreg1md # Var Ti located in register mreg3md # Var Tr located in register mreg2md # [39] Tr := Zr * Zr; movsd%xmm0,%xmm4 mulsd%xmm0,%xmm4 movsd%xmm4,%xmm2 it c

[fpc-devel] shootout - mandelbrot

2007-12-09 Thread DarekM
Hi In attachment is my proposition of mandelbrot program. It is about 5% faster. changed: 1. output result 2. condition of limit move inner to loop Darek { The Computer Language Shootout http://shootout.alioth.debian.org contributed by Ales Katona modified by Vincent Snijders } prog

[fpc-devel] Benchmark for FreePascal - test

2005-12-14 Thread darekM
I've done some test there are 5 version of revcom test 1. original 2. done bigger buffer 3 use tTextSrteam 4+ 5 in place of readln i've pass const string 6 only one set string variable 7 no move- I've rem MOVE procedure I've repeat test in program, because time of test are vary (I don't know w

Re: [fpc-devel] Benchmark for FreePascal

2005-12-14 Thread darekM
Marco van de Voort napisał(a): Since the maillists are a bit irregular, I want to repeat the point that the relative slowliness of the revcomp benchmark is the repeated realloc, not the reading of the textfile (though a small settextbuf might improve it a bit). Its not true. Realloc is invo

Re: [fpc-devel] Benchmark for FreePascal

2005-12-14 Thread darekM
L505 napisał(a): Neat! I'm testing on a Celeron 400 using Winblows 2000.. Do you have the source code for test 7 so we can run it through different CPU architectures? There was attached yours modified project1 and textstream: unit with implementation tTextStream (w/o assembler) Darek __

Re: [fpc-devel] Benchmark for FreePascal

2005-12-12 Thread darekM
Hi My CPU war Welcome to the CPU war for StrLoadFile.. Please wait... test 1 (char) execution time: 1862654 test 2 (blockread 1) execution time: 27080 test 3 (blockread fsize) execution time: 46633 test 7 (blockread tHandle) execution time: 18569 test 4 (tStringList) execution time: 364999 test

Re: [fpc-devel] Benchmark for FreePascal

2005-12-12 Thread darekM
Marco van de Voort napisał(a): On Sun, 11 Dec 2005, darekM wrote: But why it is in separated unit, nobody know about it (or to few). F.e. Lazarus has own implementation of buffering. Lazarus had to do a long time with FPC 1.0.x _and_ 2.0.x. Not all artefacts of that

Re: [fpc-devel] Benchmark for FreePascal

2005-12-12 Thread darekM
Michael Van Canneyt napisał(a): On Sun, 11 Dec 2005, darekM wrote: Michael Van Canneyt napisa(a): Why not descend. Why not exceed tFileStream, its natural. I want read text file in the same way like binary file. Because then you must also descend THandlestream, TPipeStream, TIOStream

Re: [fpc-devel] Benchmark for FreePascal

2005-12-11 Thread darekM
Michael Van Canneyt napisał(a): On Sat, 10 Dec 2005, darekM wrote: Hi I've tested some of benchmark on http://shootout.alioth.debian.org/ I've see that reverse-complement benchmark <http://shootout.alioth.debian.org/benchmark.php?test=revcomp&lang=all> for FPC is v

Re: [fpc-devel] Benchmark for FreePascal

2005-12-11 Thread darekM
Daniël Mantione napisał(a): Op Sat, 10 Dec 2005, schreef darekM: Hi I've tested some of benchmark on http://shootout.alioth.debian.org/ I've see that reverse-complement benchmark <http://shootout.alioth.debian.org/benchmark.php?test=revcomp&lang=all> for FPC is v

[fpc-devel] Benchmark for FreePascal

2005-12-10 Thread darekM
Hi I've tested some of benchmark on http://shootout.alioth.debian.org/ I've see that reverse-complement benchmark for FPC is very slow. I discover, that problem is with readln, that function consume about 90% of time. B

Re: [fpc-devel]fpcmake

2003-10-12 Thread darekM
I've presented small improve in fcpmake, witch can modified all MAKE files in FCP project, no one must use MAKE for own project but to recompile COMPILATOR better use it and with my patch even simpler (I think so). Darek PS. I'm sorry for my last post in HTML format. - Original Message

[fpc-devel]fpcmake

2003-10-11 Thread darekM
If we change FPCMAKE to generate code like this: - #add dir of make.exe to PATH override PATH +=$(dir $(MAKE))    <-override PATH:=$(subst \,/,$(PATH))#$(error $(PATH))ifeq ($(findstring ;,$(PATH)),)inUnix=1SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))

Re: [fpc-devel]changes of THandle

2003-10-10 Thread darekM
I've tried to recompile COMPILATOR I think I've found bugs: in FPC.PP line 67 string --> shortstring procedure findexe(var ppcbin:shortstring); in PPUDUMP.PP line 235 string --> shortstring function hexstr(val : cardinal;cnt : byte) : shortstring; line 227 string --> shortstring function HexB(b:b

[fpc-devel]changes of THandle

2003-10-09 Thread darekM
In the new version of SYSTEM.PP there is a declared variable THandle I think there isn't necessary to duplicate declarations in other units like CLASSES : classesh.inc ---> move THandle to section with TPoint SYSUTILS : posix\sysutils.pp ---> change to type THandle = type system.thandle;

Re: [fpc-devel]proposition changes in unit TYPES

2003-10-06 Thread darekM
- Original Message - From: "Peter Vreman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 02, 2003 2:04 PM Subject: Re: [fpc-devel]proposition changes in unit TYPES > > I try use FPC 1.1 for Windows > > and I have problem with some of types declarations > > for example

[fpc-devel]Maininstance - bad type definition

2003-10-05 Thread darekM
In SYSTEM variable hprevinst, HInstance, MainInstance: longint; must be CARDINAL like in WINDOWS My suggest is to define THandle in unit System ___ fpc-devel maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fp

[fpc-devel]proposition changes in unit TYPES

2003-10-02 Thread darekM
I try use FPC 1.1 for Windowsand I have problem with some of types declarationsfor example THandle is declared many timesin WINDOWS.PP (base.inc) is:  Thandle= HANDLE = type Cardinal;in CLASSES (classesh.inc)  THANDLE = longint;in SYSUTILSwith other types like POINT RECT I have similar probl