[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 the following command, using FPC 2.4.3.  I changed some
deprecated calls like Bind() to fpbind() etc, but still no luck compiling.

   fpc -B -FUunits -Fu../../main/ aservia.dpr




-- 

Ben.

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


[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 and compile aservia
under FPC 2.4.3 Linux 64-bit.

Now how am I supposed to run it as a webserver? Simply running
'./aservia' outputs some HTML to the console and terminates the
application. Output shown below:

-
[aservia]$ ./aservia -h
Content-type: text/html




Serving from seven to eleven every night,
It really makes life a drag, I don't think that's right.
I've really, really been the best of fools, I did what I could.
'Cause I love you, baby,
...snip...
Love,

 Aservia



-


-- 

Ben.

___
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 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 looking at the FPC code to see how the old socket functions
> map to the newer fp* functions I managed to fix and compile aservia
> under FPC 2.4.3 Linux 64-bit.
>
> Now how am I supposed to run it as a webserver? Simply running
> './aservia' outputs some HTML to the console and terminates the
> application. Output shown below:
>
> -
> [aservia]$ ./aservia -h
> Content-type: text/html
>
> 
> 
> 
> Serving from seven to eleven every night,
> It really makes life a drag, I don't think that's right.
> I've really, really been the best of fools, I did what I could.
> 'Cause I love you, baby,
> ...snip...
> Love,
>
>  Aservia
> 
> 
> 
> -
>
>
> --
>
>            Ben.
>
> ___
> 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] 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 either. What I like about nYume, is the no dependency on
external code/libraries/components. nYume only uses what is included
with FPC already.

It took me 5 minutes to get nYume to compile under the latest FPC 2.4.3
(64-bit linux).

We have a product that will require an embedded web server, so nYume
looks like a good choice. We just need to test its CGI support thoroughly.

Now, does anybody know if one can run a [embedded] webserver like nYume
as a standard desktop user under Linux? Without doing something like:

  $ sudo ./nYume




-- 

Ben.

___
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 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 haven't played with
lightwebserver either. What I like about nYume, is the no dependency on
external code/libraries/components. nYume only uses what is included
with FPC already.

It took me 5 minutes to get nYume to compile under the latest FPC 2.4.3
(64-bit linux).

We have a product that will require an embedded web server, so nYume
looks like a good choice. We just need to test its CGI support thoroughly.

Now, does anybody know if one can run a [embedded] webserver like nYume
as a standard desktop user under Linux? Without doing something like:

 $ sudo ./nYume


As far as I know:

Not unless you let it listen on a port >1024. Ports < 1024 are restricted
to root. Apache and so on first listen to the port, and then change user 
to  a user with lower rights.


At least, it used to be so 10 years ago. Maybe things got less strict these 
days.

Michael.
___
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 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 haven't played with
lightwebserver either. What I like about nYume, is the no dependency on
external code/libraries/components. nYume only uses what is included
with FPC already.


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.


Michael.
___
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 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 choose aservia over lightwebserver ?
>>
>> I was just looking at what aservia can do. I haven't played with
>> lightwebserver either. What I like about nYume, is the no dependency on
>> external code/libraries/components. nYume only uses what is included
>> with FPC already.
> 
> 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.
> 

fphttpd is no abandoned :)

___
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 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 licensed under Artistic License 1.0 (), which is GPL-incompatible (and possibly also incompatible with a  
number of other open source/free software licenses). While that does  
not mean that it can't be used together with FPC, I'm not sure whether  
it's a good idea to include components written from scratch in Pascal  
that limit license choices for people that use them.



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


[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 nYume. :)


> 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.

That would be cool. Like Delphi and Kylix did web debugging.

I can email you an already "fixed" version that works with FPC 2.4.3 if
you want - though you wrote the Sockets unit (if I remember correctly
from the header comment), so will probably find it very is to fix too. :)



-- 

Ben.

___
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 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 nYume?



why would you choose aservia over lightwebserver ?


