Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ww520
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
241.
▲
by
ww520
2y ago
Stopping as a result of the process exiting or requested the service to stop are two very different things. Systemd overloads the term ExecStop for different semantics, relying on different property settings. That's where the confusi
242.
▲
by
ww520
2y ago
Yes. ExecStart works the same for all the cases. ExecStop works differently though. While ExecStart is the event to kick off the command for the service, ExecStop is not. The asymmetric semantics are where the confusion comes from.
243.
▲
by
ww520
2y ago
Then ExecStop is basically on-cleanup, not to-stop. ExecStart really is to-start, not on-start. In the httpd server case, ExecStart runs the httpd command.
244.
▲
by
ww520
2y ago
> the command that's executed to stop the service That’s what is assumed. But in reality it runs after the started process stops.
245.
▲
by
ww520
2y ago
Having different semantics with different proprieties on the same command is really confusing.
246.
▲
by
ww520
2y ago
Still has the same problem even with type=forking. Only way to get it working was RemainAfterExit=yes
247.
▲
by
ww520
2y ago
Looks nice. One thing I found systemd really confusing was its treatment of ExecStop in a service script. ExecStart is the command to run when systemd starts the service at system boot up (or when a user tells systemd to start the service)
248.
▲
by
ww520
2y ago
This looks nice. A watch mechanism built in to continuously monitor file changes and kick off the make/run process would be fantastic.
249.
▲
by
ww520
2y ago
This is a fantastic idea. AST works well in an array based allocation block since it has no need for freeing individual nodes. It’s an add-only allocation.
250.
▲
by
ww520
2y ago
They are in the lower orbits. They will fall off the orbits in couple years and burn up.
251.
▲
by
ww520
2y ago
It's a terrible idea to join the EU. You cede your control on economic policies to some central bureaucrats in Europe while holding the bags to pay for all the local societal infrastructure and welfare. You won't have enough polit
252.
▲
by
ww520
2y ago
For Google Authenticator, you can do an export for device migration. Once it shows the QR code image, snap it and then abort the migration. Back up the QR code for later restoration.
253.
▲
by
ww520
2y ago
One of the risks of 2FA is losing access to your accounts after losing the authenticating device. Backing up the 2FA seeds mitigates that risk. The backup needs to be encrypted with the password remembered and stored somewhere. Sounds like
254.
▲
by
ww520
2y ago
While it’s regrettable you had someone you trusted betrayed you, the lesson is more of never share your password manager with others.
255.
▲
by
ww520
2y ago
Haha. This is a great list. I have heard variants of these ideas over the years.
256.
▲
by
ww520
2y ago
Ahh ok. The above link used whatever the latest trunk of the zig compiler to generate code. Looks like the current trunk has regressed just now and produces more instructions. The link below uses the previous stable version and produces few
257.
▲
by
ww520
2y ago
It's important to use the correct names for things. Using the boolean lingo AND/OR/XOR to describe distance function operations just creates confusion. For example in this case, getting the distance to whichever closer surfac
258.
▲
by
ww520
2y ago
I believe the "boolean" operations is really set operations - union, intersection, subtraction, etc.
259.
▲
by
ww520
2y ago
Slightly optimized code to get down to 32 asm instructions. https://godbolt.org/z/ccE3r1bjc
260.
▲
by
ww520
2y ago
I know the post only uses SIMD as an attempt to do bitmask lookup for each byte, but a good alternative use of SIMD is for parallel data processing, i.e. operating on more than one character. Being able to identify a range of characters ma
261.
▲
by
ww520
2y ago
I use partial autocomplete. Emacs has the universal autocomplete that's not language specific but gets it right often. I do use LSP on languages that have support. For languages that don't have good LSP support, just search. E
262.
▲
by
ww520
2y ago
> Yes, and the input includes state. ... state is an input. This is the same argument that the member variables of an OO object are additional input to its member method and the method is "pure." > how a component function&#
263.
▲
by
ww520
2y ago
Thank you for the thoughtful replies. It helps a lot in understanding the kinds of problems React was facing. With all due respect, > For this reason, you really are writing a pure function with respect to props and state. A pure functio
264.
▲
by
ww520
2y ago
I’m curious to see a plus and minus comparison of web component vs other techs (I assume those are React, Vue, etc.)
265.
▲
by
ww520
2y ago
> Correct, but you as the component writer don't care. From your perspective, you are writing a purely functional component because you have no control over the injected state. So your function is "pure" with respect to th
266.
▲
by
ww520
2y ago
I’m adopting an Example Driven Development approach in my latest project. The project is a library/framework with a public interface. EDD is great in this case. To explore and experiment new features, I turn the use cases into runnable
267.
▲
by
ww520
2y ago
I'm glad someone who's expert in React can answer these questions. I got several thoughts. First of all, I don't believe React component is pure functional with the state hooks embedded inside the component with side effects
268.
▲
by
ww520
2y ago
Thanks for the detail explanation. That's what I understand how React works. Another thing I found un-intuitive with React is the state of multiple instances of the same component. The useState() hook basically references some global
269.
▲
by
ww520
2y ago
Thanks for the clarification. I'm trying to understand the rationals behind React's design decision. Why state changes within the same render cycle would lead to all sorts of bugs? And why is it not a problem with other framewo
270.
▲
by
ww520
2y ago
Will bar become 20 eventually? In the next cycle perhaps? So there will be 3 cycles? 1: foo = 1, next(foo = 10) bar = undef, next(bar = 2) 2: foo = 10 bar = 2, next(bar = 20) 3: foo = 10 bar = 20 Does the abo
More ›