Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
david2ndaccount
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
david2ndaccount
2y ago
With a string literal it works, with a dynamic string it just gives an undefined reference error to eval.
32.
▲
by
david2ndaccount
2y ago
I wrote a blogpost showing how you could do a similar thing in D with ImportC. https://www.davidpriver.com/C-macro-reflection-in-D.html
33.
▲
by
david2ndaccount
2y ago
Are there any compilers that insert nops between real instructions in debug builds to allow inserting a jump to code to evaluate the expression? Conditional breakpoints are so slow it’s usually faster to add an if with the condition and rec
34.
▲
by
david2ndaccount
2y ago
If a program is not responding to ctrl-c, sometimes ctrl-\ (which sends sigquit instead of sigint) can kill it.
35.
▲
by
david2ndaccount
2y ago
In my experience, code reviews catch a lot of bugs. However, if you find yourself catching the same kind of bugs over and over again in review you should be finding ways to catch them automatically without involving a reviewer (static analy
36.
▲
by
david2ndaccount
2y ago
Feels like many of these features should just be built into the browser. Why can’t the browser assemble a table of contents based on header hierarchy? Isn’t that the point of the number in h1-h6? Why aren’t elements with ids easy to link to
37.
▲
by
david2ndaccount
2y ago
You could expand the number of lanes on I15 (like it is on the Nevada side) for a small fraction of what this project would cost.
38.
▲
by
david2ndaccount
3y ago
Python also has protocols: https://typing.readthedocs.io/en/latest/spec/protocol.html#p...
39.
▲
by
david2ndaccount
3y ago
Ukraine is not part of NATO, so how has push come to shove?
40.
▲
by
david2ndaccount
3y ago
The issues with physical currency are almost entirely self-inflicted. Governments should retire the smallest denominations and introduce larger coins/bills. In the US, all of the coins are worth so little that the only practical coin i
41.
▲
by
david2ndaccount
3y ago
Since you’re updating it anyway, the very first example says "D has @property functions, which are methods that you call with what looks like field access, so in the above example, c.d might call a function.” It is true that `c.d` migh
42.
▲
by
david2ndaccount
3y ago
This is not thread safe.
43.
▲
C++ module tooling emulator playground
(nibblestew.blogspot.com)
1 points
by
david2ndaccount
3y ago
|
0 comments
44.
▲
by
david2ndaccount
3y ago
I regret to inform you that was released in 2014, almost a decade ago.
45.
▲
by
david2ndaccount
3y ago
I found my interest in video games died when I started working. Whatever button in my brain video games were pushing is now being pushed by the day job and I get paid for it.
46.
▲
by
david2ndaccount
3y ago
Indeed, -Werror doesn’t make sense, but specifying specific errors (like -Werror=return-type to prevent forgetting to return a value from a function) is very, very necessary.
47.
▲
by
david2ndaccount
3y ago
Tsan doesn’t understand mach semaphores unfortunately.
48.
▲
by
david2ndaccount
3y ago
Make sure you plant native milkweed. The exotic kind is not good for the butterflies.
49.
▲
Catalina Island Bison Herd
(en.wikipedia.org)
1 points
by
david2ndaccount
3y ago
|
0 comments
50.
▲
by
david2ndaccount
3y ago
I don’t know why you’d want to live in the LA area and not own a car. One of the things that is actually nice about southern california is the ease with which you can go to the beaches, the mountains and other beautiful places and realistic
51.
▲
by
david2ndaccount
3y ago
If your team is full of adults, you just pick a formatter tool at the beginning of the project, add it to your pre-commit hook and then never think about it again.
52.
▲
by
david2ndaccount
3y ago
Leaderboard will be dominated by AI-assisted speed runners this year. I think I’ll just solve them in the morning this year instead of trying to get on the leaderboard (I can usually get in the top 100 on the trickier ones). Will be better
53.
▲
by
david2ndaccount
3y ago
I do not expect standardization of features that do not exist.
54.
▲
by
david2ndaccount
3y ago
This works for C, but not C++. And for C, it’s not that hard to do by hand so no one else bothers.
55.
▲
by
david2ndaccount
3y ago
The ISO committee should not be in the business of inventing language features out of whole cloth. That is not how “standardization” works. They should only standardize existing practice.
56.
▲
by
david2ndaccount
3y ago
The dungeon itself is the game/puzzle/challenge that the players are trying to overcome, either for the default goal of finding its treasure or for a specific goal like find a specific macguffin or other target. In this mode, the
57.
▲
by
david2ndaccount
3y ago
You only know there are no mutations if Foo itself does not contain any indirections. Additionally, the compiler generally cannot assume that Foo_bar does not modify Foo as it is legal to cast away const as long as it is not originally a va
58.
▲
by
david2ndaccount
3y ago
Arguments to sizeof aren’t actually evaluated (except for variably-modified-types, AKA VLAs, but don’t use those).
59.
▲
by
david2ndaccount
3y ago
I disagree about the structs vs out-parameters thing. I’ve found it makes functions that could return an error much harder to compose and leads to a proliferation of types all over the place. In practice almost all functions can fail (assum
60.
▲
by
david2ndaccount
3y ago
In a discussion like this you have to mention that Microsoft’s compiler extended volatile to mean atomic[1], although its default behavior depends on target ISA apparently. Regardless, just use c11/c++11 atomics at this point. 1. http
More ›