I was just looking at what aservia can do. I haven't played with
lightwebserver either. What I like about nYume, is the no dependency on
external code/libraries/components. nYume only uses what is included
with FPC already.


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.



fphttpd is no abandoned :)


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... ?

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


[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 perfectly with a
standard user! Thanks a million. :)




-- 

Ben.

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


[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 name like GPL, MPL etc...

-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

1. You may copy and distribute verbatim copies of the Program's source
code as you receive it, in any medium, provided that you conspicuously
and appropriately publish on each copy an appropriate copyright notice
and disclaimer of warranty; keep intact all the notices that refer to
this License and to the absence of any warranty; and give any other
recipients of the Program a copy of this License along with the Program.

2. You may modify your copy or copies of the Program or any portion of
it, thus forming a work based on the Program, and copy and distribute
such modifications or work under the terms of Section 1 above, provided
that you also meet all of these conditions:

You must cause the modified files to carry prominent notices stating
that you changed the files and the date of any change.
You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any part
thereof, to be licensed as a whole at no charge to all third parties
under the terms of this License.
If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use in
the most ordinary way, to print or display an announcement including an
appropriate copyright notice and a notice that there is no warranty (or
else, saying that you provide a warranty) and that users may
redistribute the program under these conditions, and telling the user
how to view a copy of this License. (Exception: if the Program itself is
interactive but does not normally print such an announcement, your work
based on the Program is not required to print an announcement.)

3. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt otherwise
to copy, modify, sublicense or distribute the Program is void, and will
automatically terminate your rights under this License. However, parties
who have received copies, or rights, from you under this License will
not have their licenses terminated so long as such parties remain in
full compliance.

4. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and all
its terms and conditions for copying, distributing or modifying the
Program or works based on it.

5. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further restrictions
on the recipients' exercise of the rights granted herein. You are not
responsible for enforcing compliance by third parties to this License.

6. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the
author to ask for permission.

7. Because the program is licensed free of charge, there is no warranty
for the program, to the extent permitted by applicable law. Except when
otherwise stated in writing the copyright holders and/or other parties
provide the program "as is" without warranty of any kind, either
expressed or implied, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose. The
entire risk as to the quality and performance of the program is with
you. Should the program prove defective, you assume the cost of all
necessary servicing, repair or correction.
-




-- 

Ben.

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


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 have it working for years in 
> Windows 32 bits, and I think that it could be a nice thing to extend 
> it in fpc-Lazarus to other CPU and FPU architectures.

Have a look at FPC package symbolic. It sounds like roughly the same kind of
soup.  (parsing, differentiating, fast eval)
 
___
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 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 have to import all the
competing socket suites. (Indy,Synapse)
___
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 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 doesn't mention the exactly licences name like GPL, MPL  
etc...


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.



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


[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 project with that code. Or should someone with a more official
capacity (part of FPC team) rather contact the author?

On the other hand... A webserver is a defined algorithm: sockets, TCP,
HTTP, CGI etc... so any web server implementation would essentially end
up being very similar to the same really. So can a software licence
really be applied to something like that [webserver functionality -
implemented protocols]? Just a thought.



-- 

Ben.

___
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?revision=1 
 ) and a BSD license without the advertising clause (such as the  
"Modified BSD License" or "New BSD License").



Or should someone with a more official
capacity (part of FPC team) rather contact the author?


It doesn't matter.


On the other hand... A webserver is a defined algorithm: sockets, TCP,
HTTP, CGI etc... so any web server implementation would essentially  
end

up being very similar to the same really. So can a software licence
really be applied to something like that [webserver functionality -
implemented protocols]?


Copyright (which forms the basis for such software licenses) cannot  
not apply to "webserver functionality" nor to "implemented protocols".  
It does apply to a concrete implementation thereof though. Even if two  
people independently writing a web server would end up with exactly  
the same code, both programs would be copyrighted by their respective  
authors and they alone would be able to determine under what terms the  
copy they wrote themselves could be distributed/used.


There are limitations as to what can constitute a "creative work" that  
qualifies for copyright protection (e.g., it's unlikely that a regular  
"hello world" program would), but a complete webserver implementation  
almost certainly does in pretty much every jurisdiction.



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


[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] 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
version.

I think the Superficies version 2 is newer and preferred for porting. The
3-D images are rotated nicely without OpenGL support. Good.

I tried to convert it but there are 3rd party components which are not
ported to Lazarus.
Also, there are references to TBitmap.ScanLine which is not portable. The
Superficies v.1 seems to have much more of them, so the code has become more
portable.

What are the 64-bit problems you faced?

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

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 scope, it is finalised  
automatically. It is safe when this happens in a different thread than  
the one in which it was created.



Jonas
___
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 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/listinfo/fpc-pascal


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: 
There are 2 parallel implementations.


I have no problem with including it in FPC, but it's not my call...

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


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 finalised
> automatically. It is safe when this happens in a different thread than
> the one in which it was created.

I have a producer thread that allocates memory for a record using new().
This record also contains a dynamic array, which is allocated with
setlength(). The record address is then put in a TThreadList.

The consumer thread gets the record address from the TThreadlist and
processes the data. The memory must then be free'd, in the consumer thread.

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 improvement but still some leaks.

I get the feeling the arrays are sometimes not free'd but I don't
understand why.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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 improvement but still some leaks.

I get the feeling the arrays are sometimes not free'd but I don't
understand why.


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 that something else is wrong in your program.



Jonas
___
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 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 really cant do anything more advanced like a
full fledged webserver without resorting to synapse, lnet or indy).

