Re: [fpc-pascal] Problems with Dynlibs.UnloadLibrary on Linux

2008-12-18 Thread Michael Van Canneyt


On Wed, 17 Dec 2008, Andrew Brunner wrote:

> Thanks for that tip!  So running under GDB I get the following info...
> 
> This GDB was configured as "x86_64-linux-gnu"...
> (gdb) run
> 
> Starting program: /mnt/Raid/Developer/Source/Lazarus/Test/TestApplication
> [Thread debugging using libthread_db enabled]
> [New Thread 0x7f9e79102770 (LWP 7388)]
> [WARNING] Out of OEM specific VK codes, changing to unassigned
> [WARNING] Out of unassigned VK codes, assigning $FF
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7f9e79102770 (LWP 7388)]
> 0x7f9e71a38d68 in fpc_finalize ()
>from 
> /home/atbrunner/Source/Lazarus/Libraries/MatrixMemory/MatrixMemoryManager.so

Are you using threads ?

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


[fpc-pascal] FreePascal/Lazarus plug-in's for Delphi.

2008-12-18 Thread Skybuck Flying

Hello,

To make it easy for Delphi programmers to write code in Delphi and then 
switch to free pascal/lazarus the following could be done:


1. Export code from Free Pascal into Delphi packages so they can be 
installed in Delphi.
2. Export code from Lazarus into Delphi packages so they can be installed in 
Delphi.


This way Delphi users can make applications inside the Delphi IDE, using 
libraries/code from Free Pascal and Lazarus.


For example some runtime libraries/routines and some Lazarus widgets/gui 
components.


Then later the user/code could be switched to free pascal/lazarus.

This means code-compatibility with Delphi *is* important, otherwise too many 
porting issue's.


This also means the user can get used to Lazarus and Free Pascal code inside 
the Delphi environment and get used to it first before actually switching to 
free pascal and lazarus ide... otherwise the switch to different tools, and 
different language and different runtimes/libraries is to great !?!?


Finally the big benefit of free pascal should be cross compiling... 
therefore FreePascal could come with as many cross compilers and cross 
linkers as possible, the same for Lazarus.


This is probably the biggest benefit of free pascal: cross compiling.

Otherwise I don't see any benefit to switching to free pascal.

Delphi's IDE is still more stable than Lazarus IDE.

Delphi's compiler still works pretty good.

Free Pascal compiler can do 64 bit but no performance benefits so far ?!

I would be interested in learning about any Lazarus/GUI Packages available 
for Delphi ?!? If these already exist... please point me towards them ;)


However currently I am interested in cross compiling to darwin/os x which 
seems not included :( so that sux.


Also I am willing to provide cpu-power for compiling. So if "the team" needs 
more cpu-power for compiling then I suggest the following:


Create a filedisk image containing all necessary tools and code and batch 
files or scripts to make the compiling automatic.


Then I or anybody else should be able to download the image, mount it, run a 
batch file and voila... everything gets compiled automatically without 
having to follow a zillion tutorials and a zillion downloads and installs ;)


I would also be interested in helping out with creating such a file disk 
image... but then I still need more instructions...


For example how to build the free pascal runtime library units... something 
like that. I am probably not the best candidate to do this because I 
understand very little about all these files which seem like a zillion files 
! ;)


Also when cross compiling to many different platforms then different binary 
files might have to be generated.


I am not sure but I think currently *.o is always the default extension... 
maybe this should be changed to something like:


o.mswindows32
o.mswindows64
o.osx32
o.osx64
o.dos16
o.dos32
o.linux32
o.linux64

etc.

And finally ofcourse the executables themselfes.

exe.mswindows32
exe.mswindows64
osx32  (in case no extension then just keep suffix)
osx64

For distributions the programmer could simply remove the extensions.

In case many extensions need to be removed then a little tool/command could 
be made which does it for the programmer for example:


"Prepare for Distribution"

This deletes all *.o and then copies *.o.target to *.o and *.exe.target to 
*.exe


So for example:

// first delete junk from previous distribution:
delete MyUnit.o
delete MyApplication.o

// make new distribution:
copy MyUnit.o.mswindows32 to MyUnit.o
copy MyApplication.exe.mswindows32 to MyApplication.exe

Bye,
 Skybuck. 


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


Re: [fpc-pascal] FreePascal/Lazarus plug-in's for Delphi.

2008-12-18 Thread Frank de Groot (Rent-a-Geek)

