2,676 karma · joined Nov 28, 2019 (7y ago) · 1,131 submissions
comment 1y ago · link · parent
The counterargument is "eventually you'll need every facility provided by a programming language, so just start with a programming language."
I'm not sure how I feel about it. The YAML templating situation in Kubernetes is a [shit show][1]. Then again, I did once cave into the temptation of writing a [lisp-like XML preprocessor][2] to make my configurations less verbose. It doesn't have any access to the environment, though, so it's not a general purpose configuration language, just a shorthand for static XML.
comment 1y ago · link · parent
There's also a sqlite database in there that contains, I think, all of the device's settings and other data, including some crypto stuff for the DRM books that I bought in Kobo's store.
It did insist on an account when I first used it, though. This can be worked around by fiddling with the sqlite database, but I just signed up instead.
comment 1y ago · link · parent
The problem with this is that the answer to the question "what kind of configuration can I expect?" is "simulate the script and find out."
If the script is written well, and is short, then the parameters that are filled in by the runtime environment are apparent. Over time, though, there is a risk that the script will not remain written well, and it almost certainly won't remain short.
comment 1y ago · link · parent
<https://semiwiki.com/wp-content/uploads/2025/02/Figure-1.jpg>
You see, the bars go up and to the right as indicated by the arrow. The thing at the top right, which is under discussion, is more than fifteen times better than the thing on the bottom left.
This is a huge achievement.
comment 1y ago · link · parent
> v-Fluence halts operations after widespread backlash over private portal profiling environmental health advocates
After reading it five or six times, I parse it as
(v-Fluence halts operations
(after (widespread backlash
(over (private portal
(profiling (environmental health advocates)))))))
i.e. v-Fluence is halting their operations. This is after there was widespread backlash. The widespread backlash was about a private portal. The private portal was for profiling certain people. Those certain people were environmental health advocates.comment 1y ago · link · parent
In general relativity, symmetries that exist in the action for a flat spacetime are violated in curved spacetime. So, in curved spacetime, the corresponding quantities are not conserved. One example is energy. The reason has to do with the fact that integrating a tensor along a closed loop in curved spacetime might yield a nonzero result due to the curvature itself, rather than due to the dynamics of what is being integrated.
I don't think that the article goes into any of this. The introduction about general relativity did seem like a curve ball, even if it's historically accurate.
comment 1y ago · link · parent
I don't know what will happen in American politics, nor what effect it will have on the world or the permanence of those effects, but there are demagogues everywhere, America is not exceptional.
comment 1y ago · link · parent
comment 1y ago · link · parent
comment 1y ago · link · parent
Nope, I mean inserting the character pointer ("string") into the stream, not the character to which it maybe points.
Your second paragraph demonstrates, I think, why my former colleague asked the question. And I agree with your third paragraph.
comment 1y ago · link · parent
#include <iostream>
int main() {
const char *p = 0;
std::cout << p;
}
You might answer "it's undefined behavior, so there is no point reasoning about what happens." Is it undefined behavior?The idea behind this question was to probe at the candidate's knowledge of the sorts of things discussed in the article: virtual memory, signals, undefined behavior, machine dependence, compiler optimizations. And edge cases in iostream.
I didn't like this question, but I see the point.
FWIW, on my machine, clang produces a program that segfaults, while gcc produces a program that doesn't. With "-O2", gcc produces a program that doesn't attempt any output.
comment 1y ago · link · parent
I used to prefer dynamically typed languages for most tasks, and saw attempts at statically typing everything as some kind of [compulsion][1].
At work, we were writing a bunch of tests and tooling in python, and the team lead at the time insisted that we type things and lint with mypy strict as if it were a compiler.
I said to my teammate "this is so stupid, if you want to know the types of the parameters, you read the documentation comment right there in the definition. If you want to know more, you read the test. If you want to know even more, you read the source."
My teammate replied, "YOU will write a function with good documentation, thorough tests, and a comprehensible definition, but as an organization grows, a shrinking percentage of code will be written that way. These automated checks prevent the worst from coders who care less than you do."
I had no retort, so there is that.
[1]: https://github.com/dgoffredo/stag?tab=readme-ov-file#why