Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
eMSF
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
91.
▲
by
eMSF
6y ago
You don't see how variants improve readability over union+tag? Do you mean that you don't see a whole lot of difference below: std::variant<int, std::string> setting; setting = "foo"s; setting = 1; Compa
92.
▲
by
eMSF
6y ago
Activation, for example. An activated and running Windows system can turn into a nagging SOB by something as simple as enabling a motherboard's Ethernet adapter in BIOS. A level of detail I value is that none of that BS is baked into
93.
▲
by
eMSF
6y ago
fgets reads until the next newline character, or at most size-1 characters. For arbitrary inputs, a loop like that sets ret to TRUE if the given prefix (i.e. LANG) is found at the beginning of any line, i.e. starting at the first column – o
94.
▲
by
eMSF
6y ago
>this right here is (sadly) already a DMCA violation for the person who rips the DVD Yes, because we all live in America... right? Megaupload wasn't even a US company, why should it “enforce” some foreign legislation on non-concerne
95.
▲
by
eMSF
6y ago
Is (* (f (+ 2 x)) 5) more difficult to parse than: 5 * f(x+2) Considering that we're familiar with the latter syntax (more or less) since kindergarten, I'd say... yes. And the idea that you'd somehow start to co
96.
▲
by
eMSF
6y ago
Why would you walk out the door before checking that the store is open, if the whole point of the excursion is to visit the store (and in this case, you don't have an idea when it is open)?
97.
▲
by
eMSF
6y ago
I'm not sure what Finnish word you are referring to. The word for telephone, however, is not a compound word, and it's even quite succinct. You can see the etymology here: https://en.wiktionary.org/wiki/-in#Et
98.
▲
by
eMSF
6y ago
You ought to have mentioned that pointers of the latter type are quite rare in C. A mention of const pointer practically always means a pointer-to-const: a pointer you can't write through. Often you can still "re-bind" such p
99.
▲
by
eMSF
6y ago
That's probably not going to be the case for most of the time in Southern England.
100.
▲
by
eMSF
6y ago
There's an endless amount of worthless junk science and not-science around anything deemed by some as "too artificial". Especially when it comes to nutrition. Hardly anything to dive into, though.
101.
▲
by
eMSF
6y ago
>like being able to right-click in the file browser to create a new file or resizing windows to the left/right side of the window with Meta-left/right It's been possible to create files in the file browser (in Nautilus
102.
▲
by
eMSF
6y ago
Seeing the result of a modified history expansion is (or was) kind of a desired feature, so it's built-in just like the ability to escape stuff with :q $ # here be quote ' " chars (use :p to print but not execute)
103.
▲
by
eMSF
6y ago
If you intend to type or paste quotes, you still need some additional escaping. And on the other hand, most substrings of (non-quoted) escaped text are themselves properly escaped.
104.
▲
by
eMSF
6y ago
You're reaching. I'm not sure it adds much to parent's point.
105.
▲
by
eMSF
6y ago
With the given options, ls is no longer trying to separate "raw" filenames with any character. Rather, it encodes them unambiguously, and hence we can parse the newline-separated output just fine. You can see the same "trick&
106.
▲
by
eMSF
6y ago
Are you sure it didn't work? How does the output look if you change the single quotes in "'$filename'" to some other character? (I mean, the point of this snippet is to parse the output of ls, i.e. assign each path
107.
▲
by
eMSF
6y ago
Quotes are a non-issue. The classic problem is that we can't tell apart newlines that are part of filenames, and newlines that separate filenames; however, recent coreutils ls provides an alternate format where this is not an issue. It
108.
▲
by
eMSF
6y ago
Or rather, a newline after each filename. However, as filenames themselves can contain newlines, a single name can span several lines. These new fancy quoting styles actually finally make it possible to parse the output of ls (although I st
109.
▲
by
eMSF
6y ago
Typing those single quotes in a shell won't make any difference as far as rm is concerned (because it won't ever see them). However, some rm utilities are smart enough to remove files, even if they resemble non-existing options. F
110.
▲
by
eMSF
6y ago
Yes. You can change the behaviour in bash by setting the nullglob option (shopt -s nullglob).
111.
▲
by
eMSF
6y ago
I guess you only ever extract punctually named files. But it's still rather amusing that with the exception of 'case', the only places where $1 is properly quoted are the ones where it's not really necessary, and vice ve
112.
▲
by
eMSF
6y ago
IIRC 'rm -r' prompts by default for read-only files as well even if you own them.
113.
▲
by
eMSF
6y ago
Same or similar price as 2080, cheaper than 2080 Ti.
114.
▲
by
eMSF
6y ago
I feel like this used to be more true in the past. These days CPUs can exceed their official TDP by quite a large margin, and while in theory they should only do so temporarily, many motherboards default to unlimited boost clocks. (Then aga
115.
▲
by
eMSF
6y ago
Can you sail with it? Exactly how are bikes relevant on a boat thread?
116.
▲
by
eMSF
6y ago
>What about the gold-rich asteroids we can mine? Which asteroid(s) are you speaking of?
117.
▲
by
eMSF
6y ago
>The answer is that it's much simpler to send everyone a check. That's an answer, not the answer. A similar question is: “how much should UBI pay per month?”, and a similar answer is that “it's much simpler to just pay gaz
118.
▲
by
eMSF
6y ago
>This simply takes away the corruption and bureaucracy and gives it to everyone. So to those who need it, and also those who don't. Why not just the first group? It'd be a lot cheaper.
119.
▲
by
eMSF
6y ago
But why would they support a policy (UBI) that causes them to earn less money because of more “freeloaders”?
120.
▲
by
eMSF
6y ago
That doesn't mean they aren't still legal tender in Finland (which they are). Somewhat relatedly, some places also don't accept all the banknotes – that is, the largest denominations – a rule which clearly has nothing to do w
More ›