"Free Pascal compiler can do 64 bit but no performance benefits so far ?!"


I am developing a GA (genetical algorithm) that needs a large amount of data 
to work with.

My development machine has 64 GB RAM and 4 cores.
In that space, I can run simultaneously 4 processes that each use 16 GB of 
data (Intraday stock market of all ticker symbols of years of data).


This would have been impossible with Delphi. It's not even a performance 
issue in my case. 


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


Re: [fpc-pascal] FreePascal/Lazarus plug-in's for Delphi.

2008-12-18 Thread Florian Klaempfl
Skybuck Flying schrieb:
> Hello,
> 
> To make it easy for Delphi programmers to write code in Delphi and then
> switch to free pascal/lazarus the following could be done:
> 
> 
> Delphi's IDE is still more stable than Lazarus IDE.

Why should I/we spent time into improving other people's software
(making a delphi plugin) instead of improving our own software
(debugging lazarus)?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FreePascal/Lazarus plug-in's for Delphi.

2008-12-18 Thread Marco van de Voort
On Thu, Dec 18, 2008 at 01:18:09AM +0100, Skybuck Flying wrote:
> To make it easy for Delphi programmers to write code in Delphi and then 
> switch to free pascal/lazarus the following could be done:
> 
> 1. Export code from Free Pascal into Delphi packages so they can be 
> installed in Delphi.
> 2. Export code from Lazarus into Delphi packages so they can be installed in 
> Delphi.
> 
> This way Delphi users can make applications inside the Delphi IDE, using 
> libraries/code from Free Pascal and Lazarus.

The whole point of FPC/Lazarus is not needing Delphi. Efforts should go
directly towards this goal.

Also, in general, the feasability and amount of work is heavily
underestimated. It is technically next to undoable, and magnitudes more 
difficult to
get it working then to do the same in lazarus.

In theory, all problems can be worked around, and heaps of developers have
stressed that. However none of them that tried came up with even halfworking
code, they all stumble on the complexity, magnitude of the task.

For starters, because you don't have Delphi in source.

> Otherwise I don't see any benefit to switching to free pascal.

Well, above lists another example, you have total system control. This gets
important if you have massive applications that you want to maintain
indefinitely.   The Kylix history clearly illustrates this. 
 
> Delphi's IDE is still more stable than Lazarus IDE.

Personally, debugging annoys me more than that. Delphi dies daily on me too.

> Delphi's compiler still works pretty good.

But to get it up to par with FPC, I have to buy the most recent one.

> Free Pascal compiler can do 64 bit but no performance benefits so far ?!

There were never supposed to be any.
 
> I would be interested in learning about any Lazarus/GUI Packages available 
> for Delphi ?!? If these already exist... please point me towards them ;)

It's not clear what you mean here. Several packages can be used both with
Lazarus and Delphi, like Indy.
 
> However currently I am interested in cross compiling to darwin/os x which 
> seems not included :( so that sux.

Because it is hard, and limited. Advanced topics need advanced skills.

> Create a filedisk image containing all necessary tools and code and batch 
> files or scripts to make the compiling automatic.

This is not possible, some files needed for OS X crosscompilation are
copyrighted.

Still, the situation could be made easier. I hope that some of the people
that need it urgently start working on making that happen. (hint, hint)
 
> batch file and voila... everything gets compiled automatically without 
> having to follow a zillion tutorials and a zillion downloads and installs ;)

And I hope that some users will pull their own weight, and invest some time
too. The team already invests enough.
 
> I would also be interested in helping out with creating such a file disk 
> image... but then I still need more instructions...

People have succeeded crosscompiling to OS X by reading the buildfaq. Try
harder.
 
> For example how to build the free pascal runtime library units... something 
> like that. I am probably not the best candidate to do this because I 
> understand very little about all these files which seem like a zillion files 
> ! ;)

The library situation is complex and unfinished. Specially the portable
situation

> I am not sure but I think currently *.o is always the default extension... 
> maybe this should be changed to something like:

No. This info is already in the .o, and can be read using various tools like
objdump. This causes only more trouble in calling the linker

(workarounds with renaming removed. Computers are easier confused than
users, so no point in that)
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FreePascal/Lazarus plug-in's for Delphi.

2008-12-18 Thread Frank de Groot (Rent-a-Geek)

Free Pascal compiler can do 64 bit but no performance benefits so far ?!


There were never supposed to be any.



