[fpc-pascal] Simple TUI framework/RAD

2005-12-18 Thread Mihai
Hello,

Is there any simple TUI framework or RAD tool for Free Pascal?
I mean simpler than FV which is quite big for small console apps
with simple widgets (Linux console).

Thank you very much,
Mihai
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] First Test of FastMM4 for fpc

2005-12-18 Thread Peter Vreman
> Hi,
>
> I have changed the FastMM4 that it seemd to work with fpc now. Here are
> the results of my prior tests now with FastMM4 for fpc:
>
> Test1:
>   fpc (standard MM):  3.1 sec - factor = 1.34
>   fpc (FastMM4):  3.0 sec - factor = 1.30
>   delphi (standard MM): 3.1 sec - factor = 1.34
>   delphi (FastMM4): 2.3 sec - factor = 1
>
> Test2:
>   fpc (standard MM): 2.8  sec - factor =  1.47
>   fpc (FastMM4):  2.2 sec - factor = 1.15
>   delphi (standard MM): 2.9 sec - factor = 1.52
>   delphi (FastMM4): 1.9 sec - factor = 1
>
> Test3:
>   fpc (standard MM):  2.5 sec - factor = 1,19
>   fpc (FastMM4):  2.1 sec - factor = 1
>   delphi (standard MM): 3.4 sec - factor = 1.61
>   delphi (FastMM4): 2.1 sec - factor = 1
>
> As you can see the benefits are not as big as compared to the standard
> Delphi MM, but it is still slightly better than the standard MM in fpc
> (and it reports memory leeks). I have not yet tested all of its features
> but it seems to work so far.

I took a look at the MM and found that this test is not representative at
all. At least in the FPC MM it triggers only a single code path for
Reallocmem. And that code path is even the fastest for a
not-in-place-reallocation. And looking at the (unmaintable) FastMM4
sources i guess that the FPC code path is even shorter.

Also i don't know why you make the remark "(and it reports memory leeks)".
FPC already supports that for years with the heaptrc units. And with
compiling with debug info and adding the lineinfo you get output with
source information.





___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] First Test of FastMM4 for fpc

2005-12-18 Thread Peter Vreman
> Hi,
>
> I have changed the FastMM4 that it seemd to work with fpc now. Here are
> the results of my prior tests now with FastMM4 for fpc:
>
> Test1:
>   fpc (standard MM):  3.1 sec - factor = 1.34
>   fpc (FastMM4):  3.0 sec - factor = 1.30
>   delphi (standard MM): 3.1 sec - factor = 1.34
>   delphi (FastMM4): 2.3 sec - factor = 1
>
> Test2:
>   fpc (standard MM): 2.8  sec - factor =  1.47
>   fpc (FastMM4):  2.2 sec - factor = 1.15
>   delphi (standard MM): 2.9 sec - factor = 1.52
>   delphi (FastMM4): 1.9 sec - factor = 1
>
> Test3:
>   fpc (standard MM):  2.5 sec - factor = 1,19
>   fpc (FastMM4):  2.1 sec - factor = 1
>   delphi (standard MM): 3.4 sec - factor = 1.61
>   delphi (FastMM4): 2.1 sec - factor = 1
>
> As you can see the benefits are not as big as compared to the standard
> Delphi MM, but it is still slightly better than the standard MM in fpc
> (and it reports memory leeks). I have not yet tested all of its features
> but it seems to work so far.

Commited some optimizations (remove some expensive calculations) to the
heap for small memory blocks. Please test again.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] RE: command line editing, history, etc.

2005-12-18 Thread Jeff Pohlmeyer
> I have a command line utility that would really benefit from
> command line editing... is there a simple way to add this
> kind of readline-like behavior to a FreePascal program?
> I would appreciate the functionality on Linux but I might
> also use the program on Windows.


This works for Linux ( and possibly Cygwin ) if you have the libs...



program histdemo;
{$LINKLIB ncurses}
{$LINKLIB readline}
{$LINKLIB history}
{$LINKLIB c}

uses strings;

function readline(prompt: pchar):pchar; cdecl; external 'readline'
name 'readline';
procedure using_history(); cdecl; external 'history' name 'using_history';
procedure add_history(s:pChar); cdecl; external 'history' name 'add_history';

var
  s:pChar;
begin
  s:=nil;
  WriteLn('type "quit" to exit.');
  using_history();
  repeat
s:=readline('?>');
add_history(s);
WriteLn(s);
  until ( StrComp(s, 'quit') = 0 );
end.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FastMM4 for fpc

2005-12-18 Thread Peter Vreman
> I tried to modify the FastMM4 to work with with fpc.
> I had no big problems for the non-assembly language version, but with
> the assembly language version i have the problem, that fpc is allways
> generating a stack frame, even if i use the {$STACKFRAMES OFF} directive.
>
> Is it not possible at the moment, or do I miss something ?

Use procedure directive "nostackframe" to force it



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] 2.0.0 versus 2.0.2 - FreeBSD

