Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
TheNewAndy
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
181.
▲
by
TheNewAndy
16y ago
Gah. Excellent maths by me :)
182.
▲
by
TheNewAndy
16y ago
Note that it says the prisoner will die "within 24 hours". My solution (which looks somewhat correct, so don't read unless you want it spoiled) Day 0: Where all numbers are base 6 (240 in base 6 == 104) d0 = last digit of barrel number (in
183.
▲
by
TheNewAndy
16y ago
Doing it this way will use the optimal amount of memory (in the worst case) (assuming an O(n+m) answer). There are exactly 26 bits of state that need to be tracked (where "bit" is used in the information theoretic sense of the word). If you
184.
▲
by
TheNewAndy
16y ago
Yes, but even in compiler land, you don't say "alphabetic" to mean a symbol taken from your particular alphabet (since that is practically a given... a symbol outside the alphabet might as well not exist).
185.
▲
by
TheNewAndy
16y ago
Without having actually read the paper yet (still downloading). I always feel like these sort of things are nice, but you still want a hierarchy underneath it all. For example, I have a document which I want to put onto a USB stick for a fr
186.
▲
by
TheNewAndy
16y ago
The ambiguity isn't in the name on its own "God is nowhere". It is in the combination of that name, and a bad naming convention. If you had a naming convention which prohibits vowels, then the identifier "shrt" is ambiguous because it could
187.
▲
by
TheNewAndy
16y ago
Just a quick pedantic point - __FOO_H__ is a reserved identifier (C90 reserved). You shouldn't be writing it in your code.
188.
▲
by
TheNewAndy
16y ago
I believe the intention of this name was the parsing ambiguity of the word "nowhere" when you don't have word delimiters, not as an example of an actual name, or a statement about the location of God :)
189.
▲
by
TheNewAndy
16y ago
It makes the distinction between god_is_no_where and god_is_nowhere much clearer than GodIsNowhere and GodIsNowHere. A slightly more subjective one is for things with acronyms in them. Compare: check_url_index, CheckURLIndex and CheckUrlInd
190.
▲
by
TheNewAndy
16y ago
Your header guard is bad (but not horribly so). Identifiers with two underscores at the beginning are reserved in the C90 standard (as are identifiers with one underscore followed by an upper case letter). Your comments are also only valid
191.
▲
by
TheNewAndy
16y ago
Not quite: 5060 is an exception to your rule. As described before, if (even digit sum) - (odd digit sum) is divisible by 11, then the number is divisible by 11.
192.
▲
by
TheNewAndy
16y ago
My knowledge about Java is several years out of date, but I know that Java couldn't detect symbolic links at one stage. For a backup application, this sort of thing is useful. Similarly, think of all the other whacky platform specific file
193.
▲
by
TheNewAndy
16y ago
Yes, that is another classic one. And this one I think will hit people even when they aren't doing embedded stuff. I seem to recall a compiler optimisation which would make the assumption that the shift count would be well defined, and so i
194.
▲
by
TheNewAndy
16y ago
Yes, however to get these, you are now in C99 land, which excludes you from some compilers (the obvious one is the MS compiler). What we do is define our own compiler abstraction which can use stdint.h on C99 compilers, and typedef standard
195.
▲
by
TheNewAndy
16y ago
Yes. But I suppose the thing about embedded stuff is that if you write good "embedded" code (whatever that means), then it works well everywhere. If you write good "desktop" code, then it probably won't work well on an embedded system. So,
196.
▲
by
TheNewAndy
16y ago
Tiny embedded things from people you've never heard of. Often, I won't even get to see the compiler for the platform, I'll just write the code, send it to a completely external person, and say "this should compile and run on your platform,
197.
▲
by
TheNewAndy
16y ago
In my work, I end up writing code that compiles on a lot more platforms than that. These are my thoughts, I suspect I work at a much lower level than the author, so the disagreements I have are likely just because of that: 1) Don't use C++.
198.
▲
by
TheNewAndy
16y ago
One thing I noticed was that when sport is being broadcast in 3d, they will use some completely useless camera angles which have lots of people at different distances. Although I don't watch a lot of sport, I've only noticed this in games w