64-bit code can, in some specialist cases, be made to execute in about 
double the speed of 32-bit code due to the wider registers.
The availability of more registers is another speed-boon to 64-bit code. 


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


Re: [fpc-pascal] FreePascal/Lazarus plug-in's for Delphi.

2008-12-18 Thread Jonas Maebe


On 18 Dec 2008, at 14:07, Frank de Groot (Rent-a-Geek) wrote:

Free Pascal compiler can do 64 bit but no performance benefits so  
far ?!


There were never supposed to be any.


64-bit code can, in some specialist cases, be made to execute in  
about double the speed of 32-bit code due to the wider registers.


These are indeed really specialist cases, as it requires to consist of  
almost nothing but 64 bit math and almost no pointers (since every  
pointer is twice as wide, reducing cache effectivity by half).


The availability of more registers is another speed-boon to 64-bit  
code.


On x86_64, to be precise (on other architectures, 32 bit mode already  
has plentiful registers). However, register variables are not enabled  
in FPC 2.2.x for x86_64, but only in in 2.3.x (and this will not be  
merged).



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


Re: [fpc-pascal] Problems with Dynlibs.UnloadLibrary on Linux

2008-12-18 Thread Andrew Brunner
On Thu, Dec 18, 2008 at 2:04 AM, Michael Van Canneyt
 wrote:

> Are you using threads ?
>
> Michael.


Hi Michael,

Not in the library project.  Although I do plan on having threads in
the Main Application.  Many pooled threads will be running in the main
application.

Just the "application" thread will be running in the "Matrix Modules" Libraries.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Kerberos for Free Pascal

2008-12-18 Thread ik
Hello,

Have anyone here ever used Kerberos with free pascal, and/or know on a good
Pascal binding for using it (including finding name value items) ?

Thanks,
Ido

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

Re: [fpc-pascal] RRDTool binding

2008-12-18 Thread Mattias Gaertner
On Fri, 12 Dec 2008 10:25:57 +0100
Koenraad Lelong  wrote:

> Hello,
> Is there a binding for RRDTool ?
> With a linux-box I'm monitoring a device and for the moment I store
> the data in a text-file. Then I convert that text-file to a script to
> put the data in rrdtool and then I can get various graphs, which I
> could use on a web-site.
> I would like to put the data directly in rrdtool. I googled but I
> didn't find anything but maybe someone knows about a binding for
> Pascal. Another way I could go is to execute the rrdtool-update from
> within my fpc-application.
> Any thoughts ?

I'm interested in such bindings too.

At the moment I'm using TProcess.

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


[fpc-pascal] Re: Using OpenCASCADE 3d tools with Pascal?

2008-12-18 Thread Paul Nicholls

"Marc Santhoff"  wrote
in message news:1229580231.333.8.ca...@localhost.das.netz...

Am Donnerstag, den 18.12.2008, 09:02 +1100 schrieb Paul Nicholls:

Hi all,
I am wondering if anyone here has ever managed to use the free
open-source OpenCASCADE 3d tools (www.opencascade.org) with Pascal
before?


I don't think so, but I remember two facts:

The toolkit is huge, porting will be a lot of work.
And it'll be complicated or maybe impossible because it is written in C
++. IIRC there are some problems related to C++ objects in libraries and
fpc.

An already developed ActiveX OCX control has been developed that may
work but it costs lots of money.


IIRC there was Java binding back in version 4 of opencascade (the
version I had to deal with). I'm not sure if that could be used as a
guideline for adapting to object pascal, though.

HTH anyhow,
Marc



I was thinking more along the lines of perhaps creating a compatible dll
that could be used for Pascal/Delphi, and if necessary, flattening when
necessary method calls to plain functions, etc.

I'm sure this sort of thing has been done before as you can use it under
Visual Basic, Java, C#, Python, Ruby.

I have seen various people create a single dll containing the OpenCASCADE 
routines, but I am not sure how.


One person has made

"NaroCAD, a free open source parametric modeling CAD application with C#:
http://sourceforge.net/projects/narocad/. The project contains a 
.Net(C++/CLI) wrapper layer and also a wrapper code generator application, 
you can generate your own wrappers in the language you want.
The OCC 6.3.0 wrappers are compiled under one assembly named 
OCWrappers.dll."


See the thread below
http://www.opencascade.org/org/forum/thread_14766/

cheers,
Paul


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


Re: [fpc-pascal] Re: Using OpenCASCADE 3d tools with Pascal?

