Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
marvy
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
marvy
1y ago
the full story is in the language reference, but the short answer is: __radd__ (unless it's more complicated than I realize)
2.
▲
by
marvy
3y ago
you can choose; there's an option buried in settings somewhere
3.
▲
by
marvy
3y ago
Clever! I like this! I feel a bit jealous that I didn't think of it :) It's not quite as easy as it seems, because these methods are "intrinsics". That is, the pure Java code you see is not always the one that gets us
4.
▲
by
marvy
3y ago
I feel like there's two sides to this. On one hand, I agree with Zulip: don't make promises you're not sure can keep. On the other, you also shouldn't believe promises if the person making them is obviously not in a po
5.
▲
by
marvy
4y ago
Thanks for the above. (nice self-restraint in the last paragraph.) Things almost make sense now. Except one problem ... this implies that there are software developers who think to themselves "given a cell phone number, how can I ge
6.
▲
by
marvy
4y ago
sorry I meant it was an UNSIGNED integer back then
7.
▲
by
marvy
4y ago
I thought it was settled in Version 4. Compare: https://www.tuhs.org/cgi-bin/utree.pl?file=V3/man/man2/time.... vs https://www.tuhs.org/cgi-bin/utree.pl?file=V4/man/man2&#
8.
▲
by
marvy
5y ago
Thanks for explaining. I guess if you ever decide to become a foreign spy, you can point to this as "relevant experience" in THAT job interview. Or something.
9.
▲
by
marvy
5y ago
How would a boyfriend or lack thereof even come up in an interview? Let alone so often as to be worth practicing such a thing? (I'm single, but I don't remember ever mentioning it in an interview. Though my memory is bad at thi
10.
▲
by
marvy
5y ago
New York presumably
11.
▲
by
marvy
5y ago
Why does it need a champion? Suppose some legislator is drunk one night and decides to introduce a bill banning non-competes. Who would vote against it?
12.
▲
by
marvy
5y ago
isn't it?
13.
▲
by
marvy
5y ago
Amazing. A real, live, credible proposal for lambdas in ISO standard C.
14.
▲
by
marvy
5y ago
Ooh nice! I didn't think of that! Since appending to an array is cheap, you can just move-to-end instead of move-to-front, and then iterate in "reverse" order, so from the outside everything seems to Just Work.
15.
▲
by
marvy
5y ago
I think LRU does NOT work with this trick, because there's no easy way to "move-to-front" in O(1) time. The article mentions Java's LinkedHashMap, which actually can do LRU. But as the name implies, they rely on a linke
16.
▲
by
marvy
5y ago
they got rid of that in Python 3, I think
17.
▲
by
marvy
6y ago
Okay now I'm curious: what IDE do you use that makes this a non-issue?
18.
▲
by
marvy
6y ago
Consider the following two cases: 1. MyClass has 10 private fields, each with a trivial getter and setter. 2. YourClass has 10 private fields, of which 9 have a trivial getter and setter. The last one has a trivial getter but the setter is
19.
▲
by
marvy
6y ago
I think mh7 did not mean to hard-code intcmp into qsort. The idea is to move the definition of qsort directly into the stdlib.h header file. That way, the compiler can see the definition of qsort and intcmp at the same time. In that case,
20.
▲
by
marvy
6y ago
You can tweak the definition to take advantage of whatever your language DOES allow. He alludes to this during the Q&A at the end. For instance: two expression are equal if (and only if), for all possible contexts C, you have C[e1] an
21.
▲
by
marvy
6y ago
In this simple script you can, but eventually you need an loop or something and you realize you're kind of stuck: before_loop; while something: step1; step2; after_loop; Note that after_loop is still inside the loop. Also you can'
22.
▲
by
marvy
6y ago
Might be worth filing an issue; a glance at the repo suggests that the list is still being actively maintained.
23.
▲
by
marvy
6y ago
> maybe even win with In a U.S. court? You really think so? If you're right then in my opinion that's proof that the law needs fixing.
24.
▲
by
marvy
6y ago
With Project Panama, they are finally trying to make calling non-Java code easy.
25.
▲
by
marvy
6y ago
Kernel will hopefully be ready; user space is another story.
26.
▲
by
marvy
6y ago
I think foo::args should be a normal struct type, so sizeof(foo::args) would follow the usual rules, just as if someone had manually written struct foo_args{char a; short b; long c; float d; etc...} and then asked for sizeof(foo_args).
27.
▲
by
marvy
6y ago
This mostly solves the unpacking problem. Thus, there are only two problems left: 1. I need to handcraft the tuple type myself, and make sure it matches the function declaration. (In other words, I don't want to manually write tuple&
28.
▲
by
marvy
6y ago
sorry, I meant named parameters
29.
▲
by
marvy
6y ago
The title is slightly click-bait-y: C++20 doesn't have default parameters. It talks about how to fake it with structs. It's a pretty convincing fake, but it has one problem: the person who wrote the function needs to have written
30.
▲
by
marvy
6y ago
Why so sure? Are you saying this program probably was legal after all and this court made a mistake?
More ›