Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
efaref
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
151.
▲
by
efaref
10y ago
Yes, I think it was designed in particular for determining addresses of fields within structures and variables on the stack, for example if you had: struct foo { int field1; int field2[10]; } Then an access li
152.
▲
by
efaref
10y ago
LEA (load effective address) can perform computations of the form BASE + SCALE * INDEX + OFFSET, where scale can be 1, 2, 4 or 8. This allows optimisation of multiplications and additions into a single instruction, and the compiler takes a
153.
▲
by
efaref
10y ago
NB (or n.b.) is "nota bene": https://en.wikipedia.org/wiki/Nota_bene
154.
▲
by
efaref
10y ago
> If you read "ect.", your brain automatically corrects it to "etc." because you're used to seeing it often. It's probably subconscious, right? Not at all. Seeing errors like "ect", use of the wro
155.
▲
by
efaref
10y ago
Presumably native latin speakers will feel right at home. :-)
156.
▲
by
efaref
10y ago
It seems that a lot of style guides these days actually recommend "eg" and "ie" over the versions with dots in a misguided attempt at simplification. I guess with those guides out there, the damage is already done. Pers
157.
▲
by
efaref
10y ago
No, the correct form is "e.g." and "i.e.", and screen readers cope with those fine. People also get "etc." wrong a lot, writing it as "ect", which presumably screen readers would fail at, too. Since
158.
▲
by
efaref
10y ago
Surely "Open the BankCo app on your phone and enter the code" is just as simple. For banks, for example, I already have a banking app on my phone (which was originally authenticated via, ahem, SMS), so they could very easily put t
159.
▲
by
efaref
10y ago
How about "JS was a terrible mistake that can do everything"?
160.
▲
by
efaref
10y ago
The compiler has heuristics for unrolling, and ought to do it automatically when appropriate. Sometimes unrolling hurts performance, as you make the code larger and therefore reduce i-cache performance.
161.
▲
by
efaref
10y ago
Tabs make no sense to me as they're clearly control codes. I maintain that if tabs are permitted, so are other ASCII control codes, like vertical tab, form feed (which is actually used in GNU code), and bell. int foo(void) {
162.
▲
by
efaref
10y ago
I'm surprised he doesn't live in fear of one of his ex-convicts getting out and going full Dexter on him. Perhaps he really believes his made-up lies.
163.
▲
by
efaref
10y ago
I desire a time machine. Checkmate.
164.
▲
by
efaref
10y ago
I don't think they're intentionally gamed, it's just part of human nature. If you don't have to defend your assertions (because more assertions is presumed better, as per the rules), then people are liable to err on the
165.
▲
by
efaref
10y ago
Bill Clinton turned off the deliberate errors back in 2000: http://www.nytimes.com/2000/06/15/technology/pentagon-lets-c... The errors you see in your mobile phone's positioning are due to signal pr
166.
▲
by
efaref
10y ago
I thought the purpose of Ingress was to crowdsource location data and photographs of points of interest for Google Maps.
167.
▲
by
efaref
10y ago
Well, forced-coffee-serving and forced-car-fixing also has a name: slavery. That's pretty traumatic, too.
168.
▲
by
efaref
10y ago
C/C++ also have & and | in the wrong place, mostly thanks to their heritage as being overloaded for && and ||). I've personally seen several (flags & MASK != VALUE) bugs make it to the field. Sometimes it's w
169.
▲
by
efaref
10y ago
I hero-worship Knuth as much as anyone, but that document is frankly terrible. Take a look at section 6. There's a flowery sentence that says no more than "Add word to vocabulary" (completely pointless if this were a method
170.
▲
by
efaref
10y ago
His comment sums up exactly my thoughts wrt literate programming. It sounds like a nice idea, but in practice it falls far short. The worst program I've ever had to maintain was written in funnelweb. It was a large, complicated progr
171.
▲
by
efaref
10y ago
This is a good example of a pointless "optimization" making the code harder to read. If he had indeed meant that, he should have written x = ~x + 1; GCC, even with optimisation turned off, will turn that into a negl instr
172.
▲
by
efaref
10y ago
It sounds like the trailer didn't have underrun guards, which I think are mandatory in Europe, but presumably not in the US. http://www.transportsfriend.org/road/guards.html I expect those would have helped in thi
173.
▲
by
efaref
10y ago
In the UK we introduced the A* grade as a "solution" to this problem; first at GCSE level (end of compulsory high school, age 15-16) and then at A level (pre-university, age 17-18). Even that just postpones the problem, as grade i
174.
▲
by
efaref
10y ago
The European Union does not have a trade deal with Japan ( https://en.wikipedia.org/wiki/European_Union_free_trade_agre... ).
175.
▲
by
efaref
10y ago
But some survived. How many survived with zero food?
176.
▲
by
efaref
10y ago
The only case it becomes problematic is if you delete a header file, as make won't know how to remake it and won't recompile the C file (removing the dependency) until it has done so. There are two options to resolve this: Also s
177.
▲
by
efaref
10y ago
I think these days you're better off using -MMD to generate header dependencies at the same time as compiling, rather than doing it in a separate rule. %.o: %.c $(CC) $(CFLAGS) -MMD -c $< -include $(OBJECTS:.o=
178.
▲
by
efaref
10y ago
> Despite being an obvious usability hole, this has never been fixed. You can now change the prefix for your recipes by setting the .RECIPEPREFIX special variable ( https://www.gnu.org/software/make/manual/h
179.
▲
by
efaref
10y ago
The refusal of so many people in this industry to learn a pretty simple and incredibly fundamental tool frustrates me no end. I guess this article could be worse: the number of times I see people reimplement poorly thought out clones of mak
180.
▲
by
efaref
10y ago
I'm searching mostly C code. I'm in the src directory, so there's nothing there except the source code.
More ›