Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread waldo kitty
On 10/29/2013 6:53 PM, Mark Morgan Lloyd wrote: waldo kitty wrote: Another useful variant is giving *the* *last* parameter an optional value, which will allow you to omit the parameter: procedure MyObject.MyRoutine(const VarA : string; VarB: integer= -1); very interesting... will this work w

Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread Mark Morgan Lloyd
waldo kitty wrote: Another useful variant is giving *the* *last* parameter an optional value, which will allow you to omit the parameter: procedure MyObject.MyRoutine(const VarA : string; VarB: integer= -1); very interesting... will this work with both parameters, too? i don't think i need

Re: [fpc-pascal] Linux Socket Programming

2013-10-29 Thread Marco van de Voort
In our previous episode, Robert Wolfe said: > I am wanting to get into learning and doing some Linux socket > programming in FPC. However, the tutorials I have found all do not seem > to work with the latest iteration of FPC 2.6 (the ones I've found will > only work with 2.0.0 only). > > If an

Re: [fpc-pascal] Linux Socket Programming

2013-10-29 Thread Paul Breneman
On 10/29/2013 03:52 PM, Robert Wolfe wrote: Hi all! I am wanting to get into learning and doing some Linux socket programming in FPC. However, the tutorials I have found all do not seem to work with the latest iteration of FPC 2.6 (the ones I've found will only work with 2.0.0 only). If anyone

[fpc-pascal] Linux Socket Programming

2013-10-29 Thread Robert Wolfe
Hi all! I am wanting to get into learning and doing some Linux socket programming in FPC. However, the tutorials I have found all do not seem to work with the latest iteration of FPC 2.6 (the ones I've found will only work with 2.0.0 only). If anyone knows of where I could find some updated

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Dmitry Boyarintsev
On Tue, Oct 29, 2013 at 3:50 PM, Marcos Douglas wrote: > Yes, works... but the language allow hide the unit name and nobody > uses unit name as an identifier in 99% of cases, Am I right? So, > problems can be happen. > > From my experience I'd say no. I actually had to use the explicit unit name

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Dmitry Boyarintsev
On Tue, Oct 29, 2013 at 8:02 AM, Marcos Douglas wrote: > You didn't understand. > The namespace we talk about is like a "dinamic namespace". The > programmer can choose which "names" he will use in your projects when > these projects are using third-party frameworks. > In Java, eg, you can change

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Marcos Douglas
On Tue, Oct 29, 2013 at 3:01 PM, Ewald wrote: > Once upon a time, Marcos Douglas said: >> Do you (all) use prefix in Procedures and/or Functions too? ;-) > Unitname.GetHandler() ? Yes, works... but the language allow hide the unit name and nobody uses unit name as an identifier in 99% of cases, A

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Marcos Douglas
On Tue, Oct 29, 2013 at 1:31 PM, leledumbo wrote: >> Another type of conflict happens -- but no one talks about it -- using > procedure/function with the same parameters in different units. > Eg: GetHandler(); If you use two units that have a GetHandler > function, in a third unit, you have a tro

Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread waldo kitty
On 10/29/2013 2:35 PM, Mark Morgan Lloyd wrote: waldo kitty wrote: example: procedure MyObject.MyRoutine; procedure MyObject.MyRoutine(VarA : SomeType); procedure MyObject.MyRoutine(VarA : string; VarB: integer); at one point, the first instance would be used... at another

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Marcos Douglas
On Tue, Oct 29, 2013 at 12:55 PM, Reimar Grabowski wrote: > On Tue, 29 Oct 2013 13:22:47 -0200 > Marcos Douglas wrote: > >> Do you (all) use prefix in Procedures and/or Functions too? ;-) > Nope, we use classes and methods instead of global procedures and functions. > ;) Me too but, unfortunat

Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread waldo kitty
On 10/29/2013 1:56 PM, Sven Barth wrote: Am 29.10.2013 18:21 schrieb "waldo kitty" : > example: procedure MyObject.MyRoutine; > procedure MyObject.MyRoutine(VarA : SomeType); > procedure MyObject.MyRoutine(VarA : string; VarB: integer); > > at one point, the first instan

Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread Mark Morgan Lloyd
waldo kitty wrote: question: in simple language, how can i have a routine with differing parameters like some routines in FPC and Lazarus do? i've never attempted this before and it is completely alien to my experience but i do use the functionality quite a lot with existing routines... descr

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Ewald
Once upon a time, Marcos Douglas said: > Do you (all) use prefix in Procedures and/or Functions too? ;-) Unitname.GetHandler() ? -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pasca

Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread Sven Barth
Am 29.10.2013 18:21 schrieb "waldo kitty" : > > > question: in simple language, how can i have a routine with differing parameters like some routines in FPC and Lazarus do? i've never attempted this before and it is completely alien to my experience but i do use the functionality quite a lot with e

Re: [fpc-pascal] Efficient String concatenation

