HNHacker News
TopNewBestAskShowJobs

e271828

84 karma · joined October 9, 2010

submissionscomments
e271828··on Ask HN: Who is hiring? (March 2017)
Qualcomm Technologies Inc. | Software Engineer, SoC Architecture | San Diego, CA | Full Time | ONSITE VISA

Design and implement components of a virtualized device that runs the same apps that you run on your phone or tablet. The virtualized device emulates multi-core CPUs, GPUs, video processors, and other components that comprise the modern SoC (system-on-chip) that is at the heart of today's devices. This platform will be used to help define the architecture of future Qualcomm SoCs.

The components are developed in C and C++. Since the virtual device will run the entire Android software stack, experience with the Linux kernel and Android frameworks will be helpful.

For more details, see https://jobs.qualcomm.com/public/jobDetails.xhtml?requisitio... You can apply there, or you can send your resume to me at arch-resume [at] qualcomm.com

e271828··on Ask HN: Who is hiring? (December 2015)
Qualcomm | San Diego, CA | Full Time | ONSITE | VISA

Qualcomm's Chip Architecture team is looking for developers to build profiling tools that our engineers use to gain critical insights into the performance of mobile chips that power billions of devices worldwide.

We use tools to profile hardware and software jointly: software at the application, framework and kernel layers, and hardware across the chipset, including the CPU, GPU, wireless modems and system interconnects. We have openings for both low-level kernel tools and higher level data processing and analysis tools.

For kernel-level development you should have a strong C background, and experience working with the Linux kernel. Experience with low level profiling tools on any platform (such as ftrace or dtrace) would be good to have.

For data processing and analysis tooling, you should have experience developing data processing and analysis tools in Python or other languages. We'd prefer a full-stack developer who can handle the entire pipeline from data processing through database management to visualization tools. We have a modern development stack, using Python 3, a CouchDB backend, and visualization and analysis using the IPython notebook and d3.js.

For more information and to apply: https://jobs.qualcomm.com/public/jobDetails.xhtml?requisitio...

We are also looking for a more experienced developer who can be a team lead across all of the profiling tools. If you fit that role, you can get more information and apply at: https://jobs.qualcomm.com/public/jobDetails.xhtml?requisitio...

e271828··on Python Coroutines with Async and Await
You can get channel-like behavior using async/await and a custom event loop. I wrote a little example[1] that has a bare-bones implementation of this. I used it to translate the prime sieve example from Go[2] almost directly to Python. The code uses "message = await channel.receive()" to mimic Go's "message <- channel". Instead of using "go func()" to fire off a goroutine, I use loop.run(func()) to add the PEP492 coroutine to my simple event loop.

It's not an efficient implementation - it was really meant as a proof of concept that you can use async/await in your own code without any reference to asyncio.

[1] https://gist.github.com/vrajivk/c505310fb79d412afcd5#file-si... https://gist.github.com/vrajivk/c505310fb79d412afcd5#file-ch...

[2] https://golang.org/doc/play/sieve.go

e271828··on “The following surprisingly difficult problem was given to my son's Math Circle”
There is a geometric way to solve this, requiring only graph paper and a straight edge.

If x is the number of chickens sold in the morning, and y is the number sold after lunch, then the straight line x+y=10 represents all possible values of x and y for the first farmer. Of course, this allows fractional chickens, so the true set of possible values is the set of points where x and y have integer values.

Now you can draw parallel lines to this first line for x+y=16 and x+y=26, representing valid x and y values for the second and third farmer.

Now, if you take any other line that intersects these 3 lines, then that line can be represented by the equation ax+by=35, for some value of a and b. The key observation then is that if we interpret a and b as the morning and afternoon prices respectively, then the points where this line intersects each of the 3 parallel lines represents the x and y values for each farmer such that that farmer's net earnings are $35.

So now the problem reduces to placing a straight edge on your paper and finding a line that passes through integer points on each of the 3 parallels.

This is pretty easy - start with the edge at (0,26) for farmer 3 and (1,15) for farmer 2 and see if it intersects the first line at an integer point - it doesn't. Keep going and you'll find a nice intersection at (0,26), (5,11) and (8,2). Unfortunately the corresponding prices don't round nicely to cents, but you can shift the entire line to the right to get the right answer: (1,25), (6,10) and (9,1), corresponding to prices of $3.75 and $1.25.

e271828··on Elegant n-gram generation in Python
This is an elegant solution for sequences, but it doesn't work for arbitrary iterables (which need not support slicing). While this generalization might not be needed for language ngrams, the general problem of taking n items at a time from an iterable pops up in various places.

Here's a generator that yields ngrams from an arbitrary iterable:

  from collections import deque
  from itertools import islice
  
  def ngram_generator(iterable, n):
      iterator = iter(iterable)
      d = deque(islice(iterator, n-1), maxlen=n)
      for item in iterator:
          d.append(item)
          yield tuple(d)
e271828··on CouchDB 1.1.0
Thanks Dale, this is good to know. Any plans to update Couchbase server to be based on CouchDB 1.1? I know the _replicator DB would be a particularly nice feature to have.
e271828··on CouchDB 1.1.0
The CouchBase version has been at 1.1.0 for a while (since March 24):

http://www.couchbase.org/wiki/display/membase/Releases

Does anyone know if theirs was an early release of 1.1? Or are their version numbers out of sync with the Apache versions?