Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jmgao
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
181.
▲
by
jmgao
11y ago
"An update on X" is a google meme for "X is dead"
182.
▲
by
jmgao
11y ago
Does go even have any good command-line debuggers? All of the things I've seen either involve insanity like preprocessing your source to inject hooks in between each line of code, or don't actually work.
183.
▲
by
jmgao
11y ago
The short string optimization is decades old.
184.
▲
by
jmgao
11y ago
You don't need to control every byte for this to be catastrophic. You can't decode every password like you can with the previous comparison, but if you can generate a rainbow table that contains the password you're trying to
185.
▲
by
jmgao
11y ago
> you get to know when you have a call coming in and not miss it People still get phone calls?
186.
▲
by
jmgao
11y ago
"Patches welcome" is not a particularly compelling response to "it doesn't run on any of the platforms people currently use".
187.
▲
by
jmgao
11y ago
There are several examples of this in the Java world, such as proguard. They're mostly centered around code obfuscation, but they do some useful optimizations as well.
188.
▲
by
jmgao
11y ago
Alternatively, translator, the word that CFront used.
189.
▲
by
jmgao
11y ago
It's actually even better than that. They're only using __int128 to hold the result of a 64 by 64 bit multiplication, and x86_64's mul instruction will give you this for free. gcc is smart enough to generate code that is lite
190.
▲
by
jmgao
11y ago
I got annoyed enough to write a tool to emulate this behavior on OS X: https://github.com/jmgao/metamove
191.
▲
by
jmgao
11y ago
> Also note that SIZE_MAX is an unreasonable input, one would even say it violates preconditions. Annex K adds rsize_t, RSIZE_MAX, and friends, which restrict inputs to reasonable values. Unfortunately, it doesn't retcon the old fun
192.
▲
by
jmgao
11y ago
printf has type checking in every major compiler. You just need to annotate all of your printf-y functions with attributes to tell the compiler "this function does printf, the format string is the nth argument, and the format arguments
193.
▲
by
jmgao
11y ago
Comment 1 is more along the lines of "Is it the key for the TI Nspire? Nope, wrong length"
194.
▲
by
jmgao
11y ago
Presumably that was supposed to be 2^24.
195.
▲
by
jmgao
11y ago
JavaScript is not simple, its features are not well thought out, and it is definitely not being interpreted. The only reason JavaScript performs well here is that multiple megacorporations have devoted tons of resources into fast JavaScript
196.
▲
by
jmgao
11y ago
Ruby is hilarious because importing a library in the standard library (or importing a library that uses it) can break division: https://bugs.ruby-lang.org/issues/2121
197.
▲
by
jmgao
11y ago
Well, there's always the accelerationist option of voting republican and hoping they burn down the government quickly enough for the resulting radical change afterwards to be successful.
198.
▲
by
jmgao
11y ago
> I'm also not sure why you would replace moc with template magic - moc will generally not fail (or will tell you if, say, you forgot to inherit from QObject), whereas template errors are midæval latin on a good day. Liberal usage o
199.
▲
by
jmgao
11y ago
Does go even have a usable debugger yet?
200.
▲
by
jmgao
11y ago
Mirror: https://cloudup.com/cPoinzGZuzz
201.
▲
by
jmgao
12y ago
They pretty much tried that, and it failed miserably.
202.
▲
by
jmgao
12y ago
This is true, javac only replaces individual concatentations with use of a StringBuilder, so foo + bar + baz + "!" is fast, but performing a concatenation in a loop does multiple copies for each iteration. It (or the JIT) could co
203.
▲
by
jmgao
12y ago
That's a thrust to weight ratio above 1 when only one of its 9 engines are firing, and running at minimum throttle to boot.
204.
▲
by
jmgao
12y ago
HTML is not computer science.
205.
▲
by
jmgao
12y ago
One of the best features of all of the epoll/poll/select functions is that they let you listen on arbitrary file descriptors uniformly. You can send events over a unix domain socket or a pipe, and just treat it as if it were a reg
206.
▲
by
jmgao
12y ago
It's a PS4 exclusive, so anyone who doesn't already have the console have to buy it ($400) to be able to have the privilege of buying it. (it was worth it)
207.
▲
by
jmgao
12y ago
A memory safe implementation is only a bit longer: template<typename T> T getValue(std::array<char, sizeof (T)> bytes) { T result = 0; for (char byte : bytes) { result <<= 8;
208.
▲
by
jmgao
12y ago
Because it should be trivial? template<typename T> T getValue(std::array<char, sizeof (T)> bytes) { return *reinterpret_cast<T *>(bytes.data()); }
209.
▲
by
jmgao
12y ago
The F-22 at least more or less accomplished what the program set out to do. It's hilarious to compare it to its "replacement", the F-35, a plane that attempts to shoehorn three mutually conflicting roles into one airframe to
210.
▲
by
jmgao
12y ago
LED lights still get pretty hot, e.g. the big metal blob at the bottom of this one [1] is a heatsink. [1] http://i.imgur.com/suml2Ei.jpg
More ›