2013-10-29 Thread Jonas Maebe
On 29/10/13 18:17, John Lee wrote: On 29 October 2013 13:22, Graeme Geldenhuys wrote: This is a very impressive little blog about efficient string concatenation in Delphi. But it also applies to Free Pascal. http://www.delphitools.info/2013/10/28/efficient-string-concatenation-in-delphi/ >

[fpc-pascal] same routine with different parameters?

2013-10-29 Thread waldo kitty
question: in simple language, how can i have a routine with differing parameters like some routines in FPC and Lazarus do? i've never attempted this before and it is completely alien to my experience but i do use the functionality quite a lot with existing routines... description: i have a c

Re: [fpc-pascal] Efficient String concatenation

2013-10-29 Thread John Lee
Did you try any other fpc compiler optimisation settings? No expert, but looks like it isn't too difficult for compiler to spot this. What about llvm - (coming soon to fpc apparently) - would that fix it? John On 29 October 2013 13:22, Graeme Geldenhuys wrote: > Hi, > > This is a very impres

Re: [fpc-pascal] Powtils: lightwebserver, lightwebserver2 or lightwebserver3?

2013-10-29 Thread Michael Van Canneyt
On Tue, 29 Oct 2013, John Lee wrote: Is this assessment valid for win or linux or both? J Both. To my knowledge, Graeme works on both platforms equally. I myself am biased towards Linux, but I do have knowledge of people using it extensively on Windows. Michael.

[fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread leledumbo
> Another type of conflict happens -- but no one talks about it -- using procedure/function with the same parameters in different units. Eg: GetHandler(); If you use two units that have a GetHandler function, in a third unit, you have a trouble. Do you (all) use prefix in Procedures and/or Fun

Re: [fpc-pascal] Powtils: lightwebserver, lightwebserver2 or lightwebserver3?

2013-10-29 Thread John Lee
Is this assessment valid for win or linux or both? J On 28 October 2013 13:22, Graeme Geldenhuys wrote: > > > On Monday 28/10/2013 at 15:03, silvioprog wrote: > > So, which one is recommended to be used in production? > > > Having recently (and currently still) doing extensive work with embedde

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Reimar Grabowski
On Tue, 29 Oct 2013 13:22:47 -0200 Marcos Douglas wrote: > Do you (all) use prefix in Procedures and/or Functions too? ;-) Nope, we use classes and methods instead of global procedures and functions. ;) R. ___ fpc-pascal maillist - fpc-pascal@lists.

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Marcos Douglas
On Tue, Oct 29, 2013 at 4:10 AM, Graeme Geldenhuys wrote: > > On Tuesday 29/10/2013 at 03:50, Dmitry Boyarintsev wrote: > >> >> Then the John Douglas and Douglas McKey are running into the same issue. >> >> Both guys (while living on different parts of the world) created the same >> "douglas" nam

[fpc-pascal] Efficient String concatenation

2013-10-29 Thread Graeme Geldenhuys
___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > Both guys (while living on different parts of the world) created the > > same "douglas" namespace! > > OK, ok, my example was bad. I would apply the exact same namespace > rules as recommended by Java. In a real situation you should use your

Re: [fpc-pascal] Powtils: lightwebserver, lightwebserver2 or lightwebserver3?

2013-10-29 Thread silvioprog
2013/10/29 Michael Van Canneyt > On Tue, 29 Oct 2013, silvioprog wrote: > >> 2013/10/28 Graeme Geldenhuys >> On Monday 28/10/2013 at 15:03, silvioprog wrote: >> So, which one is recommended to be used in production? >> >> Having recently (and currently still) doing extensive work wit

Re: [fpc-pascal] Argument evaluation order in Free Pascal and Delphi

2013-10-29 Thread Jonas Maebe
On 29 Oct 2013, at 14:35, Michael Van Canneyt wrote: On Tue, 29 Oct 2013, Jonas Maebe wrote: I think they use "evaluation order" as a synonym for "parameter passing order" on that page, given the table below: it says that the order in which the parameters are passed for register/pascal i

Re: [fpc-pascal] Powtils: lightwebserver, lightwebserver2 or lightwebserver3?

