Re: [fpc-pascal] about interface and multiple inheritance

2015-02-26 Thread Sven Barth
Am 26.02.2015 15:43 schrieb Graeme Geldenhuys mailingli...@geldenhuys.co.uk: On 2015-02-26 14:34, Michael Schnell wrote: In fact I did understand I only am puzzled by the naming COM vs CORBA, that in no way suggest the real (language-) functionality ref counting vs not ref counting I

Re: [fpc-pascal] about interface and multiple inheritance

2015-02-26 Thread Sven Barth
Am 26.02.2015 15:43 schrieb Graeme Geldenhuys mailingli...@geldenhuys.co.uk: On 2015-02-26 14:34, Michael Schnell wrote: In fact I did understand I only am puzzled by the naming COM vs CORBA, that in no way suggest the real (language-) functionality ref counting vs not ref counting I

Re: [fpc-pascal] fpc-src_2.6.4-140420_i386 from debs at sourceforge : error while processing dpkg install

2015-02-26 Thread Mattias Gaertner
On Thu, 26 Feb 2015 12:12:01 + Lukasz Sokol el.es...@gmail.com wrote: On 26/02/15 11:12, Mattias Gaertner wrote: On Thu, 26 Feb 2015 10:09:33 + Lukasz Sokol el.es...@gmail.com wrote: I got : dpkg: error processing fpc-src_2.6.4-140420_i386.deb (--install): trying to

Re: [fpc-pascal] fpc-src_2.6.4-140420_i386 from debs at sourceforge : error while processing dpkg install

2015-02-26 Thread Lukasz Sokol
On 26/02/15 15:03, Mattias Gaertner wrote: On Thu, 26 Feb 2015 12:12:01 + Lukasz Sokol el.es...@gmail.com wrote: Ah so I should have uninstalled the 'source' package first... Yes. I will add a 'Replaces: fpc-source', so that the next fpc-src deb will automatically uninstall the

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Henry Vermaak
On Thu, Feb 26, 2015 at 09:23:33PM +0800, Xiangrong Fang wrote: ​I use rtlevent, but only meant to maintain a pool of threads, while there is no task for a thread it is blocked waiting for an event. BUT, that cannot be used to prioritize a thread. While you block a thread using rtlevent, it

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Marco van de Voort
In our previous episode, Xiangrong Fang said: BUT, that cannot be used to prioritize a thread. While you block a thread using rtlevent, it can only be unblocked from another thread. While you use sleep(), it still get time share of the CPU, only that it does nothing until sleep finishes,

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Michael Schnell
On 02/26/2015 03:34 PM, Xiangrong Fang wrote: That's even better. As said: sleep() does make sense when used for the purpose it's provided for (by the OS). And in that use, it imposes the lowest possible overhead. -Michael ___ fpc-pascal maillist

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Xiangrong Fang
2015-02-26 21:53 GMT+08:00 Marco van de Voort mar...@stack.nl: No, basically a sleeping thread is marked in the scheduler as do not schedule for nn ticks. The thread doesn't run to evaluate if it should contiue. That is the scheduler/kernel's task. ​That's even better. And the key point

Re: [fpc-pascal] about interface and multiple inheritance

2015-02-26 Thread Marcos Douglas
On Thu, Feb 26, 2015 at 7:33 AM, Michael Schnell mschn...@lumino.de wrote: On 02/26/2015 11:28 AM, Graeme Geldenhuys wrote: Not ALL interfaces are reference-counted and auto-destroying. You can create CORBA-style interfaces which are _not_ reference counted but still have the full advantage

Re: [fpc-pascal] about interface and multiple inheritance

2015-02-26 Thread Michael Schnell
On 02/26/2015 03:29 PM, Graeme Geldenhuys wrote: I think you miss understood CORBA interfaces. I don’t know why it was named as such in FPC, but it definitely doesn’t require or depend on an external framework or services etc. CORBA interfaces are simply interfaces (language feature) without

Re: [fpc-pascal] about interface and multiple inheritance

