[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] Re: developers (and also some ObPerl, unlike OP)



David Carswell <dcarswell@moviegallery.com> writes:

> I am looking for perl developers for positions in South
> Alabama... surprisingly, I am finding them scarce ;)

And I'm looking for a pink elephant in Central Israel... surprisingly, 
I too am finding them scarce ;)

> 
> Realizing that this list is probably not the appropriate avenue for
> recruiting, can anyone suggest any resources that might help?

Realizing that this list is probably not the appropriate avenue for
hunting down mythical wildlife, can anyone suggest any resources that
might help?

> 
> i.e. Does anyone know where I should look?

i.e. Is anyone here willing to do my work for me?

> 
> Thanks...
> 
> David Carswell
> MovieGallery.com
> (334) 677 - 2108 x22535
> 
> dcarswell@moviegallery.com
> 
> <LEGALESE>
>      The views, opinions, and judgements expressed in this message are solely
> those of the author.  The message contents have not been reviewed or approved
> by Movie Gallery.
> 
>      This E-mail may contain confidential and privileged material for the sole
> use of the intended recipient.  Any review or distribution by others is
> strictly prohibited.  If you are not the intended recipient, please contact
> the sender and delete all copies.
> 
> </LEGALESE>

How, exactly, are we to know if we're intended recipients or not?  In
my case, I'd like to point out that if you haven't seen a pink
elephant, you're not the intended recipient of this letter.

ObPerl: Here's a topological sort in Perl, so you won't feel your time 
has been totally wasted...

Pass it a list of list refs, specifying the outneighbours for each
element.  Terminal elements must be represented by an empty list ref
(even if they're last).  Returns a sorted permutation or undef if a
cycle was detected (this is not the best way to report an error!).  I
just enjoyed writing something this short...

(Try it with "tsort ([1,2], [], [1])")

sub tsort {
  my @out = @_;
  my @ret;

  # Compute initial in degrees
  my @ind;
  for my $l (@out) {
    ++$ind[$_] for (@$l)
  }

  # Work queue
  my @q;
  @q = grep { ! $ind[$_] } 0..$#out;

  # Loop
  while (@q) {
    my $el = pop @q;
    $ret[@ret] = $el;
    for (@{$out[$el]}) {
      push @q, $_ if (! --$ind[$_]);
    }
  }

  return @ret == @out ? @ret : undef;
}


-- 
Ariel Scolnicov        |"GCAAGAATTGAACTGTAG"            | ariels@compugen.co.il
Compugen Ltd.          |Tel: +972-2-6795059 (Jerusalem)	\ We recycle all our Hz
72 Pinhas Rosen St.    |Tel: +972-3-7658514 (Main office)`---------------------
Tel-Aviv 69512, ISRAEL |Fax: +972-3-7658555    http://3w.compugen.co.il/~ariels

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe