Nym, don't you support welfare?
How can you ask taxpayers to pay for broke gamblers?
Not for someone who gambled away all their money and doesn't want to work, no. I support it only for those who genuinely need a hand up for a temporary period of time through no fault of their own.
How then would the government know who is genuinely in need and who is just stupid with their money?
It obviously depends on circumstances, and you have to go on a case by case basis. If a person is unable to work, they should receive assistance. If they are clearly able to work and choose not to, then they should not receive money. There are a lot of "grey area" cases that fall somewhere in between, and those should be looked at individually to determine whether the person is in need or not. Basically set up everything like unemployment benefits (which are a type of welfare), where you have to present the reasons, and then your application is rejected or accepted depending on the evidence.
There's a problem with that, which is a problem now actually - such a system would make administration costs ludicrous. You would spend more on administrating and distributing welfare than the recipients would receive.