Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: perl5 road map?

by zwon (Monsignor)
on Mar 24, 2012 at 17:20 UTC ( #961423=note: print w/ replies, xml ) Need Help??


in reply to Re^3: perl5 road map?
in thread perl5 road map?

Erlang processes don't share anything, hence they actually different from 'green threads' like in Java, you can't rewrite your example with threads::shared in Erlang (and I mean using shared variable). VM itself indeed implemented with using threads, but they are not visible for Erlang programs, and don't map to Erlang processes.

And the same goes for both the Erlang and Go threading demos. They are entirely useless as demonstrations of anything practical or useful.

Agreed. So why the hell you first gave useless demonstration in Perl, then asked Let's see your Erlang one-liner, and finally thrown up even more useless Go? ;)


Comment on Re^4: perl5 road map?
Re^5: perl5 road map?
by BrowserUk (Pope) on Mar 24, 2012 at 23:01 UTC
    Erlang processes don't share anything, hence they actually different from 'green threads'

    Of course they share stuff. It is an illusion of the programing model -- functional programming with single assignment variables -- that they appear not to. But just as they don't throw away a chunk of ram just because you used it once, there is nothing to stop errant (compiler or runtime) code scribbling all over everything in the process virtual memory space.

    Everything lives in a single process; ergo, everything is shared.

    So why the hell you first gave useless demonstration in Perl,

    Because the OP said: "who determine if ... perl5? For example: can create 1000+ fast,light, reliable threads easily without any crash like erlang"

    I simply demonstrated that it was possible to do that now, and had been possible for a long time.

    But I went on to say: "Of course, I cannot actually think of a valid use for it, but doing it is not a problem."

    My exact point was that it is just as useless to do in Perl as it is in Erlang or Go -- but if you want to, you can.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      be a little late to join this discussion, but zwon's comment is most of what I wanna say, I would be more polite tho. jk ;)

      Even as a multi-process model, perl5's ithreads is still not good enough. copying every thing to new thread/process is insane to me.(refer to this ) As a perl fan, I just hope perl would have some more weapons to compete

      In short for threading thing, if you meet a scenario for heavy multi-threading, consider other languages(Erlang, GO like BrowserUk said) or XS other than pure perl.

      UPDATE Fixed this link, Thank Happy-the-monk





      I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

        At the time of this post, your this in

        (refer to this )

        refers to The Monastery Gates - you may want to fix that?

        Cheers, Sören

        Update: solved.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2014-09-19 12:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (137 votes), past polls