2013-10-29 Thread Michael Van Canneyt
On Tue, 29 Oct 2013, silvioprog wrote: 2013/10/28 Graeme Geldenhuys   On Monday 28/10/2013 at 15:03, silvioprog wrote: So, which one is recommended to be used in production? Having recently (and currently still) doing extensive work with embedded HTTP servers, I tested many (Pow

Re: [fpc-pascal] Argument evaluation order in Free Pascal and Delphi

2013-10-29 Thread Michael Van Canneyt
On Tue, 29 Oct 2013, Jonas Maebe wrote: On 29 Oct 2013, at 09:44, Michael Van Canneyt wrote: On Tue, 29 Oct 2013, Sven Barth wrote: The Delphi documentation is however rather vague: http://docwiki.embarcadero.com/RADStudio/XE5/en/Procedures_and_Functions#Calling_Conventions I know this,

Re: [fpc-pascal] Argument evaluation order in Free Pascal and Delphi

2013-10-29 Thread Jonas Maebe
On 29 Oct 2013, at 09:44, Michael Van Canneyt wrote: On Tue, 29 Oct 2013, Sven Barth wrote: The Delphi documentation is however rather vague: http://docwiki.embarcadero.com/RADStudio/XE5/en/Procedures_and_Functions#Calling_Conventions I know this, and it says explicitly "For the register a

Re: [fpc-pascal] Powtils: lightwebserver, lightwebserver2 or lightwebserver3?

2013-10-29 Thread silvioprog
2013/10/28 Graeme Geldenhuys > On Monday 28/10/2013 at 15:03, silvioprog wrote: > > So, which one is recommended to be used in production? > > > Having recently (and currently still) doing extensive work with embedded > HTTP servers, I tested many (Powtils, Indy, tiWebServer, FPC, nYume etc). I >

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Marcos Douglas
On Mon, Oct 28, 2013 at 10:48 PM, Dmitry Boyarintsev wrote: > On Mon, Oct 28, 2013 at 9:27 AM, Graeme Geldenhuys > wrote: >> >> I would have thought that is exactly what namespaces will be handy for! Or >> at least a popular use-case. Macros Douglas could define a "douglas" >> namespace, and the

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Marcos Douglas
On Mon, Oct 28, 2013 at 10:27 AM, Graeme Geldenhuys wrote: > > > On Monday 28/10/2013 at 15:20, leledumbo wrote: > > > Namespace does NOT solve the problem. If MSE units uses M. for their > units and you have yours the same as well, you'll end up renaming either > anyway. > > > I would have though

Re: [fpc-pascal] No access to Embedded FPC HTTP server on Vista or Win7

2013-10-29 Thread Graeme Geldenhuys
On Monday 28/10/2013 at 11:51, Graeme Geldenhuys wrote: Any ideas why this is happening? Just a quick progress update... It seems it wasn't the fcl-web HTTP Server or CGI clients at fault, but rather an Embedded Firebird shared access problem on Windows Vista and later. The webserver ap

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Graeme Geldenhuys
On Tuesday 29/10/2013 at 03:50, Dmitry Boyarintsev wrote: Then the John Douglas and Douglas McKey are running into the same issue. Both guys (while living on different parts of the world) created the same "douglas" namespace! OK, ok, my example was bad. I would apply the exact same

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Reimar Grabowski
On Mon, 28 Oct 2013 21:48:33 -0400 Dmitry Boyarintsev wrote: > Is it much different than just extending the prefix "M" to "MFP"? Of course it is not, actually it's about the same, as you know. IMHO it's not even a feature just another horrible idea of the Delphi guys used to get their VCL and F

Re: [fpc-pascal] Argument evaluation order in Free Pascal and Delphi

2013-10-29 Thread Michael Van Canneyt
On Tue, 29 Oct 2013, Sven Barth wrote: Am 29.10.2013 08:35 schrieb "Michael Van Canneyt" : > > > > On Mon, 28 Oct 2013, Dmitry Pribysh wrote: > >> Hi, >>   >> As it is written in Free Pascal wiki, order of parameter evaluation is not defined in FPC, but it is defined in Delphi (Delphi >> gu

Re: [fpc-pascal] Argument evaluation order in Free Pascal and Delphi

2013-10-29 Thread Jonas Maebe
On 29 Oct 2013, at 08:35, Michael Van Canneyt wrote: > On Mon, 28 Oct 2013, Dmitry Pribysh wrote: > >> As it is written in Free Pascal wiki, order of parameter evaluation is not >> defined in FPC, but it is defined in Delphi (Delphi >> guarantees left-to-right evaluation order). > > Strange.

Re: [fpc-pascal] Argument evaluation order in Free Pascal and Delphi

2013-10-29 Thread Sven Barth
Am 29.10.2013 08:35 schrieb "Michael Van Canneyt" : > > > > On Mon, 28 Oct 2013, Dmitry Pribysh wrote: > >> Hi, >> >> As it is written in Free Pascal wiki, order of parameter evaluation is not defined in FPC, but it is defined in Delphi (Delphi >> guarantees left-to-right evaluation order). > > > S

Re: [fpc-pascal] Argument evaluation order in Free Pascal and Delphi

2013-10-29 Thread Michael Van Canneyt
On Mon, 28 Oct 2013, Dmitry Pribysh wrote: Hi,   As it is written in Free Pascal wiki, order of parameter evaluation is not defined in FPC, but it is defined in Delphi (Delphi guarantees left-to-right evaluation order). Strange. Where is that documented ? Michael.__

Re: [fpc-pascal] How to detect if my program is running with root/elevated privileges?

2013-10-29 Thread Mark Morgan Lloyd
Bart wrote: On 10/28/13, Mark Morgan Lloyd wrote: For windows there is winutils.iswindowsadmin(), for unix likes there is fpgeteuid (which should return zero for root). Also remember unix-style capabilities. Care to elaborate on that? You can use the setcap utility to add or remove capab