HNHacker News
TopNewBestAskShowJobs

deanmen

467 karma · joined March 25, 2014

submissionscomments
deanmen··on Oxford University Press’s new logo is unfathomably bad
DOMINUS ILLUMINATIO MEA = The Lord is my light
deanmen··on My First Piano
What would Bösendorfer be?
deanmen··on Forgotten Employee (2002)
https://thedailywtf.com/articles/We-Use-bobX
deanmen··on Financial Institution Letters: Vacation Policies (1995)
https://www.youtube.com/watch?v=IMFha1nmeXc
deanmen··on Ask HN: Who wants to be hired? (October 2022)
Location: Texas Remote: Yes Willing to relocate: yes Resume / CV: math.ucla.edu/~dmenezes Email: dean.menezes@utexas.edu Technologies: C, C++, Java, Python, Rust, Haskell, OCAML, Git, Linux
deanmen··on Poor writing, not specialized concepts, drives difficulty with legal language
Why not

    int add(int a, int b) {
        unsigned res = (unsigned) a + (unsigned) b;
        return (int) res;
    }
deanmen··on Richard Stallman Announces GNU C Language Reference Manual
It's a standard TeX file built using the GNU texinfo macros, it can be converted to a PDF using TeX or a HTML, docbook, or GNU info page using `makeinfo`
deanmen··on Richard Stallman Announces GNU C Language Reference Manual
Yes they should put the built versions online when it's done.

Right now you can generate a PDF or HTML from the texi

deanmen··on Richard Stallman Announces GNU C Language Reference Manual
It is possible to convert the TexInfo file to a PDF
deanmen··on Ask HN: Who wants to be hired? (September 2022)

    Location: Texas
    Remote: Yes
    Willing to Relocate: Yes
    Technologies: C++, Rust, C, Python, Java, Scheme, Haskell, HTML/CSS, Linux, JavaScript, SQL, Docker
SHAP, RuleFit, Random Forest, Word2Vec, PCA, t-SNE, LSH, ROC, Scikit-Learn

    Resume: math.ucla.edu/~dmenezes
    Email: dean.menezes@utexas.edu
