Re: [fpc-pascal] Profiller for Mac OS X

2009-09-03 Thread Jonas Maebe


On 03 Sep 2009, at 08:56, Graeme Geldenhuys wrote:


What is wrong with enabling the heaptrc unit (-gh)?


It does not detect memory leaks stemming from memory not allocated via  
FPC code. A lot of Mac OS X framework routines return pointers that  
you have to retain/release in a balanced way.



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


Re: [fpc-pascal] Profiller for Mac OS X

2009-09-03 Thread Vincent Snijders

Graeme Geldenhuys schreef:


What is wrong with enabling the heaptrc unit (-gh)?


It works only for memory allocated by the fpc heap manager, so a winapi CreateWindow 
call, or a gtk gtk_button_new call would create an undetected memory leak, if the 
returned handle/pointer is not release properly.


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


Re: [fpc-pascal] INDY 10 for FPC

2009-09-03 Thread Jonas Maebe


On 03 Sep 2009, at 01:19, ABorka wrote:


There is a \Lib\indymaster-Makefile.fpc but it gives
"
make -f indymaster-Makefile.fpc all
indymaster-Makefile.fpc:1: *** missing separator.  Stop.
"


Normally, a Makefile.fpc has to be processed first using fpcmake in  
order to generate an actual Makefile file from it. Try using  
indymaster-Makefile instead if that file also exists.



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


[fpc-pascal] Parser combinator library

2009-09-03 Thread leledumbo

Is there any parser combinator library for Pascal?
-- 
View this message in context: 
http://www.nabble.com/Parser-combinator-library-tp25271707p25271707.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

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


Re: [fpc-pascal] Profiller for Mac OS X

2009-09-03 Thread Jonas Maebe


On 03 Sep 2009, at 08:56, Graeme Geldenhuys wrote:


When the application quits, it dumps to the
console the memory leak status and a backtrace of more or less where
they got introduced. The latter is rather a 'hit and miss' situation


What do you mean?


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


Re: [fpc-pascal] Profiller for Mac OS X

2009-09-03 Thread Tom Verhoeff
On Wed, Sep 02, 2009 at 06:20:17PM -0300, Felipe Monteiro de Carvalho wrote:
> 
> Is anyone using a profiler in Mac OS X? I am trying to detect if there
> are memory leaks.
> 
> gprof doesn't seam to work and valgrind doesn't seams usable from
> their readme, so I tryed "Sampler" from the Developers dir, but the
> application runs and after it nothing appears in the tables.

Why not just use unit heaptrc?



Quoted from that page:

The HEAPTRC unit can be used to debug your memory
allocation/deallocation. It keeps track of the calls to
getmem/freemem, and, implicitly, of New/Dispose statements.

When the program exits, or when you request it explicitly. It
displays the total memory used, and then dumps a list of blocks
that were allocated but not freed. It also displays where the
memory was allocated.

If there are any inconsistencies, such as memory blocks being
allocated or freed twice, or a memory block that is released
but with wrong size, this will be displayed also.

The information that is stored/displayed can be customized using
some constants.

Works very well.

Tom
-- 
E-MAIL: T.Verhoeff @ TUE.NL | Dept. of Math. & Comp. Science
PHONE:  +31 40 247 41 25| Technische Universiteit Eindhoven
FAX:+31 40 247 54 04| PO Box 513, NL-5600 MB Eindhoven
http://www.win.tue.nl/~wstomv/  | The Netherlands
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Profiller for Mac OS X

2009-09-03 Thread Graeme Geldenhuys
Jonas Maebe het geskryf:
> 
> What do you mean?

You sometimes get loads of output highlighting several memory leaks. The
backtrace information doesn't always lead tot he exact location where
the memory leak was caused. That's the "hit and miss" I mentioned.
Sometimes the backtrace is correct and sometimes it is not. Also
sometimes you fix one memory leak and suddenly our heaptrc output report
that half the memory leaks are fixed.

Anyway, as I said, I enable heaptrc for all my coding projects so that I
detect memory leaks as soon as they are introduced. This greatly reduces
my time in find them, because I know what code I was working on.
Obviously at app deployment, I disable heaptrc.

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/

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


Re: [fpc-pascal] Profiller for Mac OS X

2009-09-03 Thread Graeme Geldenhuys
Vincent Snijders het geskryf:
> 
> It works only for memory allocated by the fpc heap manager, so a
> winapi CreateWindow call, or a gtk gtk_button_new call would create

