Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cpuguy83
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
301.
▲
by
cpuguy83
4y ago
This is the point of lifetimes. Everything has a lifetime whether or not it is annotated. Sometimes the compiler doesn't know what the lifetime of an object is, particularly in relation to other objects. If you can scope something to m
302.
▲
by
cpuguy83
4y ago
I didn't say it was useless, only that its use is highly limited to a very specific case, namely "do a bunch of things at the same time and block until completion".
303.
▲
by
cpuguy83
4y ago
And all it really does is force a thread.join when "scope" goes out of scope. Maybe just me but seems only marginally useful.
304.
▲
by
cpuguy83
4y ago
Thanks for the detailed response!
305.
▲
by
cpuguy83
4y ago
Thanks for the clarification!
306.
▲
by
cpuguy83
4y ago
Even the title says "No magnets"
307.
▲
by
cpuguy83
4y ago
How does it fall apart for non-blocking I/O? Also splice supports offsets (to me your comment implied it doesn't).
308.
▲
by
cpuguy83
4y ago
Thanks, I was just using the parent's vocabulary to make my point.
309.
▲
by
cpuguy83
4y ago
Thanks for this. It helps a lot to know other people experience this kind of stealth anxiety you don't even realize is there.
310.
▲
by
cpuguy83
4y ago
> I only found "complete on/complete off" one Docker has a `DOCKER-USER` chain where the user can inject their own rules before docker's rules are run. But even then, the user flat out should not be using `-p` unless
311.
▲
by
cpuguy83
4y ago
Listening on a port and opening a port are different things. `-p` is for opening ports. Docker is not listening on behalf of the application. It is routing traffic to the application.
312.
▲
by
cpuguy83
4y ago
Docker is not implicitly doing anything. The user requested for the port to get published and so docker published it. As nice as it would be for Docker to be more configurable in terms of where rules get inserted, that would not have helped
313.
▲
by
cpuguy83
4y ago
To be clear, Docker inserted an allow rule because the user asked it to. Docker is relatively easy to set up without needing to use port forwarding to allow communication. Docker's networking model is explicitly designed to prevent the
314.
▲
by
cpuguy83
4y ago
This is most likely an unrecognized error and as such the assumption is something went wrong on the system rather than the user request.
315.
▲
by
cpuguy83
4y ago
You need to be able to in-tune the device if you want to access company resources. Windows is definitely the happy path since support is pretty much baked into the OS. However there is support for both Mac and Linux.
316.
▲
by
cpuguy83
4y ago
I mean... it's a pretty hard sell to say "Hey boss person, can we use our competitor's software to discuss company business?" My team also used Slack when I joined and were eventually required to move to Teams. We aren&#
317.
▲
by
cpuguy83
4y ago
I think it's a dig at how resource hungry Teams is.
318.
▲
by
cpuguy83
4y ago
Microsoft employee here. I was actually handed a MacBook Pro on day 1, I didn't even ask for it my manager at the time just assumed. There is a large community inside Microsoft using Linux as their daily driver.
319.
▲
by
cpuguy83
4y ago
I mean the generic type def there could be changed such that different Cmd's can have different flag implementations. The main point is that generics come in handy when building libraries so that you aren't forcing callers of your
320.
▲
by
cpuguy83
4y ago
That totally changes it as it requires type assertions to use. With generics `Flags()` returns a concrete type and not an interface.
321.
▲
by
cpuguy83
4y ago
Tacking on generics on a working code base is difficult. I effectively used it in this little experimental CLI library: https://github.com/cpuguy83/go-cli/blob/main/command.go It's pretty simple, bu
322.
▲
by
cpuguy83
4y ago
Can you point to one that had the opposite effect?
323.
▲
by
cpuguy83
4y ago
You can! It's experimental but https://github.com/docker/buildx/pull/1168 Tracking for this: https://github.com/docker/buildx/issues/1104
324.
▲
by
cpuguy83
4y ago
Linux has lots of protective measures outside of just user isolation. There's capabilities, namespaces, cgroups, seccomp, landlock, selinux, apparmor. The difference is Linux gives the owner of the machine (for better or worse) decide
325.
▲
by
cpuguy83
4y ago
I doubt the chassis is adding that much weight. MacBooks are largely battery. The MacBook Air is also significantly lighter than a pro despite having the same basic chassis.
326.
▲
by
cpuguy83
4y ago
It's possible docker4mac doesn't enable nested virt?
327.
▲
by
cpuguy83
4y ago
I ran into too many problems with pihole breaking sites so I just turned it off.
328.
▲
by
cpuguy83
4y ago
The way this works is it uses a containerd shim. In containerd-land, shims are responsible for all the platform dependent setup/management of a container. The "normal" shim on Linux is the runc shim (io.containerd.runc.v2). O
329.
▲
by
cpuguy83
4y ago
On modern kernels you can do some really interesting things like "pidfd_open" and "pidfd_getfd" to get a duplicate file descriptor from the process referred to by the pidfd.
330.
▲
by
cpuguy83
4y ago
Yeah, 2000 was not a consumer OS.
More ›