Golf contests and naive solutions?

2002-03-17 Thread Jerome Quelin

Hi folks,

We were wondering if the referees were to provide a naive solution for 
perlgolf contests? This way, beginners could really see what the script is to 
do (remember Ton's Christmas tournament where only one beginner managed to 
provide a working solution - and thus, won).
Otoh, I can imagine golf holes where such a solution would be too much a 
hint...

Of course, the naive solution would be _very_ naive (and trust me, it's 
really hard to write such a solution without using perl shortcuts ;) ).

So, what do you think? Should the referees provide a naive solution? We're 
waiting for your feedbacks...

Jerome
-- 
[EMAIL PROTECTED]



Re: Golf contests and naive solutions?

2002-03-17 Thread Eugene van der Pijll

En op 17 maart 2002 sprak Jerome Quelin:
 We were wondering if the referees were to provide a naive solution for 
 perlgolf contests?

As y'all know, I have promised to organize the Dutch Masters around
Easter. Because of your monthly TPR matches, I don't think anyone will
object if the DM will be held in mid-April (say, April 18-22).

Anyway, I'm trying to find some fun problems at the moment, and one
of the holes will probably be just this: it will be a more difficult
problem, but a simple (and long) solution will be given. I've just
written that solution, and I'm simplifying it now.

 So, what do you think? Should the referees provide a naive solution? We're 
 waiting for your feedbacks...

I don't think it is necessary for all holes. If you're talking about the
TPR matches, if the next one is as 'simple' (as in: easy to explain, and
with short solutions) as the previous two, there is probably no
need.

But I'm not really a beginner, so my opinion does not really count.

Eugene



regex for html img... tags

2002-03-17 Thread Kim Schulz


hi
I have a long string which contains some img.. html tags ala
img height=67 alt= hspace=0 
src=C:\DHTMSamp\SAMPLES\Web\images\AddItem.GIF width=72 align=baseline 
border=0
I need to do it throughout the whole string which can contain serval img 
tags. 

I need an regex that can replace everything between src= and
the imagename with images/ 

I want to make those stupid MS typical direct image links so they use the 
images on the server insted of those on the client machine. 

Can anyone help me?? 


thanx
Kim Schulz 



Re: Golf contests and naive solutions?

2002-03-17 Thread Rafael Garcia-Suarez

Jerome Quelin [EMAIL PROTECTED] wrote in perl.fwp :
  Hi folks,
  
  We were wondering if the referees were to provide a naive solution for 
  perlgolf contests? This way, beginners could really see what the script is to 
  do (remember Ton's Christmas tournament where only one beginner managed to 
  provide a working solution - and thus, won).
  Otoh, I can imagine golf holes where such a solution would be too much a 
  hint...
  
  Of course, the naive solution would be _very_ naive (and trust me, it's 
  really hard to write such a solution without using perl shortcuts ;) ).

Providing a naive solution may be also a good way to specify the
required behavior, for a complex problem.

To produce naive code, you can try to write C-like code : C-style
for loops, no push() or pop(), but instead indexed access to arrays,
prefer substr() over regular expressions, etc. (But use C constructs
with moderation. Avoid printf ;-)



Re: Golf contests and naive solutions?

2002-03-17 Thread Yanick

On Sun, Mar 17, 2002 at 10:00:47AM +0100, Jerome Quelin wrote:
 So, what do you think? Should the referees provide a naive solution? We're 
 waiting for your feedbacks...

Good question. On the plus side, a naive solution gives
beginners a chance to have something to begin with and work on.
On the minus side, it's usually the inspiration on /how/ to
resolve the problem that makes all the difference. Even a naive
solution might give too much. 

I would be tempted to say 'no'. Or maybe set the rule
that if you peer at the naive solution to are automatically
tagged as a 'beginner' and get a handicap on your Y-index. 

But I don't really have strong opinions, and ain't a 
beginner anyway. So I'll let the Llamas among us speak for
themselves. :)

Joy,
Yanick

-- 
My fear is greater than my faith but I walk the missionary way.
- Suede, Tori Amos



Re: Golf contests and naive solutions?

2002-03-17 Thread Joe Knize


Speaking as a beginner, here's what I think:  what I would find very
helpful is a detailed analysis of the top 2 or 3 (different) solutions in 
the post mortem.  I'm at the point where I know how to attack many
different problems, just maybe not that efficiently, and I suspect that
most beginners should be around that same level.  So I don't think a naive
solution would help me much.  

