HNHacker News
TopNewBestAskShowJobs

OMGWTF

355 karma · joined October 24, 2013

submissionscomments
OMGWTF··on A Formula for the Number of Days in Each Month
You are right. I was lazy, I compiled it with gcc -O2 and extracted the assembler with objdump -Mintel -d.
OMGWTF··on A Formula for the Number of Days in Each Month
How about 15 bytes? (x86, month in ecx, result in eax)

  // 28 + ((0x3bbeecc>>m>>m)&3);
  b8 cc ee bb 03    mov  eax,0x3bbeecc
  d3 f8             sar  eax,cl
  d3 f8             sar  eax,cl
  83 e0 03          and  eax,0x3
  83 c0 1c          add  eax,0x1c
OMGWTF··on A Formula for the Number of Days in Each Month
// without floats, multiplication, division, modulo:

int result = (30|m^(m>>3)) - (((m^13)+1)>>4<<1);

OMGWTF··on A tiny group of people can see ‘invisible’ colours that no-one else can perceive
Using JPEG for a color test doesn't seem well thought out. Using GIMP (Colors, Map, Rotate Colors), one can make a letter appear in the center circle. I guess if the other circles had any letters in them, the compression ruined it.
OMGWTF··on Understanding the LZ4 Memory Corruption Vulnerability: You Don't Play Right
Well, if a fix is possible without much hassle, it should be implemented. But it's crazy to raise as much attention as in this case.
OMGWTF··on Understanding the LZ4 Memory Corruption Vulnerability: You Don't Play Right
I think the point of his critics wasn't that this is no real vulnerability but that the implied severity was blown out of proportion.
OMGWTF··on A Python-Powered Budget Spreadsheet
What does "Share scripts with up to 4 users" (Enterprice License) mean?
← PreviousPage 3 of 3