Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^7: UPDATED, mostly solved: separation of define + assignment different from combination?

by perl-diddler (Chaplain)
on Feb 13, 2014 at 06:35 UTC ( [id://1074751]=note: print w/replies, xml ) Need Help??


in reply to Re^6: UPDATED, mostly solved: separation of define + assignment different from combination?
in thread UPDATED, mostly solved: separation of define + assignment different from combination?

If I thought it was a problem, I might have thought to investigate it before hand so toxic people wouldn't attack for having a conversation with people about a weird thing I saw and wondering about it.

Is this a friendly place or is this a rule-bound hostile place where people can't pose ill-defined symptoms.

If I needed any help debugging a program, I might consider that advice, but more often than not, I'm posing ideas or questions that don't involve code -- something I want other people's opinion on or to bounce ideas or thoughts off of.

Sorry, but claiming I should have followed a writeup on asking a question about a behavior I saw, but had no test case for until another anonmonk tried to shutdown discussion about whether or not it might be a bug and gave an unrelated example to prove it, is a bit rule-bound and rigid.

So far anonmonk as tried to shut down discussion, then said that code that reproduced the problem wasn't a valid minimal test case (like anyone claimed it was). And then whined about the question not being posed in a way that their rules applied.

Is the anon-function ever used for anything useful, or just to harass and generate toxic comments?

Seems to me it's being abused and given the nature of this being a technical discussion board, and not a life-counseling center, I see no reason why it should even have an anon-function.

Whether it is a bug, "per se" ignores whether or not it is desirable or helpful behavior.

But that gets back to the purpose of the software being to *help* the users of it -- not to gratify the ego of those who dominate it -- an opinion that I definitely seem to be in a minority of around here.

Your attitude stinks.

  • Comment on Re^7: UPDATED, mostly solved: separation of define + assignment different from combination?

Replies are listed 'Best First'.
Re^8: UPDATED, mostly solved: separation of define + assignment different from combination?
by Anonymous Monk on Feb 13, 2014 at 07:24 UTC

    If I thought it was a problem, I might have thought to investigate it before hand so toxic people wouldn't attack for having a conversation with people about a weird thing I saw and wondering about it. Is this a friendly place or is this a rule-bound hostile place where people can't pose ill-defined symptoms.

    Its a friendly place where reasonable people can be reasonable, even if the symptoms are ill defined, minimal demonstration code is nice, appreciated, and wanted,

    but no, its not absolutely required, which is why I did not comment on your original posting

    If I needed any help debugging a program, I might consider that advice, but more often than not, I'm posing ideas or questions that don't involve code -- something I want other people's opinion on or to bounce ideas or thoughts off of.

    Thats cool, its why I didn't directly address your original post

    Sorry, but claiming I should have followed a writeup on asking a question about a behavior I saw, but had no test case for until another anonmonk tried to shutdown discussion about whether or not it might be a bug and gave an unrelated example to prove it, is a bit rule-bound and rigid. So far anonmonk as tried to shut down discussion, then said that code that reproduced the problem wasn't a valid minimal test case (like anyone claimed it was). And then whined about the question not being posed in a way that their rules applied.

    I don't believe so. Andal tried to replicate what you were talking about and thought he found a bug in warnings. I clarified for andal that his code doesn't demonstrate a bug in warnings.

    At this point you posted some code and lots of words for me to consider :) and I didn't see it as reasonable to have to install a few of your modules , to demonstrate a bug in warnings; This is all after you wrote UPDATED, mostly solved

    So I'm still interested in seeing this bug in warnings with a shorter code example; If you're interested, hey its cool; If you're not interested, I won't call you toxic

    Is the anon-function ever used for anything useful, or just to harass and generate toxic comments?

    I thought my observations and clarification for andal were useful

    99.999999% of the time it isn't used to harass or generate toxic comment

    I also believe in this case the comments didn't constitute toxic harassment

    Seems to me it's being abused and given the nature of this being a technical discussion board, and not a life-counseling center, I see no reason why it should even have an anon-function.

    It doesn't seem that way to a lot of people, see Having our anonymous cake and eating it too for a glimmer of that though

    Whether it is a bug, "per se" ignores whether or not it is desirable or helpful behavior.

    Hmm, its an optional option that you turned on in your program -- I'm not sure how that is related to desireability and helpfulness

    If you want it and its helpful for you, turn it on

    If you do not want it and its not helpful for you, turn it off

    But that gets back to the purpose of the software being to *help* the users of it -- not to gratify the ego of those who dominate it -- an opinion that I definitely seem to be in a minority of around here.

    Your attitude stinks.

    Well, sorry, but I think that isn't very reasonable either;

      If you blanket replace P with printf STDERR and change Ehv to a direct access, you have you wish:
      #!/usr/bin/perl use warnings; use strict; { package pkg; use warnings; use strict; our $cnt=0; sub new { my $p = shift; my $c = ref $p || $p; printf STDERR "pkg %s created\n", ++$cnt; $p = bless { cnt => $cnt, fnc => sub { my $p2 = ref $_[0] ? shift : __PACKAGE__; printf STDERR "fnc %d calling %s\n", $cnt, +$p2->FUNC; undef; } }, $c; } sub destroy { printf STDERR "pkg %s(%s) destroyed\n", $cnt, $_[0]->{ +cnt}; undef } sub DESTROY { goto &destroy } } package main; sub callfunc(;$$); #silence warn about proto not ready sub callfunc (;$$) { my $p = pkg->new; my ($callfunc, $recur) = @_; $callfunc||=0; $recur||=0; local * FUNC = sub () { printf STDERR "In FUNC, cnt=%s\n", $p->{cnt} +; undef }; FUNC() if $callfunc; callfunc($callfunc, $recur) if $recur && $recur--; } callfunc; callfunc 1; callfunc 0,1; callfunc 1,1; pkg::destroy
      And you get the similar output with 2 subs in a text editor. inserting print STDERR for all of the Pe's and an extra '\n' for at the end of all strings. And a removal of the null pointer deref which isn't even used. But you still get an undef warning.
      pkg 1 created pkg 1(1) destroyed pkg 2 created In FUNC, cnt=2 pkg 2(2) destroyed pkg 3 created pkg 4 created Subroutine main::FUNC redefined at /tmp/tst2.pl line 27. pkg 4(4) destroyed pkg 4(3) destroyed pkg 5 created In FUNC, cnt=5 pkg 6 created Subroutine main::FUNC redefined at /tmp/tst2.pl line 27. In FUNC, cnt=6 pkg 6(6) destroyed pkg 6(5) destroyed Use of uninitialized value in printf at /tmp/tst2.pl line 16. pkg 6() destroyed

      Or you could spend 30 seconds and install the routines. They are simple routines and I explained my rationale for using them.

      The differences in the final program are minor but I spend hours revising it in development where retyping pointless expansions is harmful and wasteful.

      So if your help requires not being able to do 2 text subs or installing modules that do that for you automatically, then its obvious you are not someone I'd want creating toxic responses.

      And before you claim you don't want to install modules that due unknown things -- they are simple modules, published on CPAN and backed by my name -- someone who is unafraid of signing it on their posts no matter how my post may make me look. It's called integrity and honesty.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1074751]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-24 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found