2008-12-18 Thread Marc Santhoff
Am Freitag, den 19.12.2008, 08:46 +1100 schrieb Paul Nicholls:
> "Marc Santhoff"  wrote
> in message news:1229580231.333.8.ca...@localhost.das.netz...
> > Am Donnerstag, den 18.12.2008, 09:02 +1100 schrieb Paul Nicholls:
> >> Hi all,
> >> I am wondering if anyone here has ever managed to use the free
> >> open-source OpenCASCADE 3d tools (www.opencascade.org) with Pascal
> >> before?
> >
> > I don't think so, but I remember two facts:
> >
> > The toolkit is huge, porting will be a lot of work.
> > And it'll be complicated or maybe impossible because it is written in C
> > ++. IIRC there are some problems related to C++ objects in libraries and
> > fpc.
> >> An already developed ActiveX OCX control has been developed that may
> >> work but it costs lots of money.
> >
> > IIRC there was Java binding back in version 4 of opencascade (the
> > version I had to deal with). I'm not sure if that could be used as a
> > guideline for adapting to object pascal, though.
> >
> > HTH anyhow,
> > Marc
> >
> 
> I was thinking more along the lines of perhaps creating a compatible dll
> that could be used for Pascal/Delphi, and if necessary, flattening when
> necessary method calls to plain functions, etc.
> 
> I'm sure this sort of thing has been done before as you can use it under
> Visual Basic, Java, C#, Python, Ruby.

I *think* that could be doable, I'm not so sure currently if there were
general problems using C++ or if it had to do with ref-counted objects,
memory management, or maybe only forms and graphical objects.

Hopefully someone else can speak up here ...

> I have seen various people create a single dll containing the OpenCASCADE 
> routines, but I am not sure how.
> 
> One person has made
> 
> "NaroCAD, a free open source parametric modeling CAD application with C#:
> http://sourceforge.net/projects/narocad/. The project contains a 
> .Net(C++/CLI) wrapper layer and also a wrapper code generator application, 
> you can generate your own wrappers in the language you want.
> The OCC 6.3.0 wrappers are compiled under one assembly named 
> OCWrappers.dll."
> 
> See the thread below
> http://www.opencascade.org/org/forum/thread_14766/

There is FreeCAD, too. If all people starting a CAD program on sf.net
would unite, that would be quite enough manpower to build a complete
free CAD application in three months. ;)

Something similar, hopefully explaning what you need:

http://info.borland.com/borlandcpp/papers/bc360/

HTH,
Marc


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


[fpc-pascal] Re: Using OpenCASCADE 3d tools with Pascal?

2008-12-18 Thread Paul Nicholls
"Marc Santhoff"  wrote 
in message news:1229657957.329.5.ca...@localhost.das.netz...
>> I was thinking more along the lines of perhaps creating a 
compatible dll
>> that could be used for Pascal/Delphi, and if necessary, flattening when
>> necessary method calls to plain functions, etc.
>>
>> I'm sure this sort of thing has been done before as you can use it under
>> Visual Basic, Java, C#, Python, Ruby.
>
> I *think* that could be doable, I'm not so sure currently if there were
> general problems using C++ or if it had to do with ref-counted objects,
> memory management, or maybe only forms and graphical objects.
>
> Hopefully someone else can speak up here ...
>
>> I have seen various people create a single dll containing the OpenCASCADE
>> routines, but I am not sure how.
>>
>> One person has made
>>
>> "NaroCAD, a free open source parametric modeling CAD application with C#:
>> http://sourceforge.net/projects/narocad/. The project contains a
>> .Net(C++/CLI) wrapper layer and also a wrapper code generator 
>> application,
>> you can generate your own wrappers in the language you want.
>> The OCC 6.3.0 wrappers are compiled under one assembly named
>> OCWrappers.dll."
>>
>> See the thread below
>> http://www.opencascade.org/org/forum/thread_14766/
>
> There is FreeCAD, too. If all people starting a CAD program on sf.net
> would unite, that would be quite enough manpower to build a complete
> free CAD application in three months. ;)
>
> Something similar, hopefully explaning what you need:
>
> http://info.borland.com/borlandcpp/papers/bc360/
>
> HTH,
> Marc

Hi Marc,
To be honest, I am really only interested in the 3d STEP model 
import/export, and how to create the underlying meshes, etc. prior to the 
export, and back again from the import operation.

I am hoping this will simplify things quite a bit :-)

cheers,
Paul 

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