Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ninkendo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
451.
▲
by
ninkendo
1y ago
Wow, it’s funny because the last time I ran gkrellm was 23 years ago when I first started using Linux and I thought I was a l33t h4x0r… And just today, now that I actually write code for a living and use Linux on my work machine, I found my
452.
▲
by
ninkendo
1y ago
Mapping a Vec<T> to Result<U, E> and collecting them into a single Result<Vec<U>, E> made me feel like a ninja when I first learned it was supported. I’m a little worried it’s too confusing to read for others, but it
453.
▲
by
ninkendo
1y ago
> Remind me again how move, copy and clone works in C++ /s Sarcasm, but it’s worth outlining… C++ “move semantics” are (1) precisely the opposite of rust, and (2) not move semantics at all. - Rust doesn’t let you override what happe
454.
▲
by
ninkendo
1y ago
My 2¢, it’s perfectly reasonable to bring up other languages in defense of criticism, because it explains why these decisions were made in the first place. GP literally said that rust isn’t a good fit for you if you’re in a position to use
455.
▲
by
ninkendo
1y ago
It’s important that a for loop takes ownership of the vec, because it’s the only way you can call things inside the loop body that require the element itself to be moved. If you don’t want the loop to take ownership of the vec, there’s lite
456.
▲
by
ninkendo
1y ago
Completely unrelated tangent: Jesus Christ Reddit is such a cesspit. Tried tapping that link on mobile, got a screen to view the corresponding post. Tapped it, and I got taken to the App Store. No thanks, force quit the App Store and go bac
457.
▲
by
ninkendo
1y ago
The article you posted describes a patient using ChatGPT to get a second opinion from what their doctor told them, not the doctor themself using ChatGPT. The article could just as easily be about “Delayed diagnosis of a transient ischemic
458.
▲
by
ninkendo
1y ago
I was responding to your second paragraph, where you talk about modern programs having to request memory from the OS with malloc and free. This isn’t true, malloc and free are not operating system concepts, they are ways for your program to
459.
▲
by
ninkendo
1y ago
Malloc and free aren’t handled by the operating system, they’re handled in user space. Underneath malloc is mmap(2) (or in older unices, setbrk), which actually requests the memory. And with delayed/lazy allocation in the OS, you can j
460.
▲
by
ninkendo
1y ago
Was this in the article somewhere? I searched and didn’t see it (and I’m most interested in why she left, and haven’t found anything on it.)
461.
▲
by
ninkendo
1y ago
Bah, you’re right! I got it backwards, it’s zsh that has rehash, bash does not. And hash -r works in both. I guess I’ve been using zsh longer than I thought, because I learned about rehash first, then made the switch to hash -r later. I sta
462.
▲
by
ninkendo
1y ago
I think bash has an alias “rehash” that does the same as hash -r too. But zsh doesn’t have it, so “hash -r” has entered my muscle memory, as it works in both shells. Edit: wrong shell, zsh has rehash, bash does not.
463.
▲
by
ninkendo
1y ago
> I wish more languages would lean into having a really permissive compiler that emits a lot of warnings. I have CI so I'm never going to actually merge anything that makes warnings. But when testing, just let me do whatever I want!
464.
▲
by
ninkendo
2y ago
Ugh, too late to edit but I’m way off. It’s just scheduling variability, if a task gets more CPU time, it plots more of them near each other, and if it gets less, they’re farther apart. (I had originally thought the code used the duration s
465.
▲
by
ninkendo
2y ago
It's more likely to be the unaccuracy of Instant in rust. It's guaranteed to be non-decreasing, but not steady: https://doc.rust-lang.org/std/time/struct.Instant.html > In other words, each tick of th
466.
▲
by
ninkendo
2y ago
Your comment made me breathe a sigh of relief, because my kids are rapidly approaching “I need to communicate with their friends’ parents” age, and I don’t think I have it in me to sign up for WhatsApp. I’m in the US and I’m ok just texting
467.
▲
by
ninkendo
2y ago
Writing one correctly is pretty complicated task if you’re trying to write a simple tutorial… off the top of my head, you’d need: ( ( 25[0-5] # 250-255 | 2[0-4][0-9] # 200-249 | 1[0-9]{2} # 100-199
468.
▲
by
ninkendo
2y ago
I seem to remember a thing china did 10 years back where they injected JavaScript into every web request that went through their Great Firewall to target GitHub… I think it’s known as the “Great Cannon” because they can basically make every
469.
▲
by
ninkendo
2y ago
It sucks that GP’s comment is flagged dead… it’s an opinion a lot of people seem to disagree with but IMO it’s not against the site’s guidelines or anything. It could be an interesting conversation if folks are willing to debate in a curiou
470.
▲
by
ninkendo
2y ago
Can you put a custom OS on it, wiping their software? I have a network rack in my basement (so, shallow depth, can’t fit a “full” depth server) and I’m looking for a dumb box of hard drives with otherwise simple/supported-by-linux hard
471.
▲
by
ninkendo
2y ago
Star Wars takes place entirely within one galaxy, and the number of supernova per galaxy is something like 1 per century, so, nah, Han was just bullshitting to stall for time while his busted-ass computer cobbled together numbers.
472.
▲
by
ninkendo
2y ago
Same. It’s a pattern I’m reaching for a lot, whenever I have multiple logical things that need to run concurrently. Generally: - A struct that represents the mutable state I’m wrapping - A start(self) method which moves self to a tokio task
473.
▲
by
ninkendo
2y ago
A tiny amount of pressure applied to the “tail” of it shatters the whole thing instantly, that’s one of the coolest things about it.
474.
▲
by
ninkendo
2y ago
I had assumed those would be stickers that you can take off… if it’s etched onto the device it would indeed be bad design IMO.
475.
▲
by
ninkendo
2y ago
I haven’t cried from laughing like this in a good while, thanks!
476.
▲
by
ninkendo
2y ago
FWIW I have no problems (and see no ads) on the site running a pihole dns-based blocker on my network. In-browser blockers are interesting because they’re actually modifying the DOM, and any JavaScript which expects the DOM to have certain
477.
▲
by
ninkendo
2y ago
> The ad revenue is in the billions and is steadily increasing each year. I would bet that the costs are more than covered. You're changing the context of the discussion here. snailmailman had said: > Youtube so badly wants me to
478.
▲
by
ninkendo
2y ago
> There's no way that the broader Republican constituency is going to ignore this fact, regardless of Trump. There’s no such thing as the broader Republican Party. It’s just Trump now. It’s like when a CEO packs a board with his fri
479.
▲
by
ninkendo
2y ago
If you make a device which uses GPL’d code, and provide all the covered source code you used, but prevent users from putting any modified code on the device, you are in violation of GPLv3, but not GPLv2. That means this sentence: > I cou
480.
▲
by
ninkendo
2y ago
If they shipped a gpl3 version of bash on iOS , they would be in violation. This isn’t really a question: gpl3 requires you to not only provide the source if you use it in a product, but the ability to modify it and run your modified versi
More ›