Re: [Lazarus] SimpleIPC

2017-10-14 Thread Terry A. Haimann via Lazarus
I have fpc 2.6.4 and I can't find such an examples directory.
It's on a Linux Mint install.

On Sat, 2017-10-14 at 18:33 -0300, Marcos Douglas B. Santos wrote:
> On Sat, Oct 14, 2017 at 3:38 PM, Terry A. Haimann via Lazarus
>  wrote:
> > I would like to see a example program forSimpleIPC Server and client.
> > It would be most helpful if these were cli programs so that I could see
> > what libraries were required.
> 
> There are some examples in \packages\fcl-process\examples directory.
> 
> Regards,
> Marcos Douglas


-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] SimpleIPC

2017-10-14 Thread Marcos Douglas B. Santos via Lazarus
On Sat, Oct 14, 2017 at 3:38 PM, Terry A. Haimann via Lazarus
 wrote:
> I would like to see a example program forSimpleIPC Server and client.
> It would be most helpful if these were cli programs so that I could see
> what libraries were required.

There are some examples in \packages\fcl-process\examples directory.

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Packages and units with the same name

2017-10-14 Thread Marcos Douglas B. Santos via Lazarus
On Sat, Oct 14, 2017 at 4:33 AM, Sven Barth via Lazarus
 wrote:
> Am 14.10.2017 00:03 schrieb "Marcos Douglas B. Santos via Lazarus"
> :
>>
>> On Fri, Oct 13, 2017 at 6:40 PM, Sven Barth via Lazarus
>>  wrote:
>> > On 13.10.2017 21:32, Marcos Douglas B. Santos via Lazarus wrote:
>> >> [...]
>> >>
>> >> IMHO, would be better if packages may have just some "exported units".
>> >> What do you think?
>> >
>> > It doesn't matter. Any symbols in a unit are mangled only locally to the
>> > unit and there *can not* be two or more symbols with the same name in
>> > one program. What you ask for is simply not possible.
>>
>> Is it not possible *today* or never?
>> I don't know how the compiler works, but try to understand me:
>> I would like to modularize a big program in small packages — because
>> it's better than to use dll/so.
>> Each one these packages will work in a bounded context. Each one may
>> have a "Facade" to the main program, exposing its "interface" (classes
>> and interfaces, most).
>> So, the main program shouldn't know nothing about "private units" that
>> belongs only for the package.
>> That is encapsulation too.
>
> I can very reasonably say that this will never be possible. It's simply how
> things work on the binary level. And as I said that's also true for dynamic
> packages (which are a different beast than Lazarus' packages): even if a
> unit becomes part of a package it won't be touched as it can be used as part
> of the package as well as directly in the application binary without any
> changes.
> Unit names *must* be unique inside a program (with or without packages). So
> better use prefixes or dotted unit names to reduce the chance for conflicts.

My next question would be about dynamic packages... but you've already
answered me.
Thanks for all information.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Packages and units with the same name

2017-10-14 Thread Sven Barth via Lazarus
Am 14.10.2017 00:03 schrieb "Marcos Douglas B. Santos via Lazarus" <
lazarus@lists.lazarus-ide.org>:
>
> On Fri, Oct 13, 2017 at 6:40 PM, Sven Barth via Lazarus
>  wrote:
> > On 13.10.2017 21:32, Marcos Douglas B. Santos via Lazarus wrote:
> >> [...]
> >>
> >> IMHO, would be better if packages may have just some "exported units".
> >> What do you think?
> >
> > It doesn't matter. Any symbols in a unit are mangled only locally to the
> > unit and there *can not* be two or more symbols with the same name in
> > one program. What you ask for is simply not possible.
>
> Is it not possible *today* or never?
> I don't know how the compiler works, but try to understand me:
> I would like to modularize a big program in small packages — because
> it's better than to use dll/so.
> Each one these packages will work in a bounded context. Each one may
> have a "Facade" to the main program, exposing its "interface" (classes
> and interfaces, most).
> So, the main program shouldn't know nothing about "private units" that
> belongs only for the package.
> That is encapsulation too.

I can very reasonably say that this will never be possible. It's simply how
things work on the binary level. And as I said that's also true for dynamic
packages (which are a different beast than Lazarus' packages): even if a
unit becomes part of a package it won't be touched as it can be used as
part of the package as well as directly in the application binary without
any changes.
Unit names *must* be unique inside a program (with or without packages). So
better use prefixes or dotted unit names to reduce the chance for conflicts.

Regards
Sven
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus