Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Parrot, threads & fears for the future.

by perrin (Chancellor)
on Oct 23, 2006 at 19:28 UTC ( [id://580135]=note: print w/replies, xml ) Need Help??


in reply to Parrot, threads & fears for the future.

Depending on who you talk to, the future may be single-threaded and non-blocking.
  • Comment on Re: Parrot, threads & fears for the future.

Replies are listed 'Best First'.
Re^2: Parrot, threads & fears for the future.
by BrowserUk (Patriarch) on Oct 23, 2006 at 20:33 UTC

    Sorry, but anyone who thinks that programming state machines with iddy-biddy bits of code, global state and

    for my $counter( GLOBALSTATE->{LOOPCOUNT} .. 1000 ) { IsSomethingElseReadyToRunYet(); ## do a bit IsSomethingElseReadyToRunYet(); ## Do a bit more OhGodSomethingElseIsReadyToRun() and do{ GLOBALSTATE->{LOOPCOUNT} = $counter; # 3! last; }; ## Stuff we might get around to doing next time through...maybe }

    is easier than remembering to lock() a variable, is perverse :)

    This is humour and no reflection on you, Matts or anyone else. I think state machines suck.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      I think non-blocking I/O is pretty hard, as evidenced by the fact that POE is still not very widely used. It can provide impressive results in the hands of skilled programmers though. It was the secret sauce that allowed the original (pre-web) AOL to scale on the hardware that was available back then.

        In my opinion, POE is not widely used because non-blocking IO is hard but because POE itself isn't a nice programming model. I've programmed a bit with Coro, and there, the non-blocking IO is almost invisible. Unfortunately, Coro doesn't compile on native Windows and at the time it had some stability problems on Linux too, with glibc5, so I stopped using it.

      I think state machines suck

      Heh, I just can't resist pointing out my favourite quote by Alan Cox, which pretty much answers the OP as well:

      A computer is a state machine. Threads are for people who can't program state machines.

      (Cue people screaming that he's talking about OS threads, not userland threads, yadda, yadda ;-)


      All dogma is stupid.

        This has come up before, I answered it before (last para), but much prefer renodino's answer to that directly, or my own somewhat more explanatory, but indirect earlier answer (last two paras).

        Or perhaps Mr. Cox should think about this.

        Computers use binary, but we do not program in it.

        Computers are dumb; (most) human beings aren't.

        Computers never forget; most human beings do.

        Human beings usually learn from their mistakes, computers will continue to make mistakes--very, very quickly--until they are either stopped, or crash.

        The purpose of computers is to make the lives of human beings easier, not to force us all to become computer-like.

        Slogans that portray elitist attitudes, do not reflect well upon their authors.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://580135]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-18 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found