2,338 karma · joined November 9, 2012
Why not? You're paying them for the device. Why should they have a right to stop you using it how you want? Imagine if buying a car also came with a requirement to only use the dealership's petrol stations for the first year.
>>> mylist = []
>>> try:
... first = mylist[0]
... finally:
... inverse_length = 1.0 / len(mylist) # imagine this was something more complex
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
ZeroDivisionError: float division by zero CREATE TYPE number_with_unit (
value DOUBLE PRECISION,
unit TEXT
);
CREATE TABLE example (
height number_with_unit, -- our composite type, eg. (6, 'ft') or (180, 'cm')
known_aliases TEXT[], -- list of string
active_times TSRANGE, -- time range, ie. (start, end) timestamp pair
);
SELECT height.unit,
known_aliases[1] AS primary_alias,
upper(active_times) - lower(active_times) AS time_active
FROM example;This is the most frustrating part of Scrabble to me. I consider my vocabulary to be pretty good. But frequently when I try to use an even slightly-esoteric word in scrabble, it turns out to not be in the official dictionary. And conversely, the official dictionary is full of words I've never heard or seen used by real people and often has some definition like "18th century slang for <word>". I then lose to people who know all these weird words (especially the very short ones, which they've memorized) and who admit they have never heard these words outside a scrabble context either.
In short, the English the players speak and the English defined by the official dictionary are different enough languages that it seems only useful as a way to learn "Scrabble English" and not modern English.
It's fine that they exist but presenting them as being full sugar when they aren't is false advertising.
My understanding is that a sound implementation of signal handling in Rust will require the signal handler to be Send, requiring it only has access to shared data that is Sync (safe to share between threads). I guess thread-safe does not nessecarily imply signal-safe, though.
And of course you could still call to a signal-unsafe C function but that requires an unsafe block, explicitly acknowledging that Rust's guarentees do not apply.
All processes should be prepared for a sudden crash without corrupting state. Things get OOM killed, machines get unplugged, networks go offline. We have things like journals and write-ahead-logs and at-least-one messaging precisely because of these kinds of problems. If your process can't handle being terminated at any time then you have problems regardless of if it's wrapped in timeout code.
Doing this for a block of code within a process is a lot harder, because a) there's generally more surface area of externally-observable state, and b) code does not normally need to be prepared to handle it.
For what it's worth, I've had a good success rate at politely asking to be given an equivalent laptop I can put linux on, or provide my own device. I've never had to outright reject an offer due to being required to use a Mac. At worst I get "you'll be responsible for making our dev environment work on your setup".
While you would be correct if only considering risk of death, this doesn't tell us anything about the incidence of non-fatal pedestrian-cyclist interactions and what the outcomes are. It would be perfectly rational to care more about cyclists if it was 100x more likely than a car crash and still carried a signifigant risk of injury, even if the risk of death is extremely low.
To be clear I actually agree with you that cars are still likely the higher risk, just pointing out a limitation in your data.
One example shows some patterned plates. If you told me I could buy those patterned plates for $1, and the same plate but perfectly white for $10, and no-one but me would ever see or use them, I would take the $10 plates every time. I find the patterns annoying and distracting, especially for a surface which I want to ensure is clean.
On the streetlight example, I think the difference there is less a change in aesthetic and more a change in cultural expectations around public works. If you built the ornate street lamps today, even if it was in style, it would likely be decried as "unnessecary spending".
I do think there's a reasonable point to make that in today's market of mass-production, any preference besides the single most mainstream, mass appeal one is extremely hard to find. I wish the author could find more options that suit their preferences, even if I personally don't share them.
That HTTP API is backed by etcd which uses Raft and that is where running over a large area is more likely to cause problems. One approach would be to keep the etcd instances in one region (and probably also co-locate the scheduler, controller manager there), while having far-flung worker nodes. This creates a risk of losing the control plane but in most cases services would keep running (but would be unable to react to any further issues until the control plane recovers).
You would also want to carefully design your workloads with topology constraints and region-specific services to avoid high application layer latencies though.
Overall it's a fun thought experiment. In practical terms I think cross-datacenter in a small geographic area would work fine but I probably wouldn't want to run a single worldwide cluster, both for the reasons above and for other scaling reasons.
See https://en.wikipedia.org/wiki/Punycode#Encoding_the_non-ASCI...
In practice this is how everyone does it, but in theory it should be possible to have a non-sampled view of CPU usage (defined as "time process is scheduled onto a CPU"). With the right kernel introspection, you could represent it as a series of spans covering each time slice where the process is scheduled. Perhaps with a concept of a "currently ongoing span" to account for the current time slice.
Do I think this would be more useful than the typical sampled metric? Probably not, outside some niche performance analysis workflows. But my point is that CPU is not actually continuous, and I struggle to think of any metric which cannot be represented without sampling if you REALLY need it.
Increased/cheaper travel would also come with some bad externalities: Increased CO2 emissions, and possibly increased rates of cancer (high altitude is a high-radiation environment - not enough for the occasional flyer to worry about but it can add up). ...and of course the externality that lower safety controls means occasionally one of these more frequent flights will fall out of the sky.
One way to think about these kinds of questions is to reverse it - suppose flying had 10x stricter safety controls than it does today. Would the world be a better place as a result? What would be the downsides?
EDIT: I almost forgot perhaps the most important one: If flying is more convenient/cheaper, even if it's slightly less safe than currently, it is still FAR safer than driving and a shift from people driving to people flying means that relaxing flight safety may actually SAVE lives.
But ultimately this was a minor issue and I think it's far more important that you use something like this (whether a DSL or a mainstream PL) and that you're not trying to do string templating of YAML.