2015-02-26 Thread Graeme Geldenhuys
On 2015-02-26 14:34, Michael Schnell wrote: In fact I did understand I only am puzzled by the naming COM vs CORBA, that in no way suggest the real (language-) functionality ref counting vs not ref counting I know COM interface come from the need to interact with Windows COM. CORBA (in terms

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Xiangrong Fang
2015-02-26 18:50 GMT+08:00 Henry Vermaak henry.verm...@gmail.com: Sleep is for granting the CPU for other processes for (at least) a predefined time. See the mail of the original poster: this is what he asked for. ​Thats ri​ght. This is incorrect, since if you pause a thread with

Re: [fpc-pascal] about interface and multiple inheritance

2015-02-26 Thread Michael Schnell
On 02/26/2015 02:04 PM, Marcos Douglas wrote: FPC give us the option to use CORBA or COM interfaces. Neither COM nor CORBA is something that is imposed by the language, but it's features are due to some external framework. While interface (as discussed in this thread) is a language feature

Re: [fpc-pascal] about interface and multiple inheritance

2015-02-26 Thread Graeme Geldenhuys
On 2015-02-26 13:48, Michael Schnell wrote: Neither COM nor CORBA is something that is imposed by the language, but it's features are due to some external framework. I think you miss understood CORBA interfaces. I don’t know why it was named as such in FPC, but it definitely doesn’t require or

Re: [fpc-pascal] about interface and multiple inheritance

2015-02-26 Thread Marco van de Voort
In our previous episode, Michael Schnell said: In fact I did understand I only am puzzled by the naming COM vs CORBA, that in no way suggest the real (language-) functionality ref counting vs not ref counting IIRC there was discussion back then about having non COM interfaces. Corba

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Michael Schnell
On 02/25/2015 09:17 PM, fredvs wrote: Hello. You may use RTLEvents to pause a thread. = Obviously CPU the overhead is a lot greater than with just calling sleep. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Marco van de Voort
In our previous episode, Michael Schnell said: You may use RTLEvents to pause a thread. = Obviously CPU the overhead is a lot greater than with just calling sleep. ??? Afaik they are the procedural counterpart of TEvents, and I think that using them is cheaper than sleep, since you only

[fpc-pascal] fpc-src_2.6.4-140420_i386 from debs at sourceforge : error while processing dpkg install

2015-02-26 Thread Lukasz Sokol
I got : dpkg: error processing fpc-src_2.6.4-140420_i386.deb (--install): trying to overwrite '/usr/share/fpcsrc/2.6.4/packages/postgres/src/postgres3.pp', which is also in package fpc-source-2.6.4 2.6.4+dfsg-4~bpo70+1 while installing the three debs intentionally as replacement of those got

Re: [fpc-pascal] about interface and multiple inheritance

2015-02-26 Thread Graeme Geldenhuys
On 2015-02-25 09:23, Michael Schnell wrote: reference-counted and auto-destroying Not ALL interfaces are reference-counted and auto-destroying. You can create CORBA-style interfaces which are _not_ reference counted but still have the full advantage of a interface. Regards, - Graeme - --

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Michael Schnell
On 02/26/2015 11:33 AM, Henry Vermaak wrote: Blocking with an even will sleep until someone wakes you up, it's very efficient. Using sleep() you will have to wake up, check if someone needs you, go to sleep again, etc. This is obviously more inefficient. We were talking about the overhead of

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Michael Schnell
On 02/26/2015 10:50 AM, Marco van de Voort wrote: ??? Afaik they are the procedural counterpart of TEvents, and I think that using them is cheaper than sleep, since you only unblock when needed. ??? I _thought_ sleep would just call the appropriate OS function but in fact it does Function

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Michael Schnell
On 02/26/2015 11:14 AM, Michael Schnell wrote: I don't know what this does. With stepping in ASM I verified that (after some calculation) it does just a single syscall (via a sysenter Assembler instruction). so the overhead is minimal. -Michael

Re: [fpc-pascal] about interface and multiple inheritance

2015-02-26 Thread Michael Schnell
On 02/26/2015 11:28 AM, Graeme Geldenhuys wrote: Not ALL interfaces are reference-counted and auto-destroying. You can create CORBA-style interfaces which are _not_ reference counted but still have the full advantage of a interface. I see. hence interface denotes two language constructs that

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Henry Vermaak
On Thu, Feb 26, 2015 at 11:20:41AM +0100, Michael Schnell wrote: On 02/26/2015 11:14 AM, Michael Schnell wrote: I don't know what this does. With stepping in ASM I verified that (after some calculation) it does just a single syscall (via a sysenter Assembler instruction). so the overhead is

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Michael Schnell
On 02/26/2015 11:50 AM, Henry Vermaak wrote: Obviously CPU the overhead is a lot greater than with just calling sleep. . Regarding the context ;-) -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Use sleep in thread

2015-02-26 Thread Henry Vermaak
On Thu, Feb 26, 2015 at 11:40:44AM +0100, Michael Schnell wrote: On 02/26/2015 11:33 AM, Henry Vermaak wrote: Blocking with an even will sleep until someone wakes you up, it's very efficient. Using sleep() you will have to wake up, check if someone needs you, go to sleep again, etc. This is

Re: [fpc-pascal] fpc-src_2.6.4-140420_i386 from debs at sourceforge : error while processing dpkg install

2015-02-26 Thread Mattias Gaertner
On Thu, 26 Feb 2015 10:09:33 + Lukasz Sokol el.es...@gmail.com wrote: I got : dpkg: error processing fpc-src_2.6.4-140420_i386.deb (--install): trying to overwrite '/usr/share/fpcsrc/2.6.4/packages/postgres/src/postgres3.pp', which is also in package fpc-source-2.6.4

Re: [fpc-pascal] fpc-src_2.6.4-140420_i386 from debs at sourceforge : error while processing dpkg install

2015-02-26 Thread Lukasz Sokol
On 26/02/15 11:12, Mattias Gaertner wrote: On Thu, 26 Feb 2015 10:09:33 + Lukasz Sokol el.es...@gmail.com wrote: I got : dpkg: error processing fpc-src_2.6.4-140420_i386.deb (--install): trying to overwrite '/usr/share/fpcsrc/2.6.4/packages/postgres/src/postgres3.pp', which is also