Re: A common event loop

2000-09-23 Thread Chaim Frenkel
nd expensive way of doing something 'simple'. And I can't imagine how this would work. Any statement could be interupted with an exception, but there is no mechanism to restart. This is just plain wrong. -- Chaim Frenkel

Re: RFC 178 (v3) Lightweight Threads

2000-09-08 Thread Chaim Frenkel
ne CWD, which is shared by all threads. This means PRL> that the C interface is intrinsically broken under PRL> threads. Not really, what if two threads need different current directories? Same problem, you are just pointing the finger. The others are 'broken' even without threads.

Re: The distinction between "do BLOCK while COND" and "EXPR while COND" should go

2000-09-05 Thread Chaim Frenkel
o == 3. push( &fn(), 35) could be made to work. No longer would a list be returned but an unnamed array. Hmm, might work together with lvalued subs. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: RFC 178 (v2) Lightweight Threads

2000-09-04 Thread Chaim Frenkel
need two or more variables kept in sync. The user has to mediate. Perl can't determine this. Perhaps, I'm archaic, but I really wouldn't mind if the thread model basically copied the fork() model and required those variable that have to live across threads to be marked as :shared.

Re: The distinction between "do BLOCK while COND" and "EXPR while COND" should go

2000-09-04 Thread Chaim Frenkel
ases here. I've been doing perl since sometime in the mid perl4's and clearly I haven't run into something that depended upon this. I wonder how much it would hurt the -internals work. I think I'm not alone in wanting to make the list/array dichotomy go away. -- Chaim Fr

Re: The distinction between "do BLOCK while COND" and "EXPR while COND" should go

2000-09-04 Thread Chaim Frenkel
alar context . But with $x=(, (), ...), why shouldn't the nested set of parenthesis make its insides into a list. Perhaps that's my block. For me the return takes away the thrust of the outside scalar context. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: The distinction between "do BLOCK while COND" and "EXPR while COND" should go

2000-09-03 Thread Chaim Frenkel
st, it should not have its comma changed? Will my proposal bleed into anything else in the language? -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: RFC 178 (v1) Lightweight Threads

2000-09-03 Thread Chaim Frenkel
he user? Perhaps a warning if the contents of a :shared variable moves into a non-shared variable. Alternatively, the thread doing the moving, somehow takes ownership of the contents, and makes the contents unavailable to any other thread? Thoughts? >>>>> "CF"

Re: The distinction between "do BLOCK while COND" and "EXPR while COND" should go

2000-09-03 Thread Chaim Frenkel
list context, but the $x imposes a scalar context on the 'list' at the end. (To keep something of backward compatablity, it probably would need to act differently if the @ is not in the final position.) Now here is where it would probably break, and give you a fit trying to explain it.

Re: RFC 178 (v1) Lightweight Threads

2000-09-02 Thread Chaim Frenkel
uire a :shared on variable anything and everything has to have protection. If you want the variable to be shared declare it. SWM> Example 3: Closures (Ken's example) Aha, I get it. -internals has been assuming that one _must_ specify the sharing. You want it to be infered. I

Re: The distinction between "do BLOCK while COND" and "EXPR while COND" should go

2000-09-02 Thread Chaim Frenkel
t a listish thing. One should learn. I don't want that to change. I simply want that return (I'm not sure how to phrase this) be able to return only a scalar or an aggregate. It should be immune from having a scalar context pushed through from the caller and change the com

Re: RFC 178 (v1) Lightweight Threads

2000-09-01 Thread Chaim Frenkel
r perhaps something else entriely. Would making closures only under direct instructions be something useful? It would add some typing, but would be a guide to both the reader and perl (and perhaps, prevent some unanticipated closures from being created.) -- Chaim Frenkel

Re: The distinction between "do BLOCK while COND" and "EXPR while COND" should go

2000-09-01 Thread Chaim Frenkel
er me. It might be worthwhile enough to kill sub fn { return (7,8,9,10) } $x = fn(); # $x == 10 -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: RFC 120 (v2) Implicit counter in for statements, possibly$#.

