[fpc-pascal] Re: Passing objects to libraries and back

2011-02-25 Thread leledumbo
> is it allowed ? Yes, but watch out that is/as operator might not work as expected. > can i pass ansistrings ? Yes, but only if you know what you're doing. NEVER modify the passed strings (it would confuse the reference counting). Use const parameter all the time. > i know that passing ansistr

[fpc-pascal] Passing objects to libraries and back

2011-02-25 Thread Jorge Aldo G. de F. Junior
I want to add plugin suport to an network app i am developing, the easiest way of doing this is passing the internal objects as parameters to funcions inside libraries (.so or .dll) something like procedure plugin(const parameter : tobject): tobject; external; is it allowed ? or if i cant use

Re: [fpc-pascal] Re: Embedded web server

2011-02-25 Thread Marco van de Voort
In our previous episode, michael.vancann...@wisa.be said: > >> unless we > >> include > >> lnet in FPC. > > > > Well, fppkg uses it for years already, see utils/fppkg/lnet > > I am aware of that, but that is an old unmaintained copy, > and that is exactly the problem: > There are 2 parallel impl

[fpc-pascal] Re: Embedded web server

2011-02-25 Thread Lukasz Sokol
On 25/02/2011 11:43, Jonas Maebe wrote: > > On 25 Feb 2011, at 11:45, Ben wrote: > >> Op 2011-02-25 12:31, Jonas Maebe het geskryf: >>> >>> It seems that it's licensed under Artistic License 1.0 >>> (), >> >> nYume is not part of powt

[fpc-pascal] Re: Embedded web server

2011-02-25 Thread Ben
Op 2011-02-25 14:06, Jonas Maebe het geskryf: >> Or should someone with a more official >> capacity (part of FPC team) rather contact the author? > > It doesn't matter. OK done. If I get feedback, I'll let you guys know. -- Ben. ___ f

[fpc-pascal] Re: Embedded web server

2011-02-25 Thread Ben
Op 2011-02-25 15:06, Jorge Aldo G. de F. Junior het geskryf: > whos going to mantain nYume ? There are such a little code, and zero external dependencies, so it will be a no brainer to keep it working with FPC. From what I can see, there are also quite a few developers using FPC with web apps, so

Re: [fpc-pascal] Sharing dynamic arrays between threads

2011-02-25 Thread Wimpie Nortje
> Calling dispose() on a record with a dynamic array field will free the > array (and recursively finalize all its elements) as long as the > pointer on which you call it is correctly typed in the source code. > The fact that you still get memory leaks after everything you are > doing suggests tha

Re: [fpc-pascal] Re: Embedded web server

