9,506 karma · joined July 3, 2009
The real point is that you want to have one regular form for the input in your database, but imposing that one that you prefer on your users creates friction when their experience of the world differs.
As for 0 vs. O, in a Canadian postal code it doesn't matter, because there is indeed a very regular language to them: letters alternated with numbers. A round circly thing in a numeric position is a 0 and a round circly thing in a letter position is an O. No matter what. The only time this actually indicates a problem is if the pattern ceases to hold after the round circly thing, in which case it may or may not be the 0/O confusion that's the problem but it was wrong anyways.
I'm not saying you should store it wrong, but if a user enters "HOH-OH0" and you ask "did you mean 'H0H 0H0'?"[1] and they say yes then you've given the user a much better and helpful flow than "Invalid Postal Code, please fill out the form again."
[1] This is a 'real' postal code btw and it goes to a weird santa-letter black hole even though it doesn't indicate a geographical location that corresponds to the north (an H prefix is for Montreal).
A really small example of this is postal codes in Canada. For a long time the norm was to put a hyphen between the two clusters: A1B-2C3 but then at some point a lot of websites decided that's bad and they started rejecting it, often with really obtuse messages. This is just annoying and no one is really well served by it. Canada post doesn't care.
And that's not even getting into 0 vs O and the fact that yelling at the user for entering the wrong one is rarely helpful.
I think most of the time the better thing to do is attempt to normalize and ask the user if the normalization is correct. For a numeric thing like a phone number this is probably stripping out non-numbers (other than + at the start) and putting hyphens back in and validating the number of digits you get back, and presenting it to the user if it differs. More work but feels way less hostile to the user.
I think the main way that people hang syntax like this in rust is with chained .methods, and since . at the start of a statement isn't valid rust to begin with it could probably be unambiguously be allowed anyways.
But I wouldn't expect:
a
[1]
To be considered valid specifically because of the potential ambiguity of a single term array and a suffix index. It's also not really common right now anyways, afaik.JavaScript tries to be way too damn clever here and no one is ever going to seriously suggest anything try to replicate "automatic semicolon insertion". Just don't allow line joins when it makes the next line ambiguous.
Interestingly it would be possible to come up with a straw man parser that makes semicolons optional and then run it through the whole "recompile every crate" thing the rust project has to see if it would cause new failures. It would be an interesting project tbh.
In your example, the if is in expression position, so it's fine if it treats its bodies as expressions. I'm definitely not saying I want to pepper my code with returns, I'm just unconvinced semicolons help with avoiding that.
But in particular any strongly typed language is gonna need some really convoluted code to produce similar ambiguities that actually make it to linking.
I think the most likely "bad" outcome of semicolon-less rust would be losing the hanging dot function chaining people do so much in rust, but even that's not a guarantee.
> allowing semicolons to be omitted after some expressions, like match, if/else, and if
This drives me up the wall. I know a lot of rust's aesthetic is there to make C++ programmers comfortable (I'm a recovering C++ programmer myself), but it would have been so much better if semicolons had been left out.
It seems like we put a semicolon on every line (except the ones mentioned above! But only if they're not subexpressions!) just to make the whole "you don't need to say return in the last statement" look clever.
> Confusion about whether to use kebab-case or snake_case for crate names I now lean to the former, but it's impossible to import snake case crates using kebab case, leading to an ugly mix in my Cargo.toml file.
I'm so tired of guessing which one I need every time I import a crate in Cargo.toml. Never mind that this is a blatant opportunity to make supply-chain attacks. I don't know why these are treated as distinct names in crate names, and if there are any conflicting crates out there in the wild right now they should probably all be forced to rename.
My personal pet peeve that doesn't come up much is the way magic impls around From/TryFrom/Into/TryInto conspire to make incredibly obtuse error messages about implementing TryFrom<T, Error=Infallible> or the like. I'm not entirely convinced having these 'helpful' impls is really worth it, at least not the way they were implemented.
They could have maybe laid them out in a way that would have made making double-wide modules easier or something though, maybe.
I can think of far more things getting funded that are either even less likely to succeed or likely to succeed and, in so doing, will cause harm and death to many people. There are so many things we're spending so much money on that do nothing but harm it's absurd to laser focus on something you consider merely pointless as a Boogeyman.
But it is absolutely a common misconception that fusion is very well funded when, given the challenges involved, it is funded quite poorly. If it was well funded, ITER might have been finished 20 years ago.
That said I think the results would have been disappointing, it doesn't really seem like material science was there yet and it's not clear more money thrown at it then would have gotten us there.
Imo I think even if you think it's a boondoggle it'd be better to fund it well (much better than we are) now and find out than drag this slow march of wasted money on old designs and ideas out forever. The ITER funding should have probably gone to something more like milestone awards and letting a bunch of paths proliferate.
Like, whether or not fusion itself is a "meme," the idea that we spend obscene amounts of money on it is absolutely a meme with no real backing in reality.
The appeal of fusion is really more about getting out of worrying so much about meltdowns and weapon proliferation, and that there is potential for much higher overall energy output if we can figure it out.
That last bit is why, imo, we should be investing in it now even though it won't really help us reach net zero carbon "in time". If we want to reverse our carbon impact, if and when we get to net zero, we're going to need immense amounts of energy to do it.
I remember reading that they would have more limited range and lower top speeds, but that this might not be as much of a problem as it seems because the current routes are built around large container + long haul but that's not necessarily required (for all shipping at least).
[1] eg. https://maritime-executive.com/editorials/could-battery-powe...
This is a little like saying "if unicorns ate hay..."
It sounds reasonable on the surface, but it's also never happened and probably never will.
50 years ago nearly all broad platforms for spreading ideas were owned by corporations run by very few individual people. Lacking a platform was the default, the vast majority of people were "silenced" in the sense meant by the modern "free speech" (really compulsory association) movememt.
Unless you're saying there are countries not in the Commonwealth that have her as the head of state which is news to me, but maybe i am mistaken.
Anyways, it would be more surprising if the Commonwealth didn't lose a couple now and if a couple more didn't make plans for when Charles dies, which won't be all that long from now.
I wish Canada was one of those, but all I'm reasonably hoping for is that we drop monarch icons on our cash.
People are absolutely including time as a variable here. What they're not doing is pretending that time is the only variable.
I can't tell what you're arguing here at this point. This thread seemed to start with you disagreeing (in a very long winded and winding way) that trees are a materially different sort of contribution to the carbon cycle than fossil fuels, but that's precisely where time matters. Every subthread you go on a different tangent with the only unifying theme being "fuck it we can't do anything even if we try" which, sure, that may be true but it has little to do with whether there's a short term carbon cycle.
50 year old trees can only contribute carbon back from 50 years ago or less. They slowly absorb and, given the total biomass of the planet vs the amount burning at any given time, also slowly release it back.
Short of burning down every tree on a continent and preventing any regrowth (probably an even harder project than carbon capture tbh), there are limits to how much carbon surface cycles can add to the system.
Even taking a pessimistic view of how long it takes for a burned tree to have its released carbon captured, the calculus we're faced with (if we insist on burning anything at all at scale anyways) is:
Burn trees: add carbon to the atmosphere that will be reabsorbed by a roughly equivalent amount of plant matter in a century, or
Burn fossil fuels: add carbon to the atmosphere that requires a net increase in planetary plant matter to be reabsorbed.
One of these is clearly better than the other by quite a bit, and saying otherwise is verging on nihilism.
Also you keep saying that no system is 100% efficient but planetary atmospheres are about as close to one as you can possibly get. If the carbon cycle weren't extremely efficient, earth would be like Venus by now.
We really desperately need a similar ruling for streaming services though.
This is - indirectly - exactly what I was referring to. Most of the patches people had to apply to qmail, in order to be a good netizen, had to do with spam either directly or indirectly.
First because the design of qmail made it very difficult to stop backscatter by immediately failing undeliverable mail - out of the box it wanted to send a bounce for even the most obvious of errors. None of the patches for this were great. This made even running qmail as an incoming mail server only difficult and risky.
And then of course the various anti-spam tech came along like rbl and the now-static qmail source had no support for it, and it was another place where you had to reject early.
And this would all probably have been fine if the licensing hadn't let it sit for so long without a real fix to the fundamental architecture, with competing patches and so on.
Since the licensing issue was resolved a long long time ago (more or less) a string of maintainers have popped up to keep it alive with another name for a year or two at a time but I can't imagine standing it up fresh now.
Absolutely agree on the strengths though, it's almost certainly why it was so successful at scale for a while. Postfix feels clunky to me by comparison.
Then it failed to keep up in the war against spam and it became completely irrelevant and postfix took its place as the sendmail alternative/replacement.
I will never forget the time one of them (the founder of the company) told me he would commit suicide. Let's just say that neither of us wanted to continue that interview series any further.