Re: Unix test

2002-10-07 Thread S. Joel Bernstein

At 07/10/2002 13:20 [], Ivor Williams wrote:
I have been asked at work, to come up with a Unix technical test for use in
interviewing prospective candidates, and I was wondering if there already
was such a test in existence. To search the list, I tried a google advanced
search on pm.org - without any avail.

This depends on how you want to do this. You could give them a mini-exam to 
fix, you could break a solaris (I'm assuming they use solaris if they're 
ksh junkies) system in a dozen ways and ask them to fix it (could even tell 
them what's broken) - or you could just fire questions at them the 
superblock on a disk is corrupt, what can you do? - or you could ask them 
to write a shell/perl script to do something like a bit of simple log analysis.

Just my $0.02

/joel


-- 
S. Joel Bernstein :: joel at fysh dot org :: t: 020 8458 2323
Nobody is going to claim that Perl 6's OO is bolted on. Well, except
  maybe for certain Slashdotters who don't know the difference
  between rational discussion and cheerleading... -- Larry Wall





Re: Unix test

2002-10-07 Thread Shevek

On Mon, 7 Oct 2002, Ivor Williams wrote:

 It's not that I intend to crib the entire test, more that it will give me 
 ideas as to the kind of questions to ask.

I tend to ask the same question multiple times, once using a kiddie
algorithm, once using an undergraduate algorithm and (if there exists
one), once using a postgraduate algorithm. The answer is usually
generates prime numbers or multiplies A and B or raises A to the
power of B or implements DSA or something relatively simple like that.

How about h4x0r this windoze box, crack this DVD, find a previously 
unknown overflow in Apache|bind|etc.

S.

-- 
Shevek
I am the Borg.

sub AUTOLOAD{my$i=$AUTOLOAD;my$x=shift;$i=~s/^.*://;print$x\n;eval
qq{*$AUTOLOAD=sub{my\$x=shift;return unless \$x%$i;{$x}(\$x);};};}

foreach my $i (3..65535) { {'2'}($i); }






Re: Unix test

2002-10-07 Thread Lusercop

On Mon, Oct 07, 2002 at 01:20:47PM +0100, Ivor Williams wrote:
 I did ask whether there was any preference as to shell, and what the role 
 involves. I was told that the role is a Unix developer with C/C++; the 
 client has a bias towards Korn shell. No perl there - shame!

I would certainly think about semantics. One thing you can do is get them
to write a simple cat, and then dd implementation. It doesn't need to
include all the command-line options, but you can see if they're going to
do the error-handling correctly, and you can make sure they're careful.

As to scripting, depending on the client, something to add a user, and a
segment of an apache conf (at the same time) might be an idea, a sort of
mass hosting. Suggest that this script might be used for 10's of thousands
of users, and see what optimisations they come up with.

This doesn't give you a yes-no test, unfortunately, but it does give you a
guide as to how they'll approach this kind of problem.

Since I'm me, get them to send mail to something using this script, and see
what options they use to invoke /usr/sbin/sendmail, or if they try to write
their own SMTP implementation...

-- 
Lusercop.net - LARTing Lusers everywhere since 2002




Re: Straw poll

2002-10-07 Thread Nicholas Clark

On Sun, Oct 06, 2002 at 11:44:20PM +0100, Barbie [home] wrote:
 From: Nicholas Clark [EMAIL PROTECTED]
  And if a talk introducing the perl debugger were given at a YAPC, how many
  people would think it worthy of going to?

 would be good. Not sure what an Advanced talk would be about, as to me that
 implies something beyond explaining how to use the debugger and what it can
 do for you. Unless of course you intended doing a talk on writing your own
 debugger customisations.

Sorry if that second bit of my message wasn't clear. Both parts related to the
same person (non london.pm member, not in the UK, who doesn't know that I'm
asking this here (unless he's read the archives)) who was possibly maybe
wondering about an advanced debugger talk.  I suggested to him that I
certainly had hardly used the debugger, and I suspected that many people
hadn't, so I guessed that an introduction talk would be better.

But I figured that it would be better to ask, to see if my hunch about perl
debugger experience actually being low was correct. And it seems to be.

Nicholas Clark




Re: Please clean up our CPAN directory

2002-10-07 Thread Barbie

From: Randal L. Schwartz [EMAIL PROTECTED]

 Putting the CPAN on CD-ROM is no problem with my new little gadget:

 http://www.stonehenge.com/merlyn/LinuxMag/col42.html

It is if you're NOT running it on a Win32 system. Thought I'd burn my own CD
mirror using the script. Set up the directories, ran the script and it
looked great in verbose mode, all these modules being downloaded and loaded
into my mirror ... then it promptly removed every single one on closure!

Not figured out the problem yet, but I don't recommend using just yet on a
Win32 box.

:(

Barbie.





Perl magazines

2002-10-07 Thread Dean Wilson

I've just seen the 'call to arms' on Slashdot
(http://slashdot.org/articles/02/10/07/1443229.shtml?tid=145) about the
Perl journal missing its required number of subscribers by over two thirds
and i thought i'd ask about other peoples views on The Perl Review and TPJ.
My view is that if a magazine can't get 3000 subs internationaly then it
should be left to die, if it can then good luck.

Should the two perl mags be folded in to one (Why pay for TPJ when TPR is
free? Is the competition harmful?) or should we have a scripting language
(bi-?)monthly and pull in Python (Although pyzine is quite a good read)
Ruby and maybe even TCL?

  Dean
--
Profanity is the one language all programmers understand
--- Anon





Re: Perl magazines

2002-10-07 Thread Greg McCarroll

* Dean Wilson ([EMAIL PROTECTED]) wrote:
 I've just seen the 'call to arms' on Slashdot
 (http://slashdot.org/articles/02/10/07/1443229.shtml?tid=145) about the
 Perl journal missing its required number of subscribers by over two thirds
 and i thought i'd ask about other peoples views on The Perl Review and TPJ.
 My view is that if a magazine can't get 3000 subs internationaly then it
 should be left to die, if it can then good luck.
 

FWIW,

I'd be willing to buy at least 2 subscriptions to TPR if they had a similar
call to arms. However I am cynical at best of SysAdmin magazine/whoever's
bastardisation of TPJ.

Greg

-- 
Greg McCarroll http://www.mccarroll.org.uk/~gem/
   jabber:[EMAIL PROTECTED]




Re: Perl magazines

2002-10-07 Thread Dave Cross

On Mon, Oct 07, 2002 at 04:52:27PM +0100, Greg McCarroll ([EMAIL PROTECTED]) 
wrote:
 * Dean Wilson ([EMAIL PROTECTED]) wrote:
  I've just seen the 'call to arms' on Slashdot
  (http://slashdot.org/articles/02/10/07/1443229.shtml?tid=145) about the
  Perl journal missing its required number of subscribers by over two thirds
  and i thought i'd ask about other peoples views on The Perl Review and TPJ.
  My view is that if a magazine can't get 3000 subs internationaly then it
  should be left to die, if it can then good luck.
 
 FWIW,
 
 I'd be willing to buy at least 2 subscriptions to TPR if they had a similar
 call to arms. However I am cynical at best of SysAdmin magazine/whoever's
 bastardisation of TPJ.

TPR _does_ have a similar call to arms http://www.theperlreview.com/.

I've subscribed to TPR. I haven't subscribed to TPJ.

Dave...

-- 
  Brian: Oh screw Maximilian!
  Sally: I do.
  Brian: So do I.




Re: Perl magazines

2002-10-07 Thread Greg McCarroll

* Dave Cross ([EMAIL PROTECTED]) wrote:
 On Mon, Oct 07, 2002 at 04:52:27PM +0100, Greg McCarroll 
([EMAIL PROTECTED]) wrote:
  
  I'd be willing to buy at least 2 subscriptions to TPR 
 
 TPR _does_ have a similar call to arms http://www.theperlreview.com/.


Excellent, before I buy 2+ subscriptions is there a way I could buy 1
subscription but have it cost more? I warn the organisers that if they
force me to buy extra subscriptions in order to support this excellent
endeavour I will come up with something ludicrous to do with the
extra copies.

When was this announced? I'd suggest if i didn't know about it, either
a.) i got confused and forgetful (entirely possible), or b.) it wasn't
announced widely (wildly?) enough.

Also is dha still the editor, different parts of the website seem to
disagree on this.

Greg

p.s. EVERYONE SHOULD SUBSCRIBE!

-- 
Greg McCarroll http://www.mccarroll.org.uk/~gem/
   jabber:[EMAIL PROTECTED]




Re: ADSL Help

2002-10-07 Thread Jon Reades

Paul Golds wrote:
 David Cantrell wrote:
snip
with zen (http://www.zen.co.uk) and he claims to have 8 IP's.
 
 I've signed up with Zen, and can confirm this 8 IP business.
 Bear in mind though that network, broadcast, and router IPs are
 taken out of this chunk, leaving five for those actual computer-
 things which I hear are all the rage nowadays.
snip

I wish that Zen let you specify a number of IP addresses -- their handy 
'configurator' is smart enough to ask a few questions about what you 
want to do ('Do you just want to play games and surf the Web?') but not 
smart enough to let you request 1  n  8 IP addresses. I have four that 
are completely unused (and I knew in advance that I wouldn't need them).

Ah well, I'm still happy with Zen though. Very reliable compared to what 
I had in the US. My ASUS DSL modem was also a very good buy and is rock 
solid although I had, as members of the list may recall, an issue with 
MASQ/NAT because I wanted a particular/peculiar security setup.

Whatever you do, *don't* get a USB DSL modem.

jon
-- 
jon reades
fulcrum analytics
t: 0870.366.9338
f: 0870.888.8880
m: 0797.698.7392

lower ground floor
2 sheraton street
london w1f 8bh





applying patterns

2002-10-07 Thread Simon Wistow

It has oft (http://perl.plover.com/yak/design/) been said that patterns
in the Gang of Four sense don't really apply to Perl. 

However today whilst I was looking over Yahoo!'s super shiny publishing
systems I started to notice that I was saying things like Oh right! So
this bit works likes a Makefile does but with half baked pages and this
bit's like an inode table and this bit's like a process scheduler/memory
manager

Which suddenly made me think about patterns. Possibly because I'd been
reading some Don Norman with his 'Psychology/Design of everyday things'
spiel.

In a little more detail :

Makefile thing -
Compiling static pages by combining dynamic templates. What you do is
you bake some of the templates (i.e create static content from them) and
try and have as many baked bits as possible ina final teplate.

Rebaking a template causes any templates which include it to need to be
rebaked. A bit like the way make only rebuild .o files that have had
their .c files changed.


Inodes -
For those that may not know - inodes are the way a file system is
prganised. It make it really easy to construct trees and directory
structures and sym links and move directorys and files around. This is
useful for heirachies and facted classification systems.


Can't be arsed to write up the process scheduler system bit.

Anyway, my point is that by bringing in knowledge from different parts
of computing (and/or completely different disciplines) you can recognise
patterns and ustilise the knowledge from that discipline /truism

Anybody got any other examples/comments?

Simon







Re: ADSL Help

2002-10-07 Thread Lusercop

On Mon, Oct 07, 2002 at 05:42:32PM +0100, Jon Reades wrote:
 I wish that Zen let you specify a number of IP addresses -- their handy 
 'configurator' is smart enough to ask a few questions about what you 
 want to do ('Do you just want to play games and surf the Web?') but not 
 smart enough to let you request 1  n  8 IP addresses. I have four that 
 are completely unused (and I knew in advance that I wouldn't need them).

In which case, what was the advantage of getting a /29 over a single IP
address?

a /29 is the smallest network size that's available to you. You can't have
1  n  8 because the valid numbers are, 1, 2, 4 and 8. Given that it's an
IP network, with IP type routes, there is a network address at the bottom
of each range, and a broadcast address at the top of each range.

This leaves you with a possibility of: 1, 0, 2 and 6[1] addresses. If you
just want the single IP address, you might as well have got your router to
go into bridging mode, and got it to talk PPPoE on its internal ethernet
interface. 

[1] I'm reliably informed that a lot of things can actually deal with /31
networks these days, but that then cuts out the need for a /30.

The way the delegation works is based on IP network allocation, and all
goes through RIPE. If you knew you only needed one IP address, then why
did you go for a routed network in the first place? It seems exceedingly
selfish to me.

-- 
Lusercop.net - LARTing Lusers everywhere since 2002




Web Classified Ads System in Perl

2002-10-07 Thread Martin Gardner

Hi,

Can anyone point me in the direction of information about how to put 
together a classified ads web site in perl. I am looking for something 
that can handle different types of advert, some paid for some free, 
pictures and varying lengths.

I'm googling, checking CPAN and nms as I write this but if anyone has 
any expertise in this area I would be interested to hear from you.

Cheers

Martin
---
[EMAIL PROTECTED]





Re: applying patterns

2002-10-07 Thread Shevek

On Mon, 7 Oct 2002, Simon Wistow wrote:

 It has oft (http://perl.plover.com/yak/design/) been said that patterns
 in the Gang of Four sense don't really apply to Perl. 

What fool said that? Of course they apply! Sure some of the strict typing 
stuff isn't quite so required, but the patterns are still there.

S.

-- 
Shevek
I am the Borg.

sub AUTOLOAD{my$i=$AUTOLOAD;my$x=shift;$i=~s/^.*://;print$x\n;eval
qq{*$AUTOLOAD=sub{my\$x=shift;return unless \$x%$i;{$x}(\$x);};};}

foreach my $i (3..65535) { {'2'}($i); }






Re: Perl magazines

2002-10-07 Thread Paul Johnson

On Mon, Oct 07, 2002 at 05:30:03PM +0100, Greg McCarroll wrote:
 * Dave Cross ([EMAIL PROTECTED]) wrote:
  On Mon, Oct 07, 2002 at 04:52:27PM +0100, Greg McCarroll 
([EMAIL PROTECTED]) wrote:
   
   I'd be willing to buy at least 2 subscriptions to TPR 
  
  TPR _does_ have a similar call to arms http://www.theperlreview.com/.
 
 When was this announced? I'd suggest if i didn't know about it, either
 a.) i got confused and forgetful (entirely possible), or b.) it wasn't
 announced widely (wildly?) enough.

It seems to be on use.perl, but I didn't know about it either.  I
subscribe to an inordinate number of Perl mailing lists and tend to
think that anything important will eventually get to one of them.  This
seems to have done so (three weeks later), but I would have missed the
Perl 6 Mini::Conference if I hadn't seen it on The Conway Channel.

 p.s. EVERYONE SHOULD SUBSCRIBE!

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net




{OT} elegant MAC address formatting code?

2002-10-07 Thread Chris Benson

Hi,  within the last few weeks I've seen a nice bit of code to format
irregular 0:2:7E:4:7:0 style MAC addresses into standard 00027E6437C0
ones.  

Unfortunately now I need same, I can't remember what or where. I've
grepped my London.pm archive and looked in the usual places ...
Does anyone else remember it?  (and are able and willing to tell me :-)

Thank you.
-- 
Chris Benson




Re: {OT} elegant MAC address formatting code?

2002-10-07 Thread Paul Makepeace

On Mon, Oct 07, 2002 at 10:00:24PM +0100, Chris Benson wrote:
 Hi,  within the last few weeks I've seen a nice bit of code to format
 irregular 0:2:7E:4:7:0 style MAC addresses into standard 00027E6437C0
 ones.  

I'm not sure where the 6, 3 and C come in those last three high nybbles.

A simple reformatting might look like,
s|\b(\w)\b|0$1|g; tr|:||d

Paul

-- 
Paul Makepeace ... http://paulm.com/

What is the time in Boston? Don't know.
   -- http://paulm.com/toys/surrealism/




Perlidex Comment

2002-10-07 Thread Adam Goldstein

Dear Mr. Mison,

   I am the developer of Perlidex, a program you seem to dislike. I was reading 
http://london.pm.org/pipermail/london.pm/Week-of-Mon-20020722/012307.html, and came 
accross your commentary. I would like to address your concerns.
   Several people have commented on the one-window restriction. This is imposed by my 
IDE rather than by me myself. I am currently waiting until the majority of my users 
have switched to Jaguar to update this, because the IDE permits multiple document 
windows in Jaguar.
About spawning Terminal windows: this is another bug that should be addressed when 
I recompile in Jaguar.
Comparing it to judicious use of new terminal windows, knowing how to use 
perldoc, and the location of search.cpan.org: These were pretty much the only 
features that were available in version 1.0 and version 1.0.1, and I will freely admit 
that. However, version 1.1 introduces a Unicode panel, which some people may find a 
real time-saver. Additionally, Perlidex's target audience is relative newbies, rather 
than experienced Perl users. I agree that BBEdit does much more, and that's because 
it's made by a team of pro coders. When I created Perlidex, I had the following 
thought in mind: There are no good shareware Perl IDE's for OS X. I think I'll create 
one that covers the basics for people like students-people who might be scared of the 
Terminal, or moving from MacPerl in OS 9 or before, people who aren't used to having 
to type cryptic commands to make their scripts execute. I think I'll create somthing 
that I would have liked to use when I was learning Perl
Although I disagree with your commentary, I appreciate your comments. If you have 
any more, please send them to me, and I will try to address them as soon as I can. I 
don't want this e-mail to come across as me defending my program, and I don't want it 
to seem like I created the program to cheat people out of $25. I understand your 
complaints, and, believe me, you're not the first one to criticize Perlidex. Please 
try out Perlidex 1.1, and see what you think.
I would like you to try Perlidex unhindered, so I'll provide you with a 
registration code, if you still have any interest: 4593087123

Thanks again.

-Goldfish
President and CEO, GoldfishSoft
Developer, FrakKalk, AlgeKalk, Perlidex
http://homepage.mac.com/goldfish1




Re: ADSL Help

2002-10-07 Thread Chris Andrews



On Mon, 7 Oct 2002, Lusercop wrote:

 On Mon, Oct 07, 2002 at 05:42:32PM +0100, Jon Reades wrote:
  I wish that Zen let you specify a number of IP addresses -- their handy 
  'configurator' is smart enough to ask a few questions about what you 
  want to do ('Do you just want to play games and surf the Web?') but not 
  smart enough to let you request 1  n  8 IP addresses. I have four that 
  are completely unused (and I knew in advance that I wouldn't need them).
 
 In which case, what was the advantage of getting a /29 over a single IP
 address?

Because come the day you want to plug in another machine, you won't have
to deal with the crawling horror that is the NAT implementation on most
ADSL 'routers'?

shudder


Chris.





Re: {OT} elegant MAC address formatting code?

2002-10-07 Thread Chris Benson

On Mon, Oct 07, 2002 at 10:29:18PM +0100, Chisel Wright wrote:
 On Mon, Oct 07, 2002 at 10:00:24PM +0100, Chris Benson wrote:
  Hi,  within the last few weeks I've seen a nice bit of code to format
  irregular 0:2:7E:4:7:0 style MAC addresses into standard 00027E6437C0
  ones.  
 
 Not worked out a one-liner but:
 
 s/\b(\w):\b/0$1/g;
 s/://g;
 
 perhaps?

What I've done is
$mac = join '', map { sprintf %02x, hex } split /:/, $mac
if $mac =~ /:/;

Which is more that I wanted but keeps the magic one-line :-) I thought
there was a pack() in the version I saw, but I can't work out how.
The use of hex() (once again) fooled me :-(

Thanks for the suggestion.
-- 
Chris Benson




Re: {OT} elegant MAC address formatting code?

2002-10-07 Thread Chris Benson

On Mon, Oct 07, 2002 at 10:26:48PM +0100, Paul Makepeace wrote:
 On Mon, Oct 07, 2002 at 10:00:24PM +0100, Chris Benson wrote:
  Hi,  within the last few weeks I've seen a nice bit of code to format
  irregular 0:2:7E:4:7:0 style MAC addresses into standard 00027E6437C0
  ones.  
 
 I'm not sure where the 6, 3 and C come in those last three high nybbles.

Whoops EBADEXAMPLE
 
 A simple reformatting might look like,
 s|\b(\w)\b|0$1|g; tr|:||d

Ah, that wasn't what I was looking for, but will be useful.

Thanks
-- 
Chris Benson




Re: Please clean up our CPAN directory

2002-10-07 Thread Barbie [home]

From: Randal L. Schwartz [EMAIL PROTECTED]

 File::Find is returning / names instead of \ names, which breaks
 against File::Spec's idea of names!  It sucks that there are two core
 modules that do different things... I did my darndest to make it
 portable.

 Barbie Not figured out the problem yet, but I don't recommend using just
yet on a
 Barbie Win32 box.

 It's a simple patch.  Just make sure that everything plays fair.  As
 I don't have access to a windows box AT ALL, I can't patch it. :(

 But I'd say it's a problem with the core, actually.

Bit of a bugger that. I have temporarily circumvented the problem by
commenting out the call to clean_unmirrored(); Cheating I know, but it works
for me ;) Will try and have a play tomorrow, now I know the suspected
troublemaker.

Thanks for the script BTW.

Barbie.





Re: Perlidex Comment

2002-10-07 Thread Mike Jarvis

On Mon, Oct 07, 2002 at 02:05:06PM -0700, Adam Goldstein wrote:
 Dear Mr. Mison,

I know nothing about the software in question, but I know that if the
developers are incapable of putting line breaks in email it probably
isn't worth bothering with.

This level of disregard for community standards means I can ignore
anyting perl related from them.

-- 
mike




Re: {OT} elegant MAC address formatting code?

2002-10-07 Thread Graham Barr

On Mon, Oct 07, 2002 at 11:32:55PM +0100, Chris Benson wrote:
 On Mon, Oct 07, 2002 at 10:29:18PM +0100, Chisel Wright wrote:
  On Mon, Oct 07, 2002 at 10:00:24PM +0100, Chris Benson wrote:
   Hi,  within the last few weeks I've seen a nice bit of code to format
   irregular 0:2:7E:4:7:0 style MAC addresses into standard 00027E6437C0
   ones.  
  
  Not worked out a one-liner but:
  
  s/\b(\w):\b/0$1/g;
  s/://g;
  
  perhaps?
 
 What I've done is
   $mac = join '', map { sprintf %02x, hex } split /:/, $mac
   if $mac =~ /:/;
 
 Which is more that I wanted but keeps the magic one-line :-) I thought
 there was a pack() in the version I saw, but I can't work out how.
 The use of hex() (once again) fooled me :-(

You mean something like

perl -le '$_ = 0:2:7E:4:7:0; print unpack H*, pack C*, map hex, /\w\w?/g'
00027e040700
perl -le '$_ = 00027e040700; print unpack H*, pack C*, map hex, /\w\w?/g'
00027e040700

Graham.




Re: Please clean up our CPAN directory

2002-10-07 Thread Randal L. Schwartz

 Barbie == Barbie [home] Barbie writes:

Barbie Bit of a bugger that. I have temporarily circumvented the problem by
Barbie commenting out the call to clean_unmirrored(); Cheating I know, but it works
Barbie for me ;) Will try and have a play tomorrow, now I know the suspected
Barbie troublemaker.

Watch the keys that are being added to %SEEN.  Something is inconsistent
between File::Spec's calculation and File::Find's calculation.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!