Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
qb45
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
66 ms
·
601.
▲
by
qb45
10y ago
> my family back east in Iowa does get a ton of federal money for farming, which was what inevitably ended up destroying farming in Mexico And this is why liberal- and capitalistic-minded farmers despise EU subsidies. You have to take th
602.
▲
by
qb45
10y ago
This is what you get for living in place where people built it, not for your race.
603.
▲
by
qb45
10y ago
> I think if it actually came to that, it would eventually mean war. The interior economy falls apart, coastal regions secede, the poor countries would inevitably be driven to war against the coastal regions out of desperation. Extreme n
604.
▲
by
qb45
10y ago
http://www.survivingclinton.com/ Parked. Talk about bias :(
605.
▲
by
qb45
10y ago
> Most people assume that a byte is 8-bits which isn't true. It is worth remembering that POSIX (and Windows probably too) mandate 8bit chars so there is no point being defensive about it on these particular platforms. And I kid you
606.
▲
by
qb45
10y ago
Functionally it seems equivalent, except that it doesn't work on big endian machines (assuming the ints are in native endian). On dumb compilers it may be faster if a few bitops happen to be faster than a call to memcpy. Which sounds p
607.
▲
by
qb45
10y ago
Case in point: a simple example of code which copies 1MB of data with SSE and slows down on misalignment: https://news.ycombinator.com/item?id=12718625 Presumably due to the hairball of cache implications, as you put it. Bu
608.
▲
by
qb45
10y ago
You are writing convoluted code and hoping that your compiler will figure it out and convert it internally to the form I posted. Sometimes it does, sometimes it doesn't. In this case it generates reasonable code but doesn't vector
609.
▲
by
qb45
10y ago
Nitpick: memcpy is string.h not stdlib.h, the type was uint32_t not uint64_t and you are making some unwarranted assumptions about sizeof(uint64_t), not to mention that the existence of this type is merely implementation defined ;) Deal bre
610.
▲
by
qb45
10y ago
Interesting, but is this a real world problem or just a standard nobody follows? I'm under impression that lots of networking and storage code running in the wild casts back and forth between char arrays and other types without giving
611.
▲
by
qb45
10y ago
This title is stupid indeed. My first thought was "sounds like some commercial HOWTO-vertisement".
612.
▲
by
qb45
10y ago
movdqu , obviously. And the code is shorter now, I guess it drops this part responsible for processing the first 1~3 elements of the array to reach 16B alignment.
613.
▲
by
qb45
10y ago
Yeah, you're right. Add packed then if you want but I swear the code I posted works on 5.4 as it is.
614.
▲
by
qb45
10y ago
Must have been supported for a while because this stuff is even used in Linux: #define __packed2__ __attribute__((packed, aligned(2))) /* * SystemV FS comes in two variants: * sysv2: System V Release 2 (e.g. Micropor
615.
▲
by
qb45
10y ago
I wouldn't have posted this without checking. And as far as documentation goes, they say this attribute applies to "types" and the example they give is struct S { short f[3]; } __attribute__ ((aligned (8)));
616.
▲
by
qb45
10y ago
If certain compilers provide functionality like __aligned__ or __packed__ it isn't undefined anymore on these particular compilers. I was specific about this being a GCC/clang thing (GCC to be exact, but somebody else confirmed cl
617.
▲
by
qb45
10y ago
I think it doesn't work in this case because If the strictest (largest) alignas on a declaration is weaker than the alignment it would have without any alignas specifiers (that is, weaker than its natural alignment or weaker than alig
618.
▲
by
qb45
10y ago
The correct solution for GCC is specifying 1-byte alignment for this particular array: #include <stdlib.h> #include <stdint.h> typedef uint32_t __attribute__((__aligned__(1))) uint32_t_unaligned; uint64_t sum (const
619.
▲
by
qb45
10y ago
> We need permanent daylight savings time. Yesterday sunset was around 6pm in LA. Today it will be at 5pm. At least I had a little bit of daylight after work, now it's just depressing. I would like to decouple waking up earlier and
620.
▲
by
qb45
10y ago
Sounds like state-of-the-art pre-adblock technology. Browsing with no-JS/JS browsers indeed is laborious nowadays. I use this approach out of habit on my desktop machine, but on my new laptop I just couldn't bring myself to copy t
621.
▲
by
qb45
10y ago
Or you just don't have to be so totalitarian to attempt solving every problem of everyone.
622.
▲
by
qb45
10y ago
Enlargement ads would fit rather well ;)
623.
▲
by
qb45
10y ago
It's not that simple, plants can pull all kinds of crap from the ground too. https://www.ncbi.nlm.nih.gov/pubmed/25254600 The next link is the first source for the Wikipedia paragraph I originally quoted. They say
624.
▲
by
qb45
10y ago
Most mining products are very much inorganic , oil being a notable exception ;)
625.
▲
by
qb45
10y ago
That's an interesting question because it's the first time I hear about radium in artificial fertilizers. Will need to dig into these Wikipedia sources. That tobacco contains lead and polonium had been known for decades, but I use
626.
▲
by
qb45
10y ago
Trivia: Polonium-210 in tobacco contributes to many of the cases of lung cancer worldwide. Most of this polonium is derived from lead-210 deposited on tobacco leaves from the atmosphere; the lead-210 is a product of radon-222 gas, much of
627.
▲
by
qb45
10y ago
The ones that differentiated us from cabbage. At least positive for us, not sure if for cabbage ;) Though if you count only DNA changes in smokers' lungs, probably none. Or we would have found some superhuman abilities in smokers by no
628.
▲
by
qb45
10y ago
As long as Flash DRM doesn't use TPM/smartcards/etc it's a cat and mouse game - it's theoretically possible to reverse engineer Flash software and write new implementation, but then it's likely that Adobe would
629.
▲
by
qb45
10y ago
I think it might possibly be sarcams ;)
630.
▲
by
qb45
10y ago
You probably meant Roosh V: Don’t Bang Denmark https://www.dissentmagazine.org/article/cockblocked-by-redis... http://www.rooshv.com/katie-j-m-baker-purposefully-distorted...
More ›