Ah OK, I see what you mean. So does profilers like valgrind detect those?


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/

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


RE: Re: [fpc-pascal] INDY 10 for FPC

2009-09-03 Thread Henrik Genssen
you have to checkout the Tiburon branch - thats what they are working on!
svn://svn.atozed.com/indy/indy10/branches/Tiburon

but do not expect too much! it only works on windows as they are reinventing 
the wheel
on iconv support
so far it does not work at least on MACOSX

-- Hinnack

>reply to message:
>date: 03.09.2009 01:19:39
>from: "ABorka" 
>to: "FPC-Pascal users discussions" 
>subject: Re: [fpc-pascal] INDY 10 for FPC
>
>Well, if one checks out the latest Indy SVN sources from
>
>svn://svn.atozed.com/indy/indy10/trunk
>
>the latest revision is 3778 (last update was in April 2009) there is no 
>way to compile it for FPC/Lazarus.
>The FPC related README file is the same as for the 2007 10.2.0.3 FPC 
>only version and the steps are not working here because there are no 
>such directories in the trunk.
>There are some Makefile.fpc in a few directories, but all of them lists 
>10.2.0.1 in them as a version (in \Lib\System\IdVers.inc it says 10.2.3).
>
>There is a \Lib\indymaster-Makefile.fpc but it gives
>"
>make -f indymaster-Makefile.fpc all
>indymaster-Makefile.fpc:1: *** missing separator.  Stop.
>"
>
>In short I did not find a way to even compile the latest Indy source for 
>FPC/Lazarus from their SVN.
>
>Maybe someone more knowledgeable could make a try at it and suggest some 
>steps that work.
>As of now, only the old 2007 10.2.0.3 FPC only, non-merged Indy can be 
>compiled for FPC/Lazarus
>
>AB
>
>Marco van de Voort wrote:
>> In our previous episode, Henrik Genssen said:
>>> does someone know where to find a current indy port (or cvs / svn) for 
>>> INDY10 for
>>> FPC / Lazarus?
>>>
>>> the link http://wiki.lazarus.freepascal.org/index.php/Indy_with_Lazarus
>>> points to a version 10.2.0.3 from 11/13/2007.
>>>
>>> or is this project dead?
>> 
>> Yes and no. It is dead because it was succesful, and backmerged into
>> mainline Indy. 
>> 
>> However Indy merged a big branch (for Tiburon support) back into the
>> mainbranch, so that could have upset minor things, like the Lazarus project
>> files etc.
>> 
>> So the rough core is working, but the "polishing" hasn't been redone
>> recently.
>> 
>> ___
>> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>> 
>
>___
>fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
>http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Profiller for Mac OS X

2009-09-03 Thread Felipe Monteiro de Carvalho
On Thu, Sep 3, 2009 at 4:55 AM, Jonas Maebe wrote:
> It does not detect memory leaks stemming from memory not allocated via FPC
> code. A lot of Mac OS X framework routines return pointers that you have to
> retain/release in a balanced way.

Yes, my memory leak was not about allocated blocks but rather about
correctly calling release for NSMenu, NSMenuItem and other Cocoa
objects.

-- 
Felipe Monteiro de Carvalho
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] FPC/Lazarus tutorial videos

2009-09-03 Thread Jonas Maebe

Hello,

Someone is posting FPC/Lazarus tutorial videos on youtube:
* the first program: http://www.youtube.com/watch?v=nqph8VGCi40
* printing math - Lazarus: http://www.youtube.com/watch?v=tSLas4KiqVg
* formatting lines - Lazarus: http://www.youtube.com/watch?v=l7p5sQaipYM
* data types and user input: http://www.youtube.com/watch?v=N6dynnuKvGk
* if-statements - Lazarus: http://www.youtube.com/watch?v=tWM9Vxs99TY


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


[fpc-pascal] Re: Parser combinator library

2009-09-03 Thread Funky Beast
leledumbo wrote:
> Is there any parser combinator library for Pascal?

Not sure if this is what you're looking for, you might try porting some of 
these:
http://www.delphiforfun.org/Programs/Library/Default.htm


Regards,
Funky Beast
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] INDY 10 for FPC

2009-09-03 Thread ABorka
Forgot to mention that I did try that too with not much change in the 
results:


>fpcmake indymaster-Makefile.fpc
Processing indymaster-Makefile.fpc
 i386-win32 requires: rtl,winunits-base,winunits-jedi,fcl-base
 Writing Makefile

