Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
duped
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
50 ms
·
961.
▲
by
duped
2y ago
It's very common for daemons/servers to chdir("/") at the top of main. Relative paths sent by clients getting broken is a feature, not a bug. (In fact I just fixed a bug related to this an hour ago because a relativ
962.
▲
by
duped
2y ago
If it's a relative path, then changing the working directory will break (chdir("/") is a very common tactic at the top of main()). It's possible/desirable for the parent to change the PATH of a child process, p
963.
▲
by
duped
2y ago
Well that's true, but also something that can't be addressed within a currently running process afaik.
964.
▲
by
duped
2y ago
Those are all cases where you're using argv[0] as an argument to the program where it's appropriate. Using it as the path to spawn a child process is incorrect . You're free to re-use it as an argument. I have fixed enough s
965.
▲
by
duped
2y ago
clang does this too.
966.
▲
by
duped
2y ago
Don't do this - if you (reliably) want the path to the current executable there is no portable way to do it, but on Linux you need to readlink /proc/self/exe and on MacOS you call _NSGetExecutablePath. I forget the API
967.
▲
by
duped
2y ago
It seems like the test is starts with a clear green or clear blue and then devolves into cyan and asks if you think it's blue or green. I think it's blue or green hinted cyan.
968.
▲
by
duped
2y ago
This is an accuracy vs precision question - an iPad is not an appropriate tool for the job even if there are hacks to get around its limitations. You should consider buying a different device for this purpose. You can learn C on a Raspberry
969.
▲
by
duped
2y ago
Sure, when the cameras start turning into a source of revenue then the city has an incentive to adjust the timing of the lights to maximize revenue and not minimize harm. This has happened (notably, the city of Chicago reduced the time of y
970.
▲
by
duped
2y ago
Red light cameras have perverse incentives that have led to municipal corruption and made intersections more dangerous.
971.
▲
by
duped
2y ago
> I gave a look at other open source projects but I couldn't find any simplified one Because there is no simple approach to this. > Are there any documentation or open source projects to have look at? Qt and JUCE are very mature
972.
▲
by
duped
2y ago
One reason calculus is a good prerequisite for CS is that it's typically where you introduced to the concepts of limits and are taught how to look at a formula and see how it behaves at extrema and critical points, if you're good
973.
▲
by
duped
2y ago
I think you're making broad statements about macroeconomics without thinking too hard about it. If you're spending $X in rent and have $Y in cash, whether or not it's better for you personally to put that money into equities,
974.
▲
by
duped
2y ago
The actual number of residential properties owned by hedge funds is a pittance compared to the number owned by individuals and small time land lords. So I have a hard time seeing how they're pushing smaller competitors out of the busin
975.
▲
by
duped
2y ago
To be fair, the income isn't "free" and the margins are basically zero for small-time property owners on the rent itself. The bulk of the income comes from appreciation in value of the real estate, and when you sell you owe c
976.
▲
by
duped
2y ago
That's a very different situation than the one you initially replied to. It's also not something everyone can do.
977.
▲
by
duped
2y ago
The problem is they can't give the owner an adequate price when they're paying for the owner to grow more equity in the property while also needing to save at a faster rate to afford a downpayment on a mortgage.
978.
▲
by
duped
2y ago
Housing prices are publicly available information, rents should be too.
979.
▲
by
duped
2y ago
I think you're missing that in order for your employee to do that work they would have to access public information, which is also available to renters. If on the other hand, you got an employee to call up landlords and get the rental
980.
▲
by
duped
2y ago
Tor was invented within the US military and was sponsored by the state department.
981.
▲
by
duped
2y ago
That is not true for pipes.
982.
▲
by
duped
2y ago
It doesn't that's why no one does it. But for pipes what it means is that if whoever is reading or writing the pipe expects non blocking semantics, the other end needs to agree. And if they don't you'll eventually get an
983.
▲
by
duped
2y ago
To be a sociopath for a second: Up-front pricing is only good for the buyer and never good for the seller. And while being an advocate for the user is a good thing in general, it's not a good thing if the result is less revenue. And if
984.
▲
by
duped
2y ago
Because there's two decades of revenue between that happening and today. It's far more likely that Uber buys Waymo than Waymo replacing Uber.
985.
▲
by
duped
2y ago
Waymo has zero presence in the vast majority of the United States and nowhere internationally. Meanwhile, "uber" is a verb and noun like Kleenex. And even if in ten years Waymo displaces Uber for transit, Uber will be dominant in
986.
▲
by
duped
2y ago
I agree with this but with a much more nuanced take: avoid pipes if either reader or writer expects to do async i/o and you don't own both the reader and writer. In fact if you ever set O_NONBLOCK on a pipe you need to be damn sur
987.
▲
by
duped
2y ago
Not necessarily, in fact one of the most important optimizations for compilers is inlining code (copy-pasting function bodies into call sites) which results in more code being generated (more space) but faster wallclock times (more speed).
988.
▲
by
duped
2y ago
This is what the `AsRef` trait is great for impl AsRef<str> for MyCoolString { fn as_ref(&self) -> &str { ... } } To be totally defensive, other library authors can write their APIs
989.
▲
by
duped
2y ago
The value prop isn't serde_json, it's automatically generated serializers and deserializers for structured data without needing an extra codegen step like with protobufs/capnproto, plus all that machinery decoupled from the a
990.
▲
by
duped
2y ago
Most of your target folder isn't debug info, but stale build artifacts because Cargo doesn't do any garbage collection.
More ›