Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
shawxe
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
shawxe
6y ago
In general, I agree with a lot of what you're saying here about eating more vegetables and way less sugar being the way to go health-wise, but I do want to respond to some specific things you've said. > You can find really good
32.
▲
by
shawxe
6y ago
I think this is a very good and very underrated point. I'd like to see some evidence why there's any reason to assume repetitive movement with less stretching is somehow less harmful than repetitive movement with more stretching
33.
▲
Sleepify
(en.wikipedia.org)
2 points
by
shawxe
6y ago
|
0 comments
34.
▲
by
shawxe
6y ago
Obviously anecdotal, but in my personal experience this is pretty close to the truth.
35.
▲
Ptolemy's World Map
(en.wikipedia.org)
3 points
by
shawxe
6y ago
|
0 comments
36.
▲
by
shawxe
6y ago
> Another solution, more along the lines of what I was thinking, is simply to associate the hash table with a hashing function which processes the type as a structure, hashing the members individually rather than as a pad of memory. This
37.
▲
by
shawxe
6y ago
Thanks for letting me know, should be better now! :-)
38.
▲
by
shawxe
6y ago
First of all, there is no way the compiler is going to optimize a call to memset(&foo, 0, sizeof(foo)) when &foo is being interpreted as a void pointer. That doesn't even make sense. Second of all, in a generic C interface key
39.
▲
by
shawxe
6y ago
sizeof(struct foo) is required to return the actual size, including padding, so struct foo foo_inst; memset(&foo_inst, 0, sizeof(foo_inst)); will certainly result in all padding bytes being set to zero.
40.
▲
by
shawxe
6y ago
To be clear, there are obviously different/better ways to handle this in C++. We're talking about K&R C here.
41.
▲
by
shawxe
6y ago
Yeah, it's called memset. Not sure if this bug is supposed to be subtle or something, but if you require the padding bytes to be consistent then you need to consistently initialize your structs. Ignoring UB often leads to these sorts
42.
▲
by
shawxe
6y ago
DuckDuckGo itself supports this. Just start a query with !g to have it routed to Google. For example, "!g search on Google" would bring you to the Google search results page for "search on Google." DuckDuckGo supports
43.
▲
by
shawxe
7y ago
This is fine, but it somewhat defeats the purpose of the opaquely prefixed header. I think the idea is just to be able to treat an SDS like a normal string. Unfortunately, there's no way to have that property not be commutative in C.
44.
▲
by
shawxe
7y ago
Seconded. The current title is misleading and not fact based.
45.
▲
by
shawxe
7y ago
That's what strlcpy() is for.
46.
▲
An overview of build systems (mostly for C++ projects)
(medium.com)
4 points
by
shawxe
7y ago
|
0 comments
47.
▲
by
shawxe
7y ago
Yeah, not a lawyer outside of my armchair, but I don't really see how they could ever be convicted of any of this. It sounds like there's a very good chance they were contracted by a legitimate security auditing firm to do a job
48.
▲
by
shawxe
7y ago
Unfortunately, I think this type of thing actually is the case for many organizations. Trying to explain the business case for paying off technical debt to a non-technical person can be very difficult when "right now everything works.
49.
▲
by
shawxe
7y ago
Honestly, these doors are terrible. I just moved out of an apartment building where they were for some reason required and everything from carrying in furniture to carrying in groceries. I know this is extremely tangential, but if anyone
50.
▲
Hard Problem of Consciousness
(en.wikipedia.org)
4 points
by
shawxe
7y ago
|
0 comments
51.
▲
by
shawxe
7y ago
But isn't that exactly what he's doing by inventing these signs--creating shorter names so that it isn't necessary to finger spell everything out explicitly?
52.
▲
by
shawxe
7y ago
Am I the only person who actually finds Esc easier than C-[ or Caps Lock? Maybe it's just heavy muscle memory at this point, but I've been using Esc for years and every time I try to use anything else it just feels clunky.
53.
▲
by
shawxe
7y ago
> 1. They will be exposed to Qwerty on devices where touch-typing is meaningless, such as smartphones and tablets. I'm not sure having a keyboard layout completely interalized is ever really meaningless. For example, I typed this e
54.
▲
by
shawxe
7y ago
Why not just use int main(void)?
55.
▲
by
shawxe
7y ago
The book "Stat-Spotting: A Field Guide to Identifying Dubious Data" by Joel Best goes into a lot of this kind of stuff. Some of the examples here (and in that book) seem so obvious once you hear/see them from the right angle
56.
▲
by
shawxe
7y ago
Am I the only one who is made extremely uncomfortable by the bizarre diagonal margins on the linked page?
57.
▲
by
shawxe
8y ago
I'd like to see such a comparison too. I've been considering switching to YouCompleteMe from ctags/cscope, but this looks like it might be even nicer, especially since a number of my teammates already use Intellisense with o
58.
▲
by
shawxe
8y ago
When I'm forced to use Windows (which is pretty much just at work), I run an X server through Cygwin then use URxvt with GNU screen. I haven't found a Windows console application that doesn't play nicely with this when run t
59.
▲
by
shawxe
8y ago
WSL filesystem performance is garbage, for one thing. Chances are good that if you're using Windows but you want to be using a Unix OS, it's your work that's forcing you to use Windows. And, if that's the case, chances
60.
▲
Cowboy Philosopher: A Tale of Obsession, Scams, and Family
(npr.org)
1 points
by
shawxe
8y ago
|
0 comments
More ›