>make all
make.EXE: *** No rule to make target `indysystemfpc.ppu', needed by 
`fpc_units'.  Stop.




Jonas Maebe wrote:


On 03 Sep 2009, at 01:19, ABorka wrote:


There is a \Lib\indymaster-Makefile.fpc but it gives
"
make -f indymaster-Makefile.fpc all
indymaster-Makefile.fpc:1: *** missing separator.  Stop.
"


Normally, a Makefile.fpc has to be processed first using fpcmake in 
order to generate an actual Makefile file from it. Try using 
indymaster-Makefile instead if that file also exists.



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



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


[fpc-pascal] FCL-PASSRC

2009-09-03 Thread yu ping
Is there a example using FCL-PASSRC?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] INDY 10 for FPC

2009-09-03 Thread ABorka
Thanks, I'll try the Tiburon SVN version of Indy then, but if it doesn't 
work on both Windows and Linux it'll be not much use for me until it is 
does.



Henrik Genssen wrote:

you have to checkout the Tiburon branch - thats what they are working on!
svn://svn.atozed.com/indy/indy10/branches/Tiburon

but do not expect too much! it only works on windows as they are reinventing 
the wheel
on iconv support
so far it does not work at least on MACOSX

-- Hinnack


reply to message:
date: 03.09.2009 01:19:39
from: "ABorka" 
to: "FPC-Pascal users discussions" 
subject: Re: [fpc-pascal] INDY 10 for FPC

Well, if one checks out the latest Indy SVN sources from

svn://svn.atozed.com/indy/indy10/trunk

the latest revision is 3778 (last update was in April 2009) there is no 
way to compile it for FPC/Lazarus.
The FPC related README file is the same as for the 2007 10.2.0.3 FPC 
only version and the steps are not working here because there are no 
such directories in the trunk.
There are some Makefile.fpc in a few directories, but all of them lists 
10.2.0.1 in them as a version (in \Lib\System\IdVers.inc it says 10.2.3).


There is a \Lib\indymaster-Makefile.fpc but it gives
"
make -f indymaster-Makefile.fpc all
indymaster-Makefile.fpc:1: *** missing separator.  Stop.
"

In short I did not find a way to even compile the latest Indy source for 
FPC/Lazarus from their SVN.


Maybe someone more knowledgeable could make a try at it and suggest some 
steps that work.
As of now, only the old 2007 10.2.0.3 FPC only, non-merged Indy can be 
compiled for FPC/Lazarus


AB

Marco van de Voort wrote:

In our previous episode, Henrik Genssen said:

does someone know where to find a current indy port (or cvs / svn) for INDY10 
for
FPC / Lazarus?

the link http://wiki.lazarus.freepascal.org/index.php/Indy_with_Lazarus
points to a version 10.2.0.3 from 11/13/2007.

or is this project dead?

Yes and no. It is dead because it was succesful, and backmerged into
mainline Indy. 


However Indy merged a big branch (for Tiburon support) back into the
mainbranch, so that could have upset minor things, like the Lazarus project
files etc.

So the rough core is working, but the "polishing" hasn't been redone
recently.

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


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


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



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


Re: [fpc-pascal] Parser combinator library

2009-09-03 Thread leledumbo

There's nothing about parser on the website, though the libs are useful.
-- 
View this message in context: 
http://www.nabble.com/Parser-combinator-library-tp25271707p25286863.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

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


Re: [fpc-pascal] Parser combinator library

2009-09-03 Thread Paul Nicholls
- Original Message - 
From: "leledumbo" 

To: 
Sent: Thursday, September 03, 2009 6:25 PM
Subject: [fpc-pascal] Parser combinator library




Is there any parser combinator library for Pascal?
--


Hi :)
What exactly do you mean by parser combinator library?

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


Re: [fpc-pascal] Parser combinator library

2009-09-03 Thread leledumbo

> Hi :)
> What exactly do you mean by parser combinator library?

It's basically a library of common parsing functions combined to produce a
fully functional parser. Haskell and C++ has this kind of library, so I'm
looking for a Pascal one. It could help so that one doesn't have to write a
parser from scratch, instead he just needs to choose correct parsers to fit
in his grammar.

http://en.wikipedia.org/wiki/Parser_combinator
http://en.wikipedia.org/wiki/Parser_combinator 

-- 
View this message in context: 
http://www.nabble.com/Parser-combinator-library-tp25271707p25288245.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

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