Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
alvarelle
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
alvarelle
6y ago
> in rust as long as you don't use a feature you don't need to know about it. Is that not the same in C++ and in most languages? ... until someone else in your team uses it in your code base. And then you need to know about it
2.
▲
by
alvarelle
6y ago
Yes. That's orthogonal. And people have been using CMake with Qt (and moc) for almost as long as cmake exists
3.
▲
by
alvarelle
6y ago
You should be fine with the LGPL license of Qt.
4.
▲
by
alvarelle
6y ago
> ... std::atomic<bool>. This tells the compiler not to elide reads and writes of this variable, ... If I'm not mistaken, this is not true. The compiler is still allowed to elide reads and writes on atomic variables. (For exam
5.
▲
by
alvarelle
6y ago
I find it ironic that you answer to a comment asking for links, but you don't provide any. (Same for the other comments in this thread)
6.
▲
by
alvarelle
6y ago
I believe I understand correctly UB and unsafe. The cxx crate and the autocxx tool should make sure that the exposed C++ functions only take arguments types which have well defined semantics. In your example, a rust Box<T> maps to a r
7.
▲
by
alvarelle
6y ago
The point is that the C++ code should be safe because the C++ programmer should not introduce UB on its C++ code. If the C++ code invoke UB, that is a bug in the C++ code which should be found by reviewing the C++ code alone. No need to wri
8.
▲
by
alvarelle
6y ago
Imagine what proponents to heliocentrism such as Galileo had to face explaining their theory and how it explain a simplified elliptic orbit for the planets rather than the strange curly orbits known by geocentrists. They'd be confronte
9.
▲
by
alvarelle
6y ago
I did not see digraphs mentioned. Could look like <: and :>. The formatting tool could even normalize that to some prettier unicode.
10.
▲
by
alvarelle
6y ago
The graphical design of his website?
11.
▲
by
alvarelle
6y ago
What's magic in Box?
12.
▲
by
alvarelle
6y ago
I believe you got it backwards. The price of bitcoin determines how much the miners are going to spend to produce it. (Or we are both wrong)
13.
▲
by
alvarelle
6y ago
Could also try to use the smallvec crate in this case, which put small allocation on the stack https://docs.rs/smallvec/
14.
▲
by
alvarelle
6y ago
But with rust you have to re-learn the language every six weeks as it changes so fast. (/s)
15.
▲
by
alvarelle
6y ago
No, it hasn't. Actually C++20 comes with only the minimal support for coroutines in the std library. If you want to do anything useful, you need to implement a promise type yourself which is very hard to do without using one library th
16.
▲
by
alvarelle
6y ago
I don't know about the others, but C++ don't have a default implementation as part of the standard. If you want an event loop, you need to use one of the many libraries that provide one.
17.
▲
by
alvarelle
6y ago
I have a laptop I bought in 2009. I installed archlinux when I got it and upgraded regularly, and it still works.
18.
▲
by
alvarelle
6y ago
> Can anyone elaborate why exactly allowing demonstrably harmful and malicious lies [...] "Contradicting WHO" is not the same as "demonstrably harmful and malicious lies"
19.
▲
by
alvarelle
6y ago
> Who decides who the liars, cranks and con artists are? Yes, WHO decides.
20.
▲
by
alvarelle
6y ago
The article also suggests you should start with the post expensive option (60 in your case)
21.
▲
by
alvarelle
6y ago
Romans needed many more than 3 "digit" (or rather letter) to represent this date. Also, the AD system (counting the year since the birth of Jesus Christ) was introduced much later.
22.
▲
by
alvarelle
6y ago
Personally, I stick with K&R C. I haven't gotten around to update all my with function signatures. whats is the thing with putting (void) all over or specifying the return type of my functions? Really, these explicit function decla
23.
▲
by
alvarelle
6y ago
On the other hand, you could argue that the r# gives you "more prominence" which is exactly the stated goal of using that macro.
24.
▲
by
alvarelle
6y ago
Or using this crate: https://docs.rs/cpp/0.5.4/cpp/
25.
▲
by
alvarelle
6y ago
In C++ you can't hide a variable with another of the same name in the same scope. So you'd want to give different names to all the 'state' variables.
26.
▲
by
alvarelle
6y ago
That's assuming players knows about the other players, which is not specified in the problem description. It is not even specified if the same game is played several time with the same rules. Given the description from the article: >
27.
▲
by
alvarelle
6y ago
If the host knows where the car is, why would it ask the player to change door if he knows the player already choose a goat? The problem should specify that those are the rules of the game that the host always open a door. Otherwise, as a h