Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
quicknir
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
61.
▲
by
quicknir
10y ago
It's not really true that C++ does not have an ABI advantage over Rust if (by your own comment) they both end up using the C abi. Although pedants will insist that C is not a subset of C++, practically speaking you can write idiomatic
62.
▲
by
quicknir
10y ago
Most of my good friends, let alone Facebook friends do not share similar views. Some people are pro legalizing drugs, some are anti, some are more socialist whereas some are free marketeers, some are pro foreign intervention and some are is
63.
▲
by
quicknir
10y ago
No that's not all it is, and the person who does not understand the law is you. Quebec language laws require for instance that commercial signs not only have French, but that French be predominant. Why does a sign having big print in E
64.
▲
by
quicknir
10y ago
Actually, it is "asking a lot". Quebec's language laws have been found to be in violation of the Canadian Charter of Rights and Freedoms. Unfortunately, the Charter (which Quebec did not support) has a "notwithstanding&q
65.
▲
by
quicknir
10y ago
Throwing from a destructor in ScopeGuard is equivalent to calling a function that can throw in a catch or finally block, which you can do in most (any?) languages with exceptions. This no exceptions in destructors "issue" is not a
66.
▲
by
quicknir
10y ago
I don't know what you mean by "definitive conclusions". Any conclusions that will be made will naturally be statistical in nature, and obviously the boundaries between groups are fuzzy in many cases. That does not mean that g
67.
▲
by
quicknir
10y ago
I don't agree with much in this post, but in particular "Destructors is all we have": destructors + lambdas + templates allow you to write ScopeGuard, which is a pure superset of finally blocks. Modern C++ has zero need for f
68.
▲
by
quicknir
10y ago
I know people at most of the larger algo trading firms in nyc, they all have all excellent reputation for how they treat employees. Sounds like you have algo trading confused with big banks like GS.
69.
▲
MultiArray: Multiple Arrays, One Allocation, Generically
(turingtester.wordpress.com)
7 points
by
quicknir
11y ago
|
0 comments
70.
▲
by
quicknir
11y ago
It's not really an extra pointer, unless you assume there are no alignment issues. If you assume that there's zero padding between members, then yes, you can do 1 pointer for storage + 1 per view. In the follow-up post, I plan to
71.
▲
by
quicknir
11y ago
Thanks, I appreciate that. I welcome your feedback on the follow-up as well.
72.
▲
by
quicknir
11y ago
FWIW, I assumed as much when I wrote the post. I wrote merely that the code is bug-prone generally, without pointing out specific bugs. A stance that I got the impression you agreed with, from watching your video. In generally I tried to av
73.
▲
by
quicknir
11y ago
I think that you are misattributing premises to me. I think that a "combined type", can be safer if well written than a raw pointer. Surely you don't disagree with that? That's not the same as saying all combined types
74.
▲
by
quicknir
11y ago
Hi, thanks yassim. Yes, the use case is from the original article. Yes, that is certainly another way to go, you could just provide the unique_ptr and a bunch of integer offsets. In this post, my data structure is trying to balance performa
75.
▲
by
quicknir
11y ago
I did discuss stateful allocators. They're nice, I'm a big fan. But as I said, they would impose pointless space overhead of one extra pointer per array. Also, you now have more complicated issues: each of the arrays is now an own
76.
▲
by
quicknir
11y ago
The point isn't necessarily about whether C++'s abstractions are faster than Java's, the point is more that you aren't always forced to use them. If you are willing to commit to the size of your string at compile time, y
77.
▲
by
quicknir
11y ago
I considered that. The problem is that memory_block would need an extra pointer to know its size, which seemed like pure waste at that point. And ultimately it doesn't relieve you of writing copy constructors etc which should be the re
78.
▲
by
quicknir
11y ago
Post author here. Sorry you feel that way. I'm surprised you don't think that moving out the messy code into make_contiguous is a win. Isn't it good to factor out clearly reusable code into functions, so you can reuse it? Wou
79.
▲
by
quicknir
11y ago
I don't know as I'm not a game developer, but my guess is that individual Meshes may correspond to things that need to be created and destructed on a regular basis during runtime. If that's the case, then depending on the det
80.
▲
Joint Allocations in C++
(turingtester.wordpress.com)
3 points
by
quicknir
11y ago
|
0 comments
81.
▲
by
quicknir
11y ago
So, in retrospect, my example was not a good one, I'm afraid. the recomputing of the string was a red herring. All that matters is that the moved-from object was in a valid state. You can look at the updated post, maybe it will help a
82.
▲
by
quicknir
11y ago
Dude, the stealing etc was clearly tongue in cheek. It seems like the example I picked was a bit unfortunate in the following sense: a couple of people have already misinterpreted the point of the article to be that foo still had content af
83.
▲
by
quicknir
11y ago
Actually, that's not true. Here's what I wrote: "By stealing the string, we put foo in an invalid state". foo is an object of the SetStringer class. It puts it an in invalid state because it no longer maintains its own i
84.
▲
by
quicknir
11y ago
Thanks for the catch, fixed.
85.
▲
Object Theft Etiquette in C++: methods with a side of &&
(turingtester.wordpress.com)
21 points
by
quicknir
11y ago
|
20 comments
86.
▲
by
quicknir
11y ago
Yes, of course you can do that, but you lose certain things. In C++ you can write code (e.g constructors) that will do the right thing with their arguments, move or copy, based on whether the input is an rvalue or not. Is there a way to get
87.
▲
by
quicknir
11y ago
Right, which is great, don't get me wrong. If you're going to have that behavior, having the compiler enforce it is good. I just think it's a bit amusing, people complain about this sort of thing in C++ all the time. I can im
88.
▲
by
quicknir
11y ago
It actually works quite well. It's not without its quirks, but unique_ptr is really great. If you think there are holes in unique_ptr, then write an article with some good examples, I'll be the first to read it. Rust hasn't s
89.
▲
by
quicknir
11y ago
Full disclosure: I'm the blog author. If you're claiming that the verbose way is just writing out the special functions, then I can assure you that it is not easier to maintain. If you are saying that the class in question could s