News for hackers. Stuff that matters.

helgie

Yes, there was a bidding process, you can see some of the entrants that lost here: https://jalopnik.com/here-are-all-the-mail-trucks-that-didn-...

In any case, even if the process was terribly corrupt, I'm not sure why that would have you so bothered. Last sentence from the USPS press release on Oshkosh winning: "The Postal Service receives no tax dollars for operating expenses and relies on the sale of postage, products and services to fund its operations." https://about.usps.com/newsroom/national-releases/2021/0223-...

Both results are on the first page of a google search for 'usps truck bids'.

Simpler answer that doesn’t require weird psychoanalysis: bro is used because of the perception (possibly reality?) of the ratio of men to women in tech.
I use pods because, of the options available at my grocery store, the only ones available that I know won't etch glass are sold as pods.
If your boss sucks you can't fire them, but if the union sucks you CAN vote out the officers.
You can write them in python using numba
Stopping celebration of a thing is not the same thing as erasing it.
Re:Python Concurrency: The Tricky Bits on Thursday February 18, 2021 @01:17AM (#26176570)
You can use numba to define functions that do not need to hold the GIL to run.
Re:Python Concurrency From the Ground Up (2015) [video] on Wednesday November 11, 2020 @11:19AM (#25059597)
If you use numba (or cython, c extensions, etc) you can make them run without requiring that they hold the GIL, and they can run in parallel. Here's an example that should keep a CPU pegged at 100% utilization for a while:

  import numba as nb
  from concurrent.futures import ThreadPoolExecutor
  from multiprocessing import cpu_count

  @nb.jit(nogil=True)
  def slow_calculation(x):
      out = 0
      for i in range(x):
          out += i**0.01
      return out

  ex = ThreadPoolExecutor(max_workers=cpu_count())
  futures = [ex.submit(slow_calculation, 100_000_000_000+i) for i in range(cpu_count())]
Why should me playing a game be more restricted than me watching someone else (and anything else their commentary/antics might entail) play the very same game on twitch?
Re:Poetry – Python dependency management and packaging on Saturday August 08, 2020 @07:04AM (#24090664)
You can just do 'pip install the-package' in python if you aren't using a virtual environment.

Ruby does have the equivalent of virtual environments, using RVM or rbenv (similar but different tools), to solve the same problems as in Python.

Re:Coconut: Simple, elegant, Pythonic functional programming on Wednesday July 08, 2020 @03:35AM (#23767761)
Natively parallel? From https://docs.julialang.org/en/v1/base/multi-threading/ : "Julia is not yet fully thread-safe. In particular segfaults seem to occur during I/O operations and task switching."

One solution for numerical code at least is to use Numba to JIT-compile (with LLVM, as Julia does) code that can be run without using the GIL, which can be run in parallel on top of Python's threading mechanisms (threading.Thread, concurrent.futures), or with Numba's other options (parallel-for, CUDA kernels, CPU or GPU vectorized Ufuncs/GUfuncs, stencil kernels).

Some thinkpads have them.
Exploiting people is exploiting people, no matter how you spin it.
Re:DCompute: GPGPU with Native D for OpenCL and CUDA on Monday July 17, 2017 @09:28PM (#14793716)
Using the 'cuda.jit' method as linked does require you to do things like manually setting threads and blocks, though one could argue it makes it easier than doing it in CUDA C.

However numba's 'vectorize' and 'guvectorize' decorators can also run code on the GPU. The current documentation doesn't show good GPU examples, but here's examples from the documentation for the deprecated numbapro (the CUDA things from numbapro were later added into numba): https://docs.continuum.io/numbapro/CUDAufunc

  @vectorize(['float32(float32, float32, float32)',
            'float64(float64, float64, float64)'],
            target='gpu')
  def cu_discriminant(a, b, c):
    return math.sqrt(b ** 2 - 4 * a * c)
The 'float32/64' type signatures are not strictly necessary, unless you want to define the output type (so if the inputs are 32-bit floats and you don't want it to return 64-bit floats); if given no signature numba will automatically compile a new kernel each time the function is called with a new type signature. So that function would become (but in current numba 'gpu' should be replaced with 'cuda'):

  @vectorize(target='gpu')
  def cu_discriminant(a, b, c):
    return math.sqrt(b ** 2 - 4 * a * c)
Vectorize is a little limited in that it only operates on scalars and broadcasts those scalar operations over arrays.

guvectorize is more powerful and can operate on arrays directly so something like convolution or a moving average are possible, but is slightly more complicated to use than vectorize.

Update: fixed code formatting