Although, what if the hole essentially said, here's some code, now trim
it down?  That would be good for us beginners, in that we'd have to
understand the code first, then go off and chop it down.  Hmm, maybe a
Beginners Start Here page, and one for the rest of y'all.

My 0.8 korun.

Pepik





Re: Golf contests and naive solutions?

2002-03-17 Thread Jerome Quelin

On Dimanche 17 Mars 2002 16:21, Joe Knize wrote :
 Speaking as a beginner, here's what I think:  what I would find very
 helpful is a detailed analysis of the top 2 or 3 (different) solutions in
 the post mortem.  

We provide a deconstruction of the winner's entry in the Perl Golf column of 
The Perl Review (http://www.theperlreview.com).

Jerome
-- 
[EMAIL PROTECTED]



Re: Golf contests and naive solutions?

2002-03-17 Thread Jonathan E. Paton

 And yes, once you looked at the naïve solution,
 maybe all your submissions for that hole are in
 the beginner's?

That'd be good... making the difference between a
beginner and an expert more distinct.  The
beginners could also get some more starting hints...
e.g. some man sections that *might* be relevent,
just to get them started.

Giving this information early on isn't really a
problem - the experts will hammer the beginners
regardless (and know those tricks anyway).  For the
beginners, it gives them more of a chance.

It'd be really unfortunately for Eugene and co. if
they were beaten by the beginners - but that's the
way of the game.

Certainly, the Human Sort was too tricky for
beginners - as finding even a basic solution for
the sort was REALLY DIFFICULT for a beginning Perl
programmer, let alone a beginning Perl golfer.

Jonathan Paton

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com



Re: regex for html img... tags

2002-03-17 Thread Randal L. Schwartz

 Kim == Kim Schulz [EMAIL PROTECTED] writes:

Kim hi
Kim I have a long string which contains some img.. html tags ala
Kim img height=67 alt= hspace=0
Kim src=C:\DHTMSamp\SAMPLES\Web\images\AddItem.GIF width=72
Kim align=baseline border=0
Kim I need to do it throughout the whole string which can contain serval
Kim img tags. I need an regex that can replace everything between src= and
Kim the imagename with images/ I want to make those stupid MS typical
Kim direct image links so they use the images on the server insted of
Kim those on the client machine. Can anyone help me?? thanx

This doesn't exactly qualify as on-charter for Fun With Perl.
You might try asking on the beginner's mailing list, or on the
Perl newsgroups.

-- 
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!



Re: Golf contests and naive solutions?

2002-03-17 Thread Jean-Pierre Vidal

Le Dimanche 17 Mars 2002 10:00, Jerome Quelin a écrit :
 Hi folks,
 [...]
 So, what do you think? Should the referees provide a naive solution? We're
 waiting for your feedbacks...

 Jerome

I am a perl beginner and a perl golf beginner, but not a programmer beginner, 
so *I* don't need such a naive solution: part of my pleasure consists in 
creating one (or more) algorithm - TIMTOWTDI :-)
But I am not opposed to such step, maybe this will encourage beginners.

Jean-Pierre
-- 
[EMAIL PROTECTED]




When to publish the leader board?

2002-03-17 Thread Stephen Turner

I have another suggestion for future golf competitions, which I'm not sure
whether it's a good one, so I'm raising it on fwp.

Maybe the leader board should not be published until a couple of days into
the competition. The leader board provides a great incentive to strive to
improve one's position. But I noticed that this time there were a lot of
people in the 50's and low 60's very early, and I was worried that this
might prevent people playing at all if their first attempt was in the 80's
or whatever. Whereas if they'd already jumped in, I think they might
continue to play later.

I admit that there was a very high number of players this time, so maybe I'm
worrying unnecessarily. But what do other people think?

-- 
Stephen Turner, Cambridge, UKhttp://homepage.ntlworld.com/adelie/stephen/
This is Henman's 8th Wimbledon, and he's only lost 7 matches. BBC, 2/Jul/01




Re: Golf contests and naive solutions?

2002-03-17 Thread Philippe 'BooK' Bruhat

On Sun, 17 Mar 2002, Jonathan E. Paton wrote:

  And yes, once you looked at the naïve solution,
  maybe all your submissions for that hole are in
  the beginner's?
 
 That'd be good... making the difference between a
 beginner and an expert more distinct.  The
 beginners could also get some more starting hints...
 e.g. some man sections that *might* be relevent,
 just to get them started.

