26 karma · joined Aug 2, 2024 (2y ago) · 25 submissions
comment 2y ago · link · parent
The road leads to a chalet, and the only one who it benefits is the chalet's owner, making it easier for his drunkard customers to drive right to it on the weekends, with zero walking involved.
comment 2y ago · link · parent
If the next five words begin with the same prefix (happens to me), searching will be wasteful. Just spamming "w" is easier.
But when there's something really distinctive (often, punctuation) near the position I'm aiming for, I'll definitely use search.
That's one of the reasons I prefer BRE over ERE/PCRE when editing text interactively - I can search for punctuation in code without having to backslash-escape it.
comment 2y ago · link · parent
In Islam, it is common belief that all people are born Muslim, then their parents may choose to lead them away into another religion.
That's why for people who convert to Islam later in life (muallaf) it is sometimes said that they reverted.
> Every child is born with the fitrah, but his parents make him a Jew, Christian or a Zoroastrian. ~Al-Bukhari
comment 2y ago · link · parent
People do that.
Recently, the Bulgarian drug lord nicknamed Brendo not only surrendered, but somehow bribed border control to let him in the country so he can show up directly in front of Sofia Central Prison, with a duffel bag, ready to be taken in. He wanted to skip the bureaucracy and go behind bars ASAP.
comment 2y ago · link · parent
It's 2024, and we still don't have a string notation that doesn't use the same character for opening and closing delimiter. If I start parsing from an arbitrary offset in the code, I can't say whether a double quote I read is the beginning of a string, or the end of one. I have to either resort to heuristics, or parse from the beginning of the file (at least once; and then cache offsets known to be outside a string). Something like "() would be nice. Still the familiar double quote, but the grouping is defined in a grammatically-superior way.
Also, still no identifiers that can start with a digit. Most of the mainstream languages have such complex grammars, probably requiring hand-coded parsers, but I can't have a "52cards" identifier. Is this really that hard compared to everything else?
Now, I'm self-taught and all. Maybe I'm missing something and the professors are right.
comment 2y ago · link · parent
return sayThanks(thanksStr)
I've seen this "if err != nil" pattern before, but I can't help thinking that it's not necessary."return ret, nil" ignores err's value, which is nil anyway.
"return nil, err" ignores ret's value, but why? If the caller checks for err before doing anything with ret, it doesn't hurt having ret always passed up.
4 extra lines only to lose the value of ret in case of error.