2000-08-30 Thread Chaim Frenkel
ed this. I'm not wild about the syntax, JSD> but I like the idea. If everything become objects under-the-hood, JSD> then we could have: JSD>for $a (@array) { print "$a is at $a->index\n"; } JSD> No, I'm not wild about that either, but it's an idea.

Re: Are Perl6 threads preemptive or cooperative?

2000-08-29 Thread Chaim Frenkel
easily be done by the user and probably a lot more efficiently then the pessimistic locking perl would need to perform. >>>>> "DLN" == David L Nicol <[EMAIL PROTECTED]> writes: DLN> Chaim Frenkel wrote: >> >> >>>>> "DLN&qu

Re: Are Perl6 threads preemptive or cooperative?

2000-08-28 Thread Chaim Frenkel
e subroutines _it_ will call? And if you solve that one, I'll throw in tied variables, and evaled statements, and ... That way lies madness. Let us simply give the user the tools needed to manage their locking. -- Chaim Frenkel

Re: Threads and run time/compile time

2000-08-27 Thread Chaim Frenkel
threads per *second*. I cannot possibly get the performance SWM> I need if every thread has to recompile all its own modules. SWM> We could either discuss alternate approaches for RFC1, or I could SWM> submit a new RFC for a thread architecture that gives me the SWM> performance I wan

Re: Are Perl6 threads preemptive or cooperative?

2000-08-27 Thread Chaim Frenkel
tatement boundaries. Here's another one. $x = 3 + &foo() - &bar(); Where does the yield happen? What happens to the yields that are already in the 'optree' for foo and bar? Cooperative only helps _perhaps_ with perl not needing to protrect its own structures. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: Threads and file-scoped lexicals

2000-08-26 Thread Chaim Frenkel
inc_a); SWM> my $t2 = Thread->new(\&inc_a); SWM> $t1->join; SWM> $t2->join; SWM> print "$a"; SWM> sub inc_a SWM> { SWM> $a++; SWM> } SWM> What should the output be? 0? 1? 2? SWM> - SWM -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: Are Perl6 threads preemptive or cooperative?

2000-08-26 Thread Chaim Frenkel
. It won't crash. SWM> 2. After both threads run, $a and $b are both either "abcd" or "wxyz", SWM>(and not, for example, "abyz"). SWM> If the user cares whether the final values of $a and $b are "abcd" or SWM> &

Perl <-> OS API target

2000-08-23 Thread Chaim Frenkel
layer (yeah, I know another speed loss) that would be able to directly target the native threads library/api. The POSIX threads API would be the initial port but then we might be able to get some speed ups by going for the native implementation? -- Chaim Frenkel

Re: Thread usage cases

2000-08-19 Thread Chaim Frenkel
s building an optree and storing a pointer in the global namespace (or package perhaps.) BCW> (Assuming all program globals, of course.) BCW> Thread 1: $a = $b + $c; BCW> Thread 2: $d = $c / $a; BCW> Thread 1, doing statement locking, could lock these $a, $

Re: Do threads support SMP?

2000-08-19 Thread Chaim Frenkel
all <[EMAIL PROTECTED]> writes: SWM> Does Perl6 support Symmetric MultiProcessing (SMP)? SWM> This is a *huge* issue. It affects everything else that we do with SWM> threads. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED]

Re: RFC 63 (v3) Exception handling syntax

2000-08-15 Thread Chaim Frenkel
}" at the PS> beginning of its block, does that not handle the problem without getting PS> rid of the thing? If you are doing a try, why are you bothering with $SIG{DIE}. Any global should only be manipulated by one and only one level. The main routine. (Even if it

Re: Toward an omnibus Perl 6 Exceptions RFC, v0.1.

2000-08-15 Thread Chaim Frenkel
. Otherwise you are just falling out of the BLOCK. Why all the extra syntax? I see no gain to the programmer or to the perl internals. >>>>> "TO" == Tony Olekshy <[EMAIL PROTECTED]> writes: TO> Chaim Frenkel wrote: >> >> Tony Olekshy wrote: >>

