http://qs321.pair.com?node_id=11125388


in reply to getting next word or number after another

I would have kept the DOM around so that I wouldn't have to start parsing words out of unstructured text.


Dave

  • Comment on Re: getting next word or number after another

Replies are listed 'Best First'.
Re^2: getting next word or number after another
by marto (Cardinal) on Dec 18, 2020 at 08:19 UTC

    This now has at least 3 threads about this same problem. Using a DOM aware parsers has been suggested more than once, and dismissed without reason.

      Yeah, I've been following along. I jump in because I think, "Hm. How would I solve that?" My responses are mostly because I'm curious about what the big deal is that would prevent normal tools from being the best choice. I second guess myself, thinking maybe Mojo::DOM isn't good for this, so I try it out, and prove to myself that it is a reasonable choice for what's being done. After that, I post my finding. And then mostly I just get sad that we have a bunch of good people trying to help someone who seems hell bent on ignoring advice, ignoring the fact that HTML parsers were invented simulaneously to the advent of HTML (browsers have to understand HTML semantics, after all), and then getting cross with people when the answers that come back are so baffled by the unwillingness to use the right tool for the job.

      It's one thing to initially think that one could remove lug nuts from a wheel with a pair of pliers. Seems reasonable, especially if someone hasn't done it before and doesn't understand how hard it is to use that tool in this application. It's another thing to refuse the lug-wrench after again and again the pliers slip, foul up the nut, and bloody the knuckles of the person holding them. Particularly baffling when the lug wrench is free, available, and pretty easy to use. But even worse, the person with bloody knuckles holding the pliers is then asking us to show him how to change the tire with pliers, and gets upset when we pick up the lug wrench and say, "I wouldn't use pliers for this, I would use a lug wrench." Then the OP goes back and bloodies his knuckles a little more on another part of the tire change he hadn't thought through very well, and once again is upset that we can't help him make the pliers work better in the job for which they're not intended.

      I know, I shouldn't engage. But I keep thinking maybe a rational person, when presented with sufficient information, will make good decisions. I have a hard time accepting that not everyone is either rational, or capable of making good decisions given enough information. And yet irrationality and faulty decision making is part of being human; we're all guilty of it.


      Dave

        Very well put, thank you. The purpose of my post was not to try and stop people from engaging in any way, but to point out to those perhaps uninitiated how often we've been round this loop. For a great deal of time this user was unresponsive to help, and kept arguing against the valid solutions to their problems, while repeatedly making the same mistakes. Recently I'd noticed more effort on their part in posting and a little uptake in engagement. Sadly this seemed short lived and we seem to be back to square one.