```
deanmen··on Not Your Grandmother's Textbook Exercise
If it is indeed an Excel spreadsheet MEDIAN is a built-in function

https://support.microsoft.com/en-us/office/median-function-d...

deanmen··on Not Your Grandmother's Textbook Exercise
Excel has MEDIAN built-in https://support.microsoft.com/en-us/office/median-function-d...
deanmen··on Ask HN: Why does the C K&R Book not talk about threads?
Because there are no threads in 1977 UNIX, and threads are not a part of C99 (but they are in C11).
deanmen··on I raised my kids on the command line and they love it
xmonad came out in 2007, it's not that old

display manager vs typing `startx` on login isn't old vs modern either

deanmen··on Lisp in 99 lines of C and how to write one yourself [pdf]
Trampolines
deanmen··on One centimeter long bacterium discovered
An egg is a single cell.
deanmen··on Ask HN: Who wants to be hired? (May 2022)
Location: Texas

Remote: OK

Willing to relocate: Yes

Technologies: Python, C, C++, Rust, Java, bash, UNIX, Linux, Scheme, FORTRAN, JavaScript

Resume / CV: math.ucla.edu/~dmenezes

email: dean.menezes@utexas.edu

Github: github.com/menezesd

deanmen··on How “latency numbers everybody should know” decreased from 1990–2020
1024 ns = 1 micro second ;)
deanmen··on Practical guide to solving hard problems
There isn't a NOBEL PRIZE in Mathematics. Perhaps you meant the FIELDS MEDAL, or the ABEL PRIZE? Some mathematicians won the Nobel Prize in Physics (e.g. Sir Robert Penrose) Or maybe you were thinking of John Nash, who won the Nobel Prize in Economics?
deanmen··on Competitive Programming with AlphaCode
The compiler seems to generate less efficient code than either if you write the most mechanical solution for swapping the bits in C.

gcc and clang give

   swap:                                   # @swap
        mov     ecx, edi
        shr     ecx, 11
        and     ecx, 32
        mov     eax, edi
        and     eax, -65569
        or      eax, ecx
        and     edi, 32
        shl     edi, 11
        or      eax, edi
        ret

   swap:
        mov     eax, edi
        mov     edx, edi
        and     edi, -65569
        sal     eax, 11
        shr     edx, 11
        and     eax, 65536
        and     edx, 32
        or      eax, edx
        or      eax, edi
        ret

   /* only works on little-endian! */
    typedef union
   {
 struct
 {
  unsigned bit1: 1;   unsigned bit2: 1;
  unsigned bit3: 1;   unsigned bit4: 1;
  unsigned bit5: 1;   unsigned bit6: 1;
  unsigned bit7: 1;   unsigned bit8: 1;
  unsigned bit9: 1;   unsigned bit10: 1;
  unsigned bit11: 1;   unsigned bit12: 1;
  unsigned bit13: 1;   unsigned bit14: 1;
  unsigned bit15: 1;   unsigned bit16: 1;
  unsigned bit17: 1;   unsigned bit18: 1;
  unsigned bit19: 1;   unsigned bit20: 1;
  unsigned bit21: 1;   unsigned bit22: 1;
  unsigned bit23: 1;   unsigned bit24: 1;
  unsigned bit25: 1;  unsigned bit26: 1; 
  unsigned bit27: 1;   unsigned bit28: 1;
  unsigned bit29: 1;   unsigned bit30: 1;
  unsigned bit31: 1;   unsigned bit32: 1;
 };
 unsigned int n; } mybits;

   unsigned int swap(unsigned int n)
   {
    mybits foo;
    foo.n = n;
    unsigned tmp = foo.bit6;
    foo.bit6 = foo.bit17;
    foo.bit17 = tmp;
    return foo.n;
   }
deanmen··on Competitive Programming with AlphaCode
The definition of flip requires parenthesis (a & B6) == (a & B17) as == has higher precedence than and. int is required in C++ but not in C as you said.
deanmen··on Competitive Programming with AlphaCode
You can do it without a subtraction

     unsigned int swapbits(unsigned int a) {
     bool bit6 = a & (1 << 5); bool bit17 = a & (1 << 16); 
    if (bit6 == bit17) return a; //bits are the same, do nothing
     return (a ^ (1 << 5) ^ (1 << 16)); 
     // flip both 6th and 17th bits }
deanmen··on Competitive Programming with AlphaCode

   unsigned int swapbits(unsigned int a)
   {
       bool bit6 = a & (1 << 5);
       bool bit17 = a & (1 << 16);
       if (bit6 == bit17) return a; //bits are the same, do nothing
       return (a ^ (1 << 5) ^ (1 << 16)); // flip both 6th and 17th bits
   }
deanmen··on Ask HN: Who wants to be hired? (February 2022)
Location: texas

Remote: OK

Willing to relocate: Yes

Resume: https://math.ucla.edu/~dmenezes

E-mail: dean.menezes at utexas.edu

Technologies: Linux/Bash, C, C++, Python, Scheme, OCAML, Haskell, SQL

deanmen··on California ports among world’s least efficient, ranking shows
Vatican City
deanmen··on First atomic clock wristwatch (2003)
There is an actual atomic clock watch on the market that is a little bit smaller:

https://www.hodinkee.com/articles/introducing-the-bathys-ces...

deanmen··on At the International Mathematical Olympiad, computers prepare to go for the gold
https://imo-grand-challenge.github.io/

For the challenge, they give the AI a formal representation of the problem in Lean. To remove ambiguity about the scoring rules, we propose the formal-to-formal (F2F) variant of the IMO: the AI receives a formal representation of the problem (in the Lean Theorem Prover), and is required to emit a formal (i.e. machine-checkable) proof. We are working on a proposal for encoding IMO problems in Lean and will seek broad consensus on the protocol.

deanmen··on A 1969 Experiment in a Locked Room Changed Art History
He got kicked out of the building where he was doing his internship for changing the screensaver on the computer they were using to watch the training session.

electrical engineering high school might mean the German "Hochschule", so college or university.

deanmen··on Books I recommend to my software engineering students
If he keeps one copy at home and one copy at the office, he could get done reading faster than if he left a single copy in one place and only read it at that place.
deanmen··on David Rosenhan’s fraudulent Thud experiment set back psychiatry for decades
Article without paywall https://pastebin.com/gDBDdTB6
← PreviousPage 2 of 3Next →