2011/2/25  :
>
>
> 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: There are 2 parallel implementations.
>
> I have no problem with including it in FPC, but it's not my call...
>
> Michael.
> ___
> 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] 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 that something else is wrong in your program.
>
Thank you.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[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 issues will
be quickly noted and probably fixed.


> full fledged webserver without resorting to synapse, lnet or indy).

I don't believe the idea was for a "full fledged webserver", but rather
a simple lightweight / embedded webserver to help with debugging CGI and
other web apps.



-- 

Ben.

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


[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.

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


[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 powtils.  The nYume code I have shows the following
>> license. It doesn't mention the exactly licences name like GPL, MPL etc...
> 
> It seems like a copy/paste of a part of the GPLv2. 

With an infusion of BSD+adv... which renders it GPL incompatible...
Looks like the license author tried to achieve best of both baskets;
But effectively probably fenced himself from both...


> Putting GPL code into FPC's packages is not that good either, since it 
> prevents usage in closed source programs.
> 
> 
> Jonas

L.

___
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 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 implementations.
> 
> I have no problem with including it in FPC, but it's not my call...

I will no longer object, the earlier remark was an attempt at humor(because
I know how much you guys fear importing Indy into the tree).  I haven't been
able to further the indy cause much lately, so it would be a bit infantile
to keep blocking this. So I won't any longer.

But I will use this moment to reiterate my reasoning, why I don't like lnet
to be incorporated into the tree.  (compared to Indy or Synapse, don't care
which)

That is that it is incomplete (only a few protocols), and from what I've
seen from it requires quite some knowledge to operate.  It is not something
I'd like to advocate to users, at least not when there are better
alternatives.  In short, it seems its only virtue seems to be its small
size.

Florian:
> Well, fppkg uses it for years already, see utils/fppkg/lnet

Under the condition that it was only for embedded use in fppkg. 

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


[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 objects, can i pass ansistrings ? (i can serialize
deserialize the object internal states)

i know that passing ansistrings or tobjects would make the plugin
system compatible with pascal only, but i dont care about that.

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


[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 ansistrings or tobjects would make the plugin system
> compatible with pascal only

Perhaps even worse, to FPC only.

-- 
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Passing-objects-to-libraries-and-back-tp3401092p3401184.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