HNHacker News
TopNewBestAskShowJobs

mahboi

289 karma · joined June 21, 2026

submissionscomments
mahboi··on Push ifs up and fors down: The idiom, its algebra, and its limits
Yeah I was like what, is branching a matter of opinion??
mahboi··on Push ifs up and fors down: The idiom, its algebra, and its limits
Even before I understood anything about the machine, I never thought to recheck an unchanging condition inside a loop.
mahboi··on Push ifs up and fors down: The idiom, its algebra, and its limits
Usually yes, but if inside loop is even more branches. Also obviously wasteful when it's checking a computed condition.
mahboi··on Push ifs up and fors down: The idiom, its algebra, and its limits
If the criteria for it not happening is too complicated to expose to the caller
mahboi··on Push ifs up and fors down: The idiom, its algebra, and its limits
Oh, guard clauses might also use continue statements in loops
mahboi··on Push ifs up and fors down: The idiom, its algebra, and its limits
Guard clauses are things that return early for trivial or problematic cases. Like https://en.wikipedia.org/wiki/Guard_(computer_science)#Flatt...

They're one of those good practices that look like bad practice to everyone who just got a CS degree. Seems ex-students are unsettled by asymmetry or want to minimize the number of return statements.

mahboi··on Push ifs up and fors down: The idiom, its algebra, and its limits
These things are so divorced from the reality of programming, even when they involve actual code instead of fancy lingo. Like in Scala, not a pure functional language, tutorials used to find the most convoluted higher-order functional way to do simple things.
mahboi··on Visa, Mastercard, Major Banks Facing New Litigation over 'Anticompetitive' Fees
Yes in the US. It's usually gas stations, small businesses, and less expensive places offering the discount. The only gas station around here that doesn't charge extra for card is Costco, where they also don't take cash.
mahboi··on Visa, Mastercard, major banks facing new litigation over 'anticompetitive' fees
Their solution to that was a "security code" also printed on the card, lol
mahboi··on Visa, Mastercard, Major Banks Facing New Litigation over 'Anticompetitive' Fees
Seems the common thing between the three of us not getting chargebacks handled right is that the merchant was outside the US.
mahboi··on Visa, Mastercard, Major Banks Facing New Litigation over 'Anticompetitive' Fees
It's not common and usually doesn't benefit the customer to do that
mahboi··on Visa, Mastercard, Major Banks Facing New Litigation over 'Anticompetitive' Fees
Sounds about right. All these things are so iffy. I've had wire transfers get stuck.

So I dug into Zelle reversals one time when a landlord stole my security deposit and I was considering reversing last month's rent until small claims figures it out. Banker said Zelle charges aren't normally reversible, but reluctantly admitted they are required to reverse the charge if it was unauthorized. Had I lied and said someone hacked my account, it may have been reversed, but then I'd be committing fraud.

Cashier's checks too. Despite what everyone says, they are reversible under the right circumstances. TurboTax's refund processor did that to me because they thought my address was wrong or something.

mahboi··on Visa, Mastercard, major banks facing new litigation over 'anticompetitive' fees
There are fraudulent customers too, I would say even more often since they have no reputation to uphold. You can see this more in the open on Yelp.
mahboi··on Visa, Mastercard, Major Banks Facing New Litigation over 'Anticompetitive' Fees
I mainly meant the processor has to spend money handling the disputes. They may eat the cost too if it's small, but usually that's on the merchant. They're more likely to eat the cost of fraud.
mahboi··on Visa, Mastercard, Major Banks Facing New Litigation over 'Anticompetitive' Fees
I've had a foreign chargeback go into the void too. I don't get the feeling chargebacks are a thing in Italy, so chalked it up to that.
mahboi··on Visa, Mastercard, Major Banks Facing New Litigation over 'Anticompetitive' Fees
Zelle is like this too. Though everything seems to be reversible in some way, not cause of disputes but because of unauthorized charges.
mahboi··on Visa, Mastercard, Major Banks Facing New Litigation over 'Anticompetitive' Fees
The biggest thing is disputes. I have no problem with an escrow service asking for a cut if I want to use them, cause they have real costs. The creepy thing is how that escrow built into credit cards is forced on every little transaction.
mahboi··on Visa, Mastercard, Major Banks Facing New Litigation over 'Anticompetitive' Fees
I don't think payment processors like Stripe are colluding, they just have a difficult task. Card and bank payments are very complicated and regulation-heavy. I do get the feeling that credit cards and banks are colluding.
mahboi··on Visa, Mastercard, major banks facing new litigation over 'anticompetitive' fees
Right. All the courts can do is use the high fees as evidence of monopoly.
mahboi··on Visa, Mastercard, major banks facing new litigation over 'anticompetitive' fees
Reminds me of how the cardholder agreements used to all prohibit adding a credit card surcharge to cover the fees. Some of the fees go back to the customer as rewards, so customers especially had no reason to use cash. Now that practice is illegal, and many places are 3-5% cheaper with cash, which is in line with the fees and usually much larger than credit card rewards.
mahboi··on Gleam doesn't compile to Erlang source anymore
The "for" might be inspired by Python list comprehension
mahboi··on We are going to kill "unalive"
All of these codewords are sometimes used humorously. Some of it is making fun of online forums for banning these words.
mahboi··on Gleam doesn't compile to Erlang source anymore
If you already have a list in Erlang, you can use map and the foldl/foldr reducers. But there's no general for-loop. You're expected to use tail recursion.

Also tbh, I don't like reduce either. I agree with that article posted on HN a while back about devs not liking reduce. Just want to insert into my list or whatever, not have to check how exactly reduce works in this particular language.

mahboi··on We are going to kill "unalive"
Who remembers when Google and some other companies tried to ban a ton of words from source code? They had a whole list, first slave which maybe was reasonable to discourage, then master, then blacklist/whitelist, then things like kill or abort, then weirder rules like kabob menu. Internally it got to extreme levels like banning "hooray."

https://developers.google.com/style/word-list

mahboi··on We are going to kill "unalive"
Yeah but that word is banned.
mahboi··on Mike Tomlin spent 12 years building a Minecraft city
Oh, I have a burner I created a while back, noticed the topcolor setting isn't available there. So you have to unlock that?
mahboi··on Gleam doesn't compile to Erlang source anymore
Erlang is my favorite functional language out of all the ones I've tried. The matchers, guards, etc are all done very well. But I don't like functional. I used to think it was cool, gave it a real chance using Erlang for years, and eventually decided it's not a good fit for many use cases. Like at some point the neatness of doing all loops as recursion wears off and it's just tiring. It's not like CS algo homework, and even there you often want DP/memoization.

Edit: pure* functional

mahboi··on Friendship ended with Deno, now Node is my best friend
That and other advantages gave them real uses. Some of them had freethreading earlier. Some were just faster. But people overstated how easy it was to switch.
mahboi··on Friendship ended with Deno, now Node is my best friend
Yeah that's the thing, 1337 itself is old
mahboi··on We are going to kill "unalive"
Not for discussing the movie but saying something that can be taken out of context (by 99% automated filters) to sound like a real-life threat or offensive thing. But yeah. Don't use Reddit.
Page 1 of 15Next →