Lurker News
Please state the job location and include the keywords REMOTE, INTERNS and/or VISA when the corresponding sort of candidate is welcome. When remote work is not an option, include ONSITE. Please only post if you personally are part of the hiring company—no recruiting firms or job boards. Only one post per company, please. If it isn't a household name, explain what your company does.

Commenters: please don't reply to job posts to complain about something—it's off topic here. Readers: please only email if you are personally interested in the job. Searchers: Try https://findwork.dev/?source=hn, https://kennytilton.github.io/whoishiring/, https://hnhired.com/, https://hnjobs.emilburzo.com, https://news.ycombinator.com/item?id=10313519.
Don't miss these other fine threads: Who wants to be hired? https://news.ycombinator.com/item?id=23379194 and Freelancer? Seeking freelancer? https://news.ycombinator.com/item?id=23379195
Note that these threads are paginated and usually end up with several pages of comments. Click "More" at the bottom of each page to go to the next.

Comments (654) 534 threads

Show all comments

Showing thread 96 of 534

srosenberg2 replies#
Inpher (https://www.inpher.io/) | New York (USA), Lausanne (Switzerland), Paris (France) | Software Engineers | Full-time | Onsite

At Inpher, we believe that privacy and security are foundational to the future of computing and have built enterprise products to make this vision a reality. We are a small team of veteran founders, world-renowned cryptographers and proven software engineers. We are headquartered in New York City, with satellite offices in San Francisco and Lausanne, Switzerland, and have raised $14M in funding.
Apply at https://www.inpher.io/careers
Or email to me directly at $user@inpher.io, where each ascii character of $user can be obtained by solving for x and converting to base-128,
x = 145767 mod 611939, x = 109572 mod 598463

saagarjha1 reply#
Unrelated to the job post itself, but I spotted the puzzle and couldn't help but try it out for a minute. Sadly, I couldn't get anything useful out of it; I have a guess as to what it should decode to but got nothing remotely close to ASCII from it. Perhaps I'm just not smart enough to pass the test? ;)
andrewbecker4 replies#
You're probably getting hung up on the "converting to base-128" part.

Here's my solution. I wouldn't normally post it publicly, but I've emailed OP multiple times over the last couple months to apply for this position and have received no response, so maybe this is actually the best way to get around the spam filter:

  from z3 import *
  s = Solver()
  x = Int('x')
  divisor1 = x / 611939
  divisor2 = x / 598463
  modconstraint1 = (x - (611939 * divisor1)) == 145767
  modconstraint2 = (x - (598463 * divisor2)) == 109572

  s.add(modconstraint1, modconstraint2, x > 0)
  s.check()

  email_bin = '{0:b}'.format(s.model()[x].as_long())
  email_b128 = []
  for i in xrange(0, len(email_bin), 7):
      email_b128.append('0' + email_bin[i : i+7])

  email_bytearr = map(lambda c: str(unichr(int(c, 2))), email_b128)
  print(reduce(lambda x, y: x + y, email_bytearr, '') + '@inpher.io')
saagarjha#
Oh, I didn't realize that x had to simultaneously satisfy both; I just though they were two parts of the email or something. Thanks for the explanation!
Recursing#
Btw, python-z3 supports the % operator

  from z3 import Int, solve
  x  = Int('x')
  solve([x % 611939 == 145767, x % 598463 == 109572])
  [x = 243085550]
Also: please use python3, it's 2020 :( And a simpler conversion to base128 would be:

   print(''.join(chr((x // 128**i) % 128) for i in range(3, -1, -1)))
throwaway765e6#
For anyone wishing to try this without having to install z3, or just to see a more rudimentary way of doing this, here is a self-contained (hopefully just as readable) solution in JS:

    const num = findNum();
    const bin = num.toString(2);
    const byteStrings = toChunks(bin, 7).map(chunk => chunk.join(''));
    const bytes = byteStrings.map(str => parseInt(str, 2));
    const str = bytes.map(String.fromCharCode).join('');
    console.log(num, bin, byteStrings, bytes, str);

    function findNum(i=0, lim=1e1000000000) {
     while (i < lim) {
      if (i % 611939 === 145767 && i % 598463 === 109572) return i;
      i += 1;
     }
    }

    function toChunks(iterable, chunkSize) {
     const chunks = [];
     for (const el of iterable) {
      let buf = chunks[chunks.length - 1];
      if (!buf || buf.length >= chunkSize) {
       buf = [];
       chunks.push(buf);
      }
      buf.push(el);
     }
     return chunks;
    }

    243085550 1110011111010011000011101110 [ '1110011', '1110100', '1100001', '1101110' ] [ 115, 116, 97, 110 ]
Sorry about not getting a response from the poster of the job, by the way. It's a very unhealthy attitude and it's sad to see this on HN of all places.
throwaway235092#

  x = 145767

  while x % 598463 != 109572:
      x += 611939

  s = ''
  while x:
      s = chr(x % 128) + s
      x //= 128

  print(s)
huhtenberg#
Good puzzle... even if a bit trivial ;)