But anyway, the information is available for both beginners and veterans.
I couldn't help but peek at those hints, even though I play in the
veterans league...

As for giving naive code as an example of what the program is expected
to do... well, that's what the test scripts are for.

-- 
 Philippe BRUHAT - BooK

 Financez le développement de Perl, avec YAS et les Mongueurs de Perl !
 http://www.mongueurs.net/association/actions/pdg2002.html




Re: regex for html img... tags

2002-03-17 Thread Randal L. Schwartz

 Jeremy == Jeremy Zawodny [EMAIL PROTECTED] writes:

Jeremy If that's true, perhaps this list should be renamed perl-golf so that
Jeremy those uninterested in golf can un-subscribe and be assured that they
Jeremy aren't missing anything...

I've actually been pondering the same thing.  FWP was originally far
more than Golf.  I've seen only Golf recently.  For that, I may pay
less attention.  Obfuscated Perl and Golf are both uninteresting to
me.

-- 
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!



Re: regex for html img... tags

2002-03-17 Thread Rich Morin

At 4:02 PM -0800 3/17/02, Randal L. Schwartz wrote:
Obfuscated Perl and Golf are both uninteresting to me.

Ditto, but many FWP members seem to like them.  So, I'm happy
to let the Golfers play through.

If those of us who have different interests fail to post items,
we have nobody but ourselves to blame for any shortage of
interesting material.

The question in question could, in any case, have been sent to
Perl-Friends, except that that list seems to have vanished.

-r
-- 
email: [EMAIL PROTECTED]; phone: +1 650-873-7841
http://www.cfcl.com/rdm- my home page, resume, etc.
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
http://www.ptf.com/tdc - Prime Time Freeware's Darwin Collection



Re: regex for html img... tags

2002-03-17 Thread Jeremy Zawodny

On Sun, Mar 17, 2002 at 04:46:57PM -0800, Rich Morin wrote:
 At 4:02 PM -0800 3/17/02, Randal L. Schwartz wrote:
 Obfuscated Perl and Golf are both uninteresting to me.
 
 Ditto, but many FWP members seem to like them.  So, I'm happy to let
 the Golfers play through.
 
 If those of us who have different interests fail to post items, we
 have nobody but ourselves to blame for any shortage of interesting
 material.

Guilty as charged. :-)

 The question in question could, in any case, have been sent to
 Perl-Friends, except that that list seems to have vanished.

If there is sufficient interest, I'd be glad to resurrect and host
perl-friends.  Or we could get it hosted at perl.org.  Either way.

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936



Re: Golf contests and naive solutions?

2002-03-17 Thread Ronald J Kimball

On Sun, Mar 17, 2002 at 10:00:47AM +0100, Jerome Quelin wrote:
 Hi folks,
 
 We were wondering if the referees were to provide a naive solution for
 perlgolf contests? This way, beginners could really see what the script
 is to do (remember Ton's Christmas tournament where only one beginner
 managed to provide a working solution - and thus, won).  Otoh, I can
 imagine golf holes where such a solution would be too much a hint...

In general, yes, a naive solution should be given for a Perl golf contest.
The main purpose in providing a solution is not to give hints, but to make
it clear what the actual challenge is.  For example, the human sort
challenge was incompletely specified, even after several attempts, and
would have benefited greatly from an example solution.

For more suggestions on formulating a golf challenge, see my post Tips on
Writing a Golf Challenge on PerlMonks:

http://www.perlmonks.org/index.pl?node_id=82470


Ronald



Re: regex for html img... tags

2002-03-17 Thread abigail

On Sun, Mar 17, 2002 at 02:27:14PM +, Kim Schulz wrote:
 
 hi
 I have a long string which contains some img.. html tags ala
 img height=67 alt= hspace=0 
 src=C:\DHTMSamp\SAMPLES\Web\images\AddItem.GIF width=72 align=baseline 
 border=0
 I need to do it throughout the whole string which can contain serval img 
 tags. 
 
 I need an regex that can replace everything between src= and
 the imagename with images/ 
 
 I want to make those stupid MS typical direct image links so they use the 
 images on the server insted of those on the client machine. 
 
 Can anyone help me?? 


Which part of the perl FAQ addressing this question did you fail to understand?



Abigail