2011-02-25 Thread Jorge Aldo G. de F. Junior
whos going to mantain nYume ? cause lightwebserver is mantained... (while i dont mantain the rest of powtils site, i can mantain lightwebserver, webtemplate and pasjs...), yet nYume is unmantained... (i understand that using lightwebserver places the burden of having to use synapse, but, you real

Re: [fpc-pascal] Sharing dynamic arrays between threads

2011-02-25 Thread Jonas Maebe
On 25 Feb 2011, at 14:02, Wimpie Nortje wrote: Initially I only disposed the record. This lead to lots of memory leaks. Then I set dynarray:= nil before disposing the record. Less mem leaks, but still a lot. Then I started to finalize the dynamic array before disposing the record. A huge impr

Re: [fpc-pascal] Sharing dynamic arrays between threads

2011-02-25 Thread Wimpie Nortje
Thanks for the resonse Jonas >> Is it safe to create a dynamic array with setlength() in one thread and >> free the array using finalize() in another thread? > > Normally, you should not call finalize() on dynamic arrays. When the > last reference to a dynamic array goes out of scope, it is finalis

Re: [fpc-pascal] Re: Embedded web server

2011-02-25 Thread michael . vancanneyt
On Fri, 25 Feb 2011, Florian Klaempfl wrote: Am 25.02.2011 11:38, schrieb michael.vancann...@wisa.be: unless we include lnet in FPC. Well, fppkg uses it for years already, see utils/fppkg/lnet I am aware of that, but that is an old unmaintained copy, and that is exactly the problem: Th

Re: [fpc-pascal] Re: Embedded web server

2011-02-25 Thread Florian Klaempfl
Am 25.02.2011 11:38, schrieb michael.vancann...@wisa.be: > unless we > include > lnet in FPC. Well, fppkg uses it for years already, see utils/fppkg/lnet ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/li

Re: [fpc-pascal] Sharing dynamic arrays between threads

2011-02-25 Thread Jonas Maebe
On 25 Feb 2011, at 13:28, Wimpie Nortje wrote: Is it safe to create a dynamic array with setlength() in one thread and free the array using finalize() in another thread? Normally, you should not call finalize() on dynamic arrays. When the last reference to a dynamic array goes out of scop

Re: [fpc-pascal] interested in building a library for functions?

2011-02-25 Thread Juha Manninen
> > Are there any visualisation features or is the output in text format, too? > Sounds like your solver competes with Maxima and other math programs Ok, I didn't look at the prog before asking. I booted Windows and tried it. >> Perhaps the prettiest of them is Superficies_En, wich is an English

[fpc-pascal] Sharing dynamic arrays between threads

2011-02-25 Thread Wimpie Nortje
Hi, Is it safe to create a dynamic array with setlength() in one thread and free the array using finalize() in another thread? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: Embedded web server

2011-02-25 Thread Jonas Maebe
On 25 Feb 2011, at 12:49, Ben wrote: I'll try and contact the original author to see if he can accommodate the FPC project with that code. Acceptable licenses include a modified LGPL license (modified as described in http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/COPYING.FPC?revisio

[fpc-pascal] Re: Embedded web server

2011-02-25 Thread Ben
Op 2011-02-25 13:43, Jonas Maebe het geskryf: > > It seems like a copy/paste of a part of the GPLv2. Putting GPL code into > FPC's packages is not that good either, since it prevents usage in > closed source programs. I'll try and contact the original author to see if he can accommodate the FPC p

Re: [fpc-pascal] Re: Embedded web server

2011-02-25 Thread Jonas Maebe
On 25 Feb 2011, at 11:45, Ben wrote: Op 2011-02-25 12:31, Jonas Maebe het geskryf: It seems that it's licensed under Artistic License 1.0 (), nYume is not part of powtils. The nYume code I have shows the following license. It

Re: [fpc-pascal] Re: Embedded web server

2011-02-25 Thread Marco van de Voort
In our previous episode, michael.vancann...@wisa.be said: > > And where is fphttpd located in FPC ? > > If it's part of lnet, then it is external, and not usable, unless we include > lnet in FPC. And last I heard, this was a no-no... ? Afaik it was not a no-no per se, but to be fair we would hav

Re: [fpc-pascal] interested in building a library for functions?

2011-02-25 Thread Marco van de Voort
In our previous episode, Angel Montesinos said: > This is a call for people willing to relieve me in the task of > maintaining a library for parsing, evaluating and differentiating real > functions with almost optimal speed and precision without recourse to > using multiprecision real types. I h

[fpc-pascal] Re: Embedded web server

2011-02-25 Thread Ben
Op 2011-02-25 12:31, Jonas Maebe het geskryf: > > It seems that it's licensed under Artistic License 1.0 > (), nYume is not part of powtils. The nYume code I have shows the following license. It doesn't mention the exactly licences

[fpc-pascal] Re: Embedded web server

2011-02-25 Thread Ben
Op 2011-02-25 12:13, michael.vancann...@wisa.be het geskryf: > > As far as I know: > > Not unless you let it listen on a port >1024. Ports < 1024 are restricted > to root. Changing the port number is not a problem for us. I just tested nYume, and indeed using something like port 8085 worked perf

Re: [fpc-pascal] Re: Embedded web server

2011-02-25 Thread michael . vancanneyt
On Fri, 25 Feb 2011, Florian Klaempfl wrote: Am 25.02.2011 11:18, schrieb michael.vancann...@wisa.be: On Fri, 25 Feb 2011, Ben wrote: Op 2011-02-25 11:47, Jorge Aldo G. de F. Junior het geskryf: iirc aservia was an experiment. Oh. So what everything is the different between Aservia vs

[fpc-pascal] Re: Embedded web server

2011-02-25 Thread Ben
Op 2011-02-25 12:18, michael.vancann...@wisa.be het geskryf: > > I just downloaded it. It is extremely leightweight and has no external > dependencies; Exactly why I like it! A simple +-1000 lines of code, and it has CGI support. Our first tests show the CGI apps working without problems using nY

Re: [fpc-pascal] Re: Embedded web server

2011-02-25 Thread Jonas Maebe
On 25 Feb 2011, at 11:18, michael.vancann...@wisa.be wrote: I just downloaded it. It is extremely leightweight and has no external dependencies; Since it looks like it is abandoned, I will see if we can incorporate it in FPC. It will make testing a lot easier for fpWeb. It seems that it's

Re: [fpc-pascal] Re: Embedded web server

2011-02-25 Thread Florian Klaempfl
Am 25.02.2011 11:18, schrieb michael.vancann...@wisa.be: > > > On Fri, 25 Feb 2011, Ben wrote: > >> Op 2011-02-25 11:47, Jorge Aldo G. de F. Junior het geskryf: >>> iirc aservia was an experiment. >> >> Oh. So what everything is the different between Aservia vs nYume? >> >> >>> why would you cho

Re: [fpc-pascal] Re: Embedded web server

2011-02-25 Thread michael . vancanneyt
On Fri, 25 Feb 2011, Ben wrote: Op 2011-02-25 11:47, Jorge Aldo G. de F. Junior het geskryf: iirc aservia was an experiment. Oh. So what everything is the different between Aservia vs nYume? why would you choose aservia over lightwebserver ? I was just looking at what aservia can do. I

Re: [fpc-pascal] Re: Embedded web server

2011-02-25 Thread michael . vancanneyt
On Fri, 25 Feb 2011, Ben wrote: Op 2011-02-25 11:47, Jorge Aldo G. de F. Junior het geskryf: iirc aservia was an experiment. Oh. So what everything is the different between Aservia vs nYume? why would you choose aservia over lightwebserver ? I was just looking at what aservia can do. I

[fpc-pascal] Re: Embedded web server

2011-02-25 Thread Ben
Op 2011-02-25 11:47, Jorge Aldo G. de F. Junior het geskryf: > iirc aservia was an experiment. Oh. So what everything is the different between Aservia vs nYume? > why would you choose aservia over lightwebserver ? I was just looking at what aservia can do. I haven't played with lightwebserver e

Re: [fpc-pascal] Re: Embedded web server

2011-02-25 Thread Jorge Aldo G. de F. Junior
iirc aservia was an experiment. why would you choose aservia over lightwebserver ? 2011/2/25 Ben : > Op 2011-02-25 10:27, Ben het geskryf: >> >> I checked out the whole 'dev' tree sitting at revision r444. >> That code [Aservia] doesn't compile at all... I read the readme file and > > OK, after l

[fpc-pascal] Re: Embedded web server

2011-02-25 Thread Ben
Op 2011-02-25 10:27, Ben het geskryf: > > I checked out the whole 'dev' tree sitting at revision r444. > That code [Aservia] doesn't compile at all... I read the readme file and OK, after looking at the FPC code to see how the old socket functions map to the newer fp* functions I managed to fix a

[fpc-pascal] Re: Embedded web server

2011-02-25 Thread Ben
Op 2011-02-24 17:10, Marcos Douglas het geskryf: > > See the project Aservia, in Powtils' tools > http://powtils.googlecode.com/svn/dev/tools/aservia/ I checked out the whole 'dev' tree sitting at revision r444. That code [Aservia] doesn't compile at all... I read the readme file and tried with t