in reply to Re: Re: (Golf) Warningless Comparison
in thread (Golf) Warningless Comparison
If you change the specs to the challenge, any thing is possible.
My version does not produce warnings under the terms of the challenge. Note:the localisation and setting of $^W=0.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: (Golf) Warningless Comparison
by demerphq (Chancellor) on Sep 29, 2002 at 20:24 UTC | |
Advice you should take to heart. From the OP:
My version does not produce warnings under the terms the unmodifies rules of the challenge. Note:the localisation and setting of $^W=0. The original terms of the challenge call for it to not produce warnings when run under use warnings. Yours does. The local $^W stuff doesnt have the effect you think it does when used under use warnings; It works the way you think it does when run under only "-w" but that isnt the same thing. It also doesnt work the way you think it does when run under both "-w" and use warnings;. From perllexwarn:
Also, next time try running the code before you get so insistant it works the way you think it does....
--- demerphq | [reply] [d/l] [select] |
by BrowserUk (Patriarch) on Sep 29, 2002 at 22:35 UTC | |
I am aware of the differences between -w and use warnings. I chose to use -w and $^W=0 within the localised scope of a subroutine who's sole purpose was to avoid them, which is I think, a legimite tactic given this was golf and only keystrokes count. The reasons why my (fully tested*) code both produced warnings and apparently failed to produce the desired output, was because you ran it in a context different from that in which it was designed to run and made no attempt to correct for that change of context in any meaningful way. In fact you deliberately suppressed the (correct) output for reasons I can only speculate on. vis.
Even in this form, it still complies with the original spec and comes in at 83 *My original post contained both fully working program and its output unedited. No warnings, and the required output.
| [reply] [d/l] [select] |
by demerphq (Chancellor) on Sep 30, 2002 at 10:21 UTC | |
I chose to use -w and $^W=0 within the localised scope of a subroutine who's sole purpose was to avoid them, which is I think, a legimite tactic given this was golf and only keystrokes count. As you said to me earlier
(fully tested*) Fully tested under different terms than were specified for the challenge. Not fully tested under the terms of the challenge. because you ran it in a context different from that in which it was designed to run and made no attempt to correct for that change of context in any meaningful way. Im very sorry that I ran your code under the terms of the original challenge. Im very sorry I ran your code at all. (In fact I thought it was pretty neat, and tried to extend it. I now realize that I wasted my time.) In fact you deliberately suppressed the (correct) output for reasons I can only speculate on. What on earth are you talking about? Clearly you have completely lost the plot. I suppressed nothing. All I did was extend the test cases to handle a number of omitted difficult scenarios. Admittedly I didnt notice the rule that invalidated test case 'ii' but I apologised when you pointed out the rule (while lecturing me about changing the rules, something you seem to like to do yourself.) As for the warn=>die promotion I did that to automate the capturing and notification of warnings. Please substantiate or retract your assertion that I suppressed something. Even in this form, it still complies with the original spec and comes in at 83 Well, if this means that it pasess the provided test cases, then yes finally you have done it. However I dont believe that simply passing the test cases is sufficient. I believe that the spirit of the challenge was the following
Which your code DOESNT do. Consider that undef ne '' is false. However the two are clearly different. Since this is the basis of your solution it fails the challenge and its size is irrelevent. I have added more test cases, tracked down the annoying bug in Elusions code that causes the original hash to become corrupt (I changed F($foo) to F({%$foo}) to avoid this impacting other attempts.) So despite all of your blustering you have posted four solutions that fail the challenge. And in the process insulted someone who started out impressed and friendly. Nice work! Read more... (5 kB)
--- | [reply] [d/l] [select] |
by BrowserUk (Patriarch) on Sep 30, 2002 at 15:55 UTC | |
by demerphq (Chancellor) on Sep 30, 2002 at 19:15 UTC | |