2005-12-18 Thread Marco van de Voort
> Well, a lot of work to eleminate "oldlinux", but it
> works fine. I updated to 2.0.2 and something happend:
> 
> I have some cgi-programs for a virtual FreeBSD 4.7 Server.
> I compile under Linux (SuSE 8.2), tranfer the executable
> to FreeBSD and do a "brandelf -t Linux prog-name"
> 
> This works fine for 1.0.x, 2.0.0, but not for 2.0.2
> 
> The programs run very well on FreeBSD, do all things
> expected, but crash (with 2.0.2) at the end and produce
> a core-dump, "prog-name.core"
> 
> It's very hard to debug a program on a virtual Server
> thousand miles away. I suppose, that the last exit-routines
> have some incompatibilies with FreeBSD, or maybe it
> is a bug. Maybe this is a hint for the development team.

No idea. However try to substitute the "crt0.o" file of 2.0.2 with 2.0.0.

It could be that I did something extra with the 2.0.0 one to keep it 4.x
compatible. Since then I have lost acces to the only 4.x system myself.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] First Test of FastMM4 for fpc

2005-12-18 Thread Peter Vreman
>> I compiled fpc from the sources from the svn repository today, but the
>> results are almost the same as I posted yesterday (I marked with **
>> where the results have changed):
>>
>> Test1:
>> ** fpc (standard MM):  3.0 sec - factor = 1.30
>> fpc (FastMM4):  2.9 sec - factor = 1.30
>> delphi (standard MM): 3.1 sec - factor = 1.34
>> delphi (FastMM4): 2.3 sec - factor = 1
>>
>> Test2:
>> fpc (standard MM): 2.8  sec - factor =  1.47  ** fpc (FastMM4):  2.1 sec
>> - factor = 1.10
>> delphi (standard MM): 2.9 sec - factor = 1.52
>> delphi (FastMM4): 1.9 sec - factor = 1
>>
>> Test3:
>> fpc (standard MM):  2.5 sec - factor = 1,19
>> fpc (FastMM4):  2.1 sec - factor = 1
>> delphi (standard MM): 3.4 sec - factor = 1.61
>> delphi (FastMM4): 2.1 sec - factor = 1
>
> Strange, for me most tests improved by at least 10 %. Did you use a
> recompiled rtl compiled with -O3p3r?

He did the test on friday morning. Friday afternoon i commited some
optimizations in heap.inc.

Please test again with current svn.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpc 2.0.0 x86_64 and assembler

2005-12-18 Thread constantijnw

Florian Klaempfl wrote:


Intel mode isn't supported yet on x86_64

 


When do you expect it to be?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Simple TUI framework/RAD

2005-12-18 Thread Michael Van Canneyt


On Sat, 17 Dec 2005, Mihai wrote:

> Hello,
> 
> Is there any simple TUI framework or RAD tool for Free Pascal?
> I mean simpler than FV which is quite big for small console apps
> with simple widgets (Linux console).

Try ocrt in packages/extra/ncurses. 
It's object oriented, but much simpler than FV. It has some demo apps.
It's ncurses based so should work quite well.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Question: OpenOffice and FPC?

2005-12-18 Thread Michael Van Canneyt


On Fri, 16 Dec 2005, Felipe Monteiro de Carvalho wrote:

> On 12/16/05, Vincent Snijders <[EMAIL PROTECTED]> wrote:
> > C++ headers are near useless, when you want to use fpc.
> 
> What about java. Is is easier to translate?
> 
> I still don´t get it why you guys think it is so hard to translate c++
> headers. not that I´ve ever done it, but c++ code doen´t seam so
> different then c code to me.

The main problem are not the headers. The problems are on a binary level.

The first problem is the class structure - you need knowledge of VMT etc etc 
etc. 
On an assembler level, the name mangling is very different from C, it also 
changes 
with each version of the C++ compiler. We could have bindings for GCC 2.90, and 
with GCC 3.0 they would no longer work.

> Python and Perl probably much worse, since their structure is so different.

They are not compiled languages, but interpreted. All you could do from FPC is 
to run the interpreter.

Michael.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] 2.0.0 versus 2.0.2 - FreeBSD

2005-12-18 Thread Marc Santhoff
Am Samstag, den 17.12.2005, 18:23 +0200 schrieb Ziegenhorn Tourism
Database:
> Some weeks ago I switched from 1.0.x to 2.0.0.
> 
> Well, a lot of work to eleminate "oldlinux", but it
> works fine. I updated to 2.0.2 and something happend:
> 
> I have some cgi-programs for a virtual FreeBSD 4.7 Server.
> I compile under Linux (SuSE 8.2), tranfer the executable
> to FreeBSD and do a "brandelf -t Linux prog-name"
> 
> This works fine for 1.0.x, 2.0.0, but not for 2.0.2

Why not compile for FreeBSD directly? I'm using fpc 2.0.2 on FreeBSD
4.11 natively without problems.

One component that may cause the error is the linux translation layer of
the target FreebSD system.

HTH,
Marc


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpc 2.0.0 x86_64 and assembler

2005-12-18 Thread Peter Vreman
>>Intel mode isn't supported yet on x86_64
> When do you expect it to be?

It is not planned. Unless a user supplies the required patches for the
compiler there will not be an intel like asmmode for amd64 anytime soon.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Quake 2 for Freepascal

2005-12-18 Thread L505
Hi,
Does anyone have a copy of Quake 2?

I got Quake to compile with freepascal, but I don't have the quake game files.

I need it, in order to test the exe! Otherwise, the exe is useless.

So if anyone has a copy of Quake 2, maybe you will you test the FreePascal 
Quake port
for me?

All that needs to be done is you copy the freepascal quake exe into your already
existing quake directory...

--
L505
Possible ADD

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal