Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^3: My Conway's Game Of Life Attempt

by eric256 (Parson)
on Jan 05, 2010 at 14:15 UTC ( #815767=note: print w/replies, xml ) Need Help??

in reply to Re^2: My Conway's Game Of Life Attempt
in thread My Conway's Game Of Life Attempt

Wouldn't that kill the cell if its $n == 2 and its alive? Basicaly if its $n==2 then the cell remains alive or dead, whichever it was already, dies if its $n<2 or $n>3, and becomes alive if $n==3.

Eric Hodges

Replies are listed 'Best First'.
Re^4: My Conway's Game Of Life Attempt
by ikegami (Pope) on Jan 05, 2010 at 15:36 UTC
    See what I mean by the original being unclear, I misunderstood what it did :)
      to sum the rules up: less than 2 neighbours: dead in the next turn 2 neighbours: unchanged (dead or alive) in the next turn 3 neighbours: becomes/stayes alive in the next turn more than 3 neighbours: dead in the next turn

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://815767]
[Corion]: Yeah, I just did su -; perl -wle "print getlogin" and it still printed corion
LanX YT auto-caption: "The Uk sends a breakfast negotiator to brothels"
[tye]: cool. For some reason I couldn't remember it nor come up with a good search strategy (other than crowd sourcing).
[davido]: hm, that seems to also survive $< manipulations @corion so good call.
[Corion]: tye: I also more randomly stumbled over it, as "who am i" unix implementation didn't really provide much help. But Wikipedia linked me to the List of Unix Programs (or something like it), and from there ...
[talexb]: Wasn't Brexit the name of the first Santana album?
[tye]: That's funny, saying getlogin() is less secure. For some uses, it is far superior to getpwuid(), precisely for reasons of security.
[LanX]: search strategy => Perl Functions by Category
[Corion]: ... I found discussion of the who utility and that it uses the POSIX 2008 getlogin function (but that function was available much earlier and thus even exists in Perl, as a search for getlogin on CPAN brought up Perl 5.26 as first hit
[tye]: oh, LanX, but I was thinking that it was not a function that Perl provided.

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-06-23 18:49 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (554 votes). Check out past polls.