1,311 karma · joined December 19, 2020
Relevant: https://xkcd.com/1988/
> using the conditional-value ("ternary") operator in any capacity
Looks like author of some code I had to comb through recently, maybe had that among guidelines. Said code was replete with:
if(function_that_returns_boolean()){
return true;
}else{
return false;
}
...and... if(foo()){
return true;
}else{
if(bar()){
return true;
}else{
return false;
}
} import html
print(html.unescape(foo))
And the best part - you don't need to debug/update the (g)sub list every time you stumble upon new weird &whatever; too. And there are a lot of those out there:For fellow website admins, this is your regular reminder to use static site generators, where possible, and server-side cache where not.
$ cat foo.tsv
name foo bar
Alice 10 8888
Bob 20 9999
$ cat foo.tsv | sqlite3 -batch \
-cmd ".mode tabs" \
-cmd ".import /dev/stdin x" \
-cmd "select foo from x where bar > 9000;"
20Micripython's "viper" just-in-time compiler. It can only be applied to one function at a time, restricts what you can do in such a JIT-ted function quite severely, but resulting speed is pretty much native:
https://docs.micropython.org/en/latest/reference/speed_pytho...
It's really not that hard, once you get used to it. Or, if you rather not spend that precious time, there is a GUI tool that would configure those parameters for you:
Bonus: once started with virt-manager, run "ps ax | grep qemu", et voila - you have your qemu parameters, ready to copy-paste, should you wish to run exact same VM later from a script, or something...
https://www.ultraedit.com/wp-content/uploads/2023/01/ue-img-...
Number of defects vary. Chips coming from the same factory, even same batch, are likely to have different number of defects, and will be binned accordingly.
Devices with larger (but manageable) number of defects will simply have larger ECC region reserved - leaving smaller space to show to host computer. OP's new USB stick is like that, that's it, I reckon.
Yep, that seems to be the key, and some realized that already: https://news.ycombinator.com/item?id=34463061
Not exclusively in C, not anymore: https://docs.kernel.org/rust/index.html
It might take another decade for a C-free build to be possible, though.
Most banks/payment processors would charge a fixed amount per small transaction. Amount varies a fair bit, but as an order of magnitute, say - €0.15 or something like that. This means customer that bought cup of coffee for €1.50 and insists on paying with a card, will cost vendor whooping 10% extra (it is not allowed for vendor to pass on card transaction cost to customer).
For a larger purchase, €30, €60, and more - transaction charge is negligible, naturally.
Thanks to glaciers melting, earth rotation is (temporarily) accelerating. Because of that, positive leap seconds, regular before, didn't happen since 2017 - so there could very well be (recent) software out there that has that code-path broken, and nobody noticed yet.
And due to exact same geophysical effect we might see a negative leap second - something that never ever happened before. What are the odds that every single piece of software gets that one right?
UT1 - based on Earth's rotation only, strictly 86400 seconds per day; length of each second varies; takes a heck of a lot of effort (and time) to measure accurately.
UTC - has same length of a second as TAI, but (for now) tracks UT1 to a precision of +/- 1 second. To achieve that, can have days that are 86399, or 86400, or 86401 seconds long.
None of 3 is planned for scrapping. The only change discussed in TFA is to fix UTC day to 86400 seconds (at cost of letting it drift further away from UT1).
I have to add that GPS messages include TAI-UTC offset. That means that user of even old, non-internet-connected GPS receiver that didn't have any software updates in a decade, will still read out exact UTC time with cumulative leap seconds correctly applied.
That oxide film tends to interfere pretty badly with wetting of surfaces being soldered. In other words - it's much easier to end up with a "dry" joint - even with adequately increased temperature - unless better and/or more flux is used.
But once you get over that, it's a great language. First-class regex, -pine options. A lot to love about it.
Where I am, we used to have a different, "nerdy" ISP [0], where customer was allowed to bring their own modem; they also provided real IPv4/v6 dual-stack since forever, easy to request a /29, tech-support that's realistic to reach, and staffed with people who know what they are talking about, no bulk-firewalling port-25, etc... All for a modest 2x price increase over market average. Alas, they're out of business now.
And nowadays, every popular IM network wants 3rd-party clients off their net at all costs. Signal is on the better side of the spectrum here. While they explicitly say they don't support non-official clients connecting to the official network, this isn't rigorously enforced. WA, on the other hand, would permaban your whole account if you even so much as try to use 3rd-party client.
Ah, got it. Another failure mode. There is a /bin/bash, but it's an ancient, crummy thing, that is difficult to upgrade. MacOSX does this, so users paper this over by installing a private copy as ~/bin/bash. Thank you.
DoS is the only publicly known exploit, right now. There is understanding that RCE is possible with additional specialist work.
Local packet injection is an implementation detail of the first public PoC. There are other implementations of the same exploit, that deliver packets over the air instead. Including one that runs on ESP32, and attacks unmodified Linux nearby:
https://seclists.org/oss-sec/2022/q4/23
This is a catastrophic bug, that (after some work on developing an actual RCE) lets anybody within wifi range to get root on your laptop (or phone, or access point). And all it took is this one line:
https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wir...
We've all been repeating the "1000 eyes - all bugs are shallow" mantra for far too long. This one was in the mainline for more than 3 years, and nobody noticed. How many more are lurking there?