Okay, so private-equity ghouls are literally reviving coal plants to mine Bitcoin...
Can someone on types.pl tell me what the big advantage for variant types over union types is?
In particular, I've been trying to teach Rust error handling, and it seems like it would be easier if I could say "this function returns either an error or a f32" rather than "you need to wrap the output like Ok(3.14), or if there's an error it looks like Err(OurErrorType("bad"))"
On the topic of big ships and sea shanties, Roll Northumbria by the Dreadnoughts has been stuck in my head all week: https://youtu.be/-d3XHQVMHDM
Anyway, I was musing on this in some idle time this morning, but formal methods is really not my end of PL (I'm more on the compiler-construction end), and I figured someone here might know more on the topic.
I'm more interested in an "assertion failure" level of checking than "mathematical proof of termination", but if you just had an analysis on (unsigned) integer ranges, and some sort of "bounded" attribute tag for your collection types that are actually bounded, would a compiler be able to statically determine that most(?) common recursion and looping patterns would actually terminate? Would the level of extra annotation required be acceptably small (i.e. you could teach it to a beginning programmer in under an hour)?
I think the only(?) places where you get divergence are unbounded (or improperly-bounded) loops or recursion (and maybe panics/assertion failures, which we analyze the same-ish way).
I'm thinking of something like adding `noreturn` as an expression type, possibly unioned with other types.
TIL Swift has ports to Linux & Windows (hopefully they work well for my PL students who've chosen Swift for their final projects...) https://swift.org/platform-support/
With all the calls for "healing" and "bipartisanship", I've been thinking of the treaty negotiation scene in this season of Star Trek: Discovery. Admiral Vance would love to see a productive alliance between Starfleet and the Emerald Chain, but won't bend on Osyraa facing a fair trial and appropriate consequences for her crimes, because you just can't work with someone who's willing to see you dead if they don't get their way. Dr. Aurellio learns a few episodes later what happens if you're willing to work with a murderer - eventually, they either make you join in their murder, or they kill you.
Biden, Schumer, and Pelosi could learn some lessons. I think there's value in bipartisanship, compromise, and reaching across the aisle, but your interlocutors need to have some common values and a willingness to work within the system in good faith. Half the GOP House caucus and six Senators voted against the democratic will of the American people, many of them after inciting the mob that tried to overthrow that democracy by force. There need to be conditions on the open hand of bipartisanship, and a clear one is that Republicans need to make a clear stand against mob violence, and expel the seditionists like Trump, Cruz, and Hawley from their party, and in at least Trump's case, from his office as well.
I'm not optimistic, but I've read about the failure of Reconstruction after the Civil War, as well as the Beer Hall Putsch a decade before the Nazis took over Germany, and if the USA wants to still be a democracy in a decade's time, there needs to be a clear stand for democracy now.
Useful advice for anyone applying for grad school/PhD program (at least in CS): http://composition.al/blog/2020/11/25/how-not-to-email-prospective-grad-school-advisors/#fnref:1
And the coding question worth 20% of the midterm was ambiguously worded ... just a whiff all around.
This etymology of the word "ampersand" is delightful.
PhD in Computer Science, Interested in parsing, (bicycle) pedals, and politics. 🍁 (he/him)
A Mastodon instance for users who like the study of programming languages, formal semantics, types, or linguistics.