Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
knorker
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
181.
▲
by
knorker
10mo ago
They could also write the comment in French, and by the same argument people should need to go out of their way to copy-paste that into google translate. Thousands of people are going to read this thing. The writer could spare thousands of
182.
▲
by
knorker
10mo ago
I've worked in software engineering on Internet things for decades and I have not once heard or seen this abbreviated before.
183.
▲
by
knorker
10mo ago
Uh, no. Scott Adams is not a one-mistake person. This is a years-and-years thing. You're really rewriting history, here. I have no problems forgiving people for mistakes, but no this is absolutely not one of those cases.
184.
▲
by
knorker
10mo ago
The fact that you can't return from there makes for a huge difference, though,
185.
▲
by
knorker
10mo ago
Yeah but languages that make you resort to this then don't let you simply return from the block. And the workarounds often make the pattern be a net loss in clarity.
186.
▲
by
knorker
10mo ago
This is too forgiving of intel in this case. It has a name. They just don't use it. "Sockets Supported: FCLGA2011". It's not like this is poorly named. It's not even true.
187.
▲
by
knorker
10mo ago
Well that's kind of my point. `ls` and `find` are "supposed to be" POSIX `ls` and `find`. Obviously on a GNU system one can't just drop the GNU extensions, but what Rust Coreutils is fighting is (IIUC) to a large extent
188.
▲
by
knorker
10mo ago
Seems like there's more uproar with this than with changing the /bin/sh symlink to dash, and that difference seems much bigger.
189.
▲
by
knorker
10mo ago
> expected `uname -p` to work but it just prints `unknown` I just tried that on three very different Linux systems of mine, and all print `unknown`.
190.
▲
by
knorker
10mo ago
Are they bugs, though? Or just ambiguities where they want bug-for-bug compat? Another commenter said "dumb cases where it's 100x slower when providing unrealistic values like parsing e9000000 which is actually because it attempts
191.
▲
by
knorker
10mo ago
For context, how "compatible" is BSD utils with either one? IOW: how much does it matter?
192.
▲
by
knorker
10mo ago
While you are of course 100% correct, in the context of discussing escape analysis I find it odd to say that it's essentially not "real". Like any optimization, it makes sense to talk about what "will" happen, even
193.
▲
by
knorker
10mo ago
Your https://news.ycombinator.com/item?id=46234206 relies on escape analysis though, right? Escape analysis is the reason your `x` is on the heap. Because it escaped. Otherwise it'd be on the stack.[1] Now if by "
194.
▲
by
knorker
10mo ago
Yeah. That's what I said.
195.
▲
by
knorker
10mo ago
People have been arrested for silently praying in their head. And for saying "not my king".
196.
▲
by
knorker
10mo ago
Yes. That's escape analysis. But this is not what OP did. What you wrote is not the same in C and Go, because GC and escape analysis. But 9rx is also correct that what OP wrote is the same in C and Go. So OP almost learned about es
197.
▲
by
knorker
10mo ago
Agreed that it could in principle. But I can't immediately get it to do so: https://go.dev/play/p/9hLHattS8cf Both arrays in this example seem to be on the heap.
198.
▲
by
knorker
10mo ago
Yeah I think what you're describing, returning a slice thus copying a reference to the same array (but not copying the array), then destroying the callee slice not causing the array to be freed, is just basic garbage collection logic,
199.
▲
by
knorker
10mo ago
Are you sure this is what's happening? Looks to me like the slice object is returned by value, and the array was always on the heap. See https://go.dev/play/p/Bez0BgRny7G (the address of the slice object chan
200.
▲
by
knorker
10mo ago
If the flaws were just about missing premium features, that'd be one thing. But it's not. It's petty and abusive. For example, you can't see (I think it was) heart rate if you have a Samsung smart watch, but don't h
201.
▲
by
knorker
10mo ago
Why anybody would buy a Samsung product at this point I don't understand. Every single Samsung product I've had to use is actively user hostile. Like a petty kind of hostile.
202.
▲
by
knorker
11mo ago
Does clipping make the rest eligible for GC? Clipping doesn't seem to automatically move the data, so while it does mean appending will reallocate, it doesn't actually shrink the underlying array, right?
203.
▲
by
knorker
11mo ago
There's also KSM, kernel same-page merging.
204.
▲
by
knorker
11mo ago
Relatedly, if anyone has a copy of Battle Royale before they ruined literally every effects shot with the digital special edition, please make yourself known to a member of staff. It's not even that it aged poorly. The effects they add
205.
▲
by
knorker
11mo ago
You're misapplying it. A language that doesn't let you do safe things, then that's a very different language. In this case, it would be a language that does not allow creating a UdpSocket object by bringing in your own file d
206.
▲
by
knorker
11mo ago
> What I care about is that it's necessary to do this in the first place. I don't think it is. socket2::Socket has send_to() just as much as UdpSocket does. (disclaimer: I only looked up the docs, I didn't try to modify th
207.
▲
by
knorker
11mo ago
Sure, I would strongly recommend against doing something like that. But I would expect it to work in the obvious way, and not be undefined behavior. E.g. if UdpSocket were to dup() internally its fd A into a fd B, and as_fd() returned B, bu
208.
▲
by
knorker
11mo ago
Sure it does. let f = std::fs::File::open("/dev/null").unwrap(); let f: std::os::fd::OwnedFd = f.into(); let socket: std::net::UdpSocket = f.into(); This is really no different. In this example it's
209.
▲
by
knorker
11mo ago
Of course it allows invalid combinations. This also compiles: let f = std::fs::File::open("/dev/null").unwrap(); let f: std::os::fd::OwnedFd = f.into(); let socket: std::net::UdpSocket = f.into(); If you
210.
▲
by
knorker
11mo ago
> dubiously-safe No, it's perfectly safe. Except if you expand the scope of "safe" by a lot. OP turned the socket into an (almost) raw file descriptor, and created an UDP socket from it. Weird, yes, but since it's per
More ›