Re: RFC 63 (v3) Exception handling syntax

2000-08-15 Thread Chaim Frenkel
every other decent exception handling mechanism. Perhaps it should be axed PRL> altogether. Please. $SIG{DIE} should die. Action at a distance. Global. Can't know what other threads or modules want done here. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: Toward an omnibus Perl 6 Exceptions RFC, v0.1.

2000-08-15 Thread Chaim Frenkel
eptare, from exceptus, past participle of excipere to take out, except, from ex- + capere to take -- more at HEAVE Date: 14th century transitive senses : to take or leave out from a number or a whole : EXCLUDE intransitive senses

Re: errors and their keywords and where catch can return toand st uff like that

2000-08-14 Thread Chaim Frenkel
es it to start going through catch PS> blocks again } PS> then I'm afraid I'm going to have to turn to drink. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: errors and their keywords and where catch can return toand stuff like that

2000-08-14 Thread Chaim Frenkel
ught_handler => sub { ... PS> }, ... ); PS> And the dispatcher would look first in the object, then in the class for PS> uncaught_handler. PS> I think it's cool how this process is converging :-) -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: errors and their keywords and where catch can return to and stuff like that

2000-08-14 Thread Chaim Frenkel
>>>>> "JM" == James Mastros <[EMAIL PROTECTED]> writes: JM> On Mon, Aug 14, 2000 at 06:17:02PM -0400, Chaim Frenkel wrote: >> Let us get away from the globals as much as we can. This can easily >> (I think) be taken care of by having the _

Re: errors and their keywords and where catch can return to and stuff like that

2000-08-14 Thread Chaim Frenkel
eword), and sub JM> {warn shift;}, print out a warning message (default warnings, like... I JM> can't think of any). JM> The value of onuncaught should follow isa if it doesn't exist. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: RFC 86 (v1) IPC Mailboxes for Threads and Signals

2000-08-11 Thread Chaim Frenkel
k, block, retrieve, unlock. we UG> don't have that for filehandles. you could use a new method on that UG> special handle (i like 'get') which has the desired semantics. UG> i think making mailboxes in some form is a good idea. but they should be UG> special objects (eve

Re: RFC 87 (v1) Timers and Timeouts

2000-08-11 Thread Chaim Frenkel
rward loop easier[1]. And if necessary, an external module can implement the callback style[2]. Having both just adds complexity. [1] I've done both styles and written both style dispatchers also. [2] I think the loop can emulate the callback style

Re: RFC 88 (v1) Structured Exception Handling Mechanism

2000-08-10 Thread Chaim Frenkel
ttle extra overhead. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: RFC 87 (v1) Timers and Timeouts

2000-08-10 Thread Chaim Frenkel
; Timers can be used to break out of any AIO operation and even out of PRL> eval blocks by having the callback execute die (or quit or whatever). So PRL> you can nest eval blocks and have control over how long each level takes PRL> to run. Also this means no more collisions with sharing alar

Re: RFC 86 (v1) IPC Mailboxes for Threads and Signals

2000-08-10 Thread Chaim Frenkel
ate without the mess of directly dealing with PRL> semaphores/mutexes/queues. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: RFC: Safe Signals

2000-08-08 Thread Chaim Frenkel
ch io event calls to the yield operator There are even more possiblities. None of which requires any mention of how the internals are implemented. As far as I can see there is nothing in the %SIG semantics that makes it inherently unsafe. If there is please tell me why this isn't a

Re: RFC: Safe Signals

2000-08-08 Thread Chaim Frenkel
>>>>> "UG" == Uri Guttman <[EMAIL PROTECTED]> writes: >>>>> "CF" == Chaim Frenkel <[EMAIL PROTECTED]> writes: CF> Please explain how any of this will make signals safer? Safer CF> signals is a core issue. Not a language iss

Re: RFC: Safe Signals

2000-08-07 Thread Chaim Frenkel
PROTECTED]> UG> Date: 07 Aug 2000 UG> Version: 1 UG> Mailing List: perl6-language-flow UG> Number: TBD -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183