HNHacker News
TopNewBestAskShowJobs

zbjornson

1,062 karma · joined October 30, 2015

Microbiologist (virology) & immunologist by training. High-performance bioinformatics software dev by trade.
submissionscomments
zbjornson··on How JavaScript works: inside the V8 engine
Good question. I haven't looked at that case. V8 can detect and optimize small ints (smi, fit in uint32, i.e. all types of typedarrays), but it might still take the easy/slow path and convert to doubles. Relatively easy to look at with node.js and irhydra.
zbjornson··on How JavaScript works: inside the V8 engine
You're right. In V8, values from a Float32Array are always converted to doubles upon access, even in cases like adding values from two Float32Arrays and storing them in another Float32Array where the result is provably the same. That costs a handful of cycles for each element.

Mozilla has a blog post about doing efficient float32 math: https://blog.mozilla.org/javascript/2013/11/07/efficient-flo...

V8 bug: https://bugs.chromium.org/p/v8/issues/detail?id=5541

Using a Float64Array is faster at the expense of memory usage. (I've never seen a case where the code generated by V8 bottlenecks on memory bandwidth fwiw.)

zbjornson··on Cheap Beijing Flights With a Dangerous Catch
I don't know anything about airmule's operation or China's customs/security, but the on-board courier industry is a legitimate one that has regulations and procedures that it's not clear the author of this article is aware of.

> "We have found contraband in [courier] shipments," says U.S. Customs official Bob Fischler, "but percentage-wise it is infinitisemal. And in any seizure we made, it was obvious that the on-board courier had nothing to do with it." In fact, at New York' JFK and at London's Heathrow airport, because of the sheer volume of courier shipments, all courier pouches go to a central location for clearance. The courier is typically dismissed before customs physically inspects the shipments.

- From Air Courier Bargains by Kelly Monaghan.

zbjornson··on Ask HN: What tasks do you automate?
All of my thesis project in immunology was automated, which involved several hours of blood processing repeated several thousand times (with some parallelization) by a team of a dozen robots. There are pics, schematics and vids here: http://www.zachbjornson.com/projects/robotics/.

I also like to say that the final analysis was automated. It was done entirely in Mathemtica notebooks that talk to a data-processing API, and can be re-ran whenever. The notebooks are getting released along with the journal article for the sake of transparency and reprodibility.

(Also, I automated my SSL cert renewal ;))

zbjornson··on Generating Images in JavaScript Without Using the Canvas API
Cool. Nice, creative work. Indexed PNGs seem unfortunately under utilized.

I happen to have just opened a PR to support indexed PNGs in node-canvas (HTML Canvas impl for node) based roughly on the proposed pixelFormat API [1,2] for the same reason that the space savings can be immense.

It's also straightforward to change the palette of an indexed PNG after it's encoded because you don't need to re-compress the body. This lets you do cool tricks with recoloring images.

[1] https://github.com/Automattic/node-canvas/pull/935 [2] https://github.com/WICG/canvas-color-space/blob/master/Canva...

zbjornson··on Benchmarking TensorFlow on Cloud CPUs: Cheaper Deep Learning Than Cloud GPUs
As far as the 64 vCPU finding, that's quite possibly because it's crossing NUMA modes. GCE's virtualization hides NUMA information unfortunately (at least as far as I've ever seen), so there's no way to handle this in software even.

Would be interesting to see these benchmarks on Haswell/Broadwell vs Skylake.

zbjornson··on Java and SIMD
CPUs throttle down for AVX and AVX2 workloads as well. Hopefully your vectorization is sufficient to make up for the throttling.
zbjornson··on First Cable-Free Elevator Zooms Horizontally and Vertically Using Maglev Tech
It could still have the type of safety brake that mounts under the car and engages when excessive downward motion is detected.
zbjornson··on How Raygun increased throughput 20x with .NET Core over Node.js
It looks like they ran their last node.js benchmark around Sep 2015. I'm curious if this was still with node.js v0.x, or if they had already adopted the latest version of io.js (3 or maybe 4).
zbjornson··on JavaScript Concurrency Model and Event Loop
Are you sure the thread pool isn't used for IO? I thought that was it's primary use. This explanation is a bit old but I think still correct: http://stackoverflow.com/a/20346545 and http://dailyjs.com/post/libuv
zbjornson··on Long-dormant bacteria and viruses in ice are reviving as climate warms
Soil-borne anthrax is very common; there's in fact "anthrax season" when (usually small) outbreaks happen among wild and farmed animals, from North America to southern Africa, Russia to China and India. (Search for anthrax on https://www.promedmail.org/, there are 37 reports in 2017 so far.) That a thawed carcass was infected is an interesting anecdote as far as the mode of the transmission, but it isn't surprising. That is, it's not a disease that we've eradicated that is coming back to haunt us.
zbjornson··on Memory bandwidth
Which way was the association, more CPUs -> faster CPU-GPU transfer, or slower? By "physical CPUs" I assume you mean cores in a single socket, but in pre-Haswell multi-socket systems, the uncore clock speed was tied to the core clock speed, so idle CPUs that enter a low power state can actually cause horrible performance because cache coherence snoop signals have to wait for the low-power/slow CPUs to respond. See https://software.intel.com/en-us/forums/intel-moderncode-for...
zbjornson··on The presence of microplastics in commercial salts from different countries
This is only one source of microplastics, but in 2015 Obama signed signed the Microbead-Free Waters Act, banning plastic microbeads in cosmetics and personal care products. Seems smart to target the source instead of monitor and clean up afterwards.
zbjornson··on Stochastic Program Optimization
STOKE also replaced IMULL with PMULLW and ADDL with PADDW (32 vs 16 bit).
zbjornson··on CPU cache-based communication between two co-located virtual machines
Interesting idea. Don't think that would work for multi-socket boards though, which I think are most servers.
zbjornson··on Amazon EC2 Reserved Instances now offer instance size flexibility
They also have a new committed use discount where you buy an amount of RAM and a number of vCPUs and use them in any shape of VM that you want.
zbjornson··on Microsoft Pledges to Use ARM Server Chips, Threatening Intel's Dominance
Competition is great, but this also seems like a rather big setback to the goal of having multi-cloud applications, in instances where the app can only run on x86-64.
zbjornson··on Ask HN: Who is hiring? (March 2017)
Primity Bio | San Francisco Bay Area | Frontend, Full-Stack and UX Engineers | Onsite or Remote

We're building a real-time, cloud-based bioinformatics data analysis application and seeking engineers to join our team. (No experience in bio needed.)

Ideally you have a passion for and experience with building highly interactive, creative interfaces (e.g. business intelligence or dashboarding apps, products like Google Docs). Prefer familiarity with Angular 1.5/2, web sockets, node.js and/or C++.

my username at primitybio . com

zbjornson··on Google Cloud Platform is the first cloud provider to offer Intel Skylake
As far as HIPAA compliance goes, though, AWS EC2 requires dedicated tenancy, whereas GCE allows HIPAA workloads on any VM, including preemptible VMs.
zbjornson··on Google Cloud Platform is the first cloud provider to offer Intel Skylake
The other fundamental change is that most instructions now have masked variants, so you can apply an operation to only specific elements in a vector based on a mask register. This avoids branch mispredictions, which are a big performance hit in some workloads.
zbjornson··on Google Cloud Platform is the first cloud provider to offer Intel Skylake
Nope, only on Xeons.
zbjornson··on Google Cloud Platform is the first cloud provider to offer Intel Skylake
No MKL, just a mix of AVX2 and a bit of AVX512 written with intrinsics in C++. Working on benchmarking Eigen at the moment, which is also AVX512-optimized.
zbjornson··on Google Cloud Platform is the first cloud provider to offer Intel Skylake
What do you mean by "gimped?" As in the consumer chips without AVX512 vs. the server chips with AVX512?
zbjornson··on Google Cloud Platform is the first cloud provider to offer Intel Skylake
I've been benchmarking these against Haswell and Broadwells. Despite being 300 MHz slower, we're getting between 5 and 45% faster benchmarks on linear algebra functions that we run a lot, even without doing much work to tailor to AVX512 instructions yet.

The cache is also a whopping 56 MB.

zbjornson··on Google Infrastructure Security Design Overview
> We have started rolling out automatic encryption for the WAN traversal hop of customer VM to VM traffic. ... all control plane WAN traffic within the infrastructure is already encrypted. In the future we plan to ... also encrypt inter-VM LAN traffic within the data center.

It would be nice if this was more explicit. For example, is traffic that is TLS-terminated at their LB reencrypted all the way to the back end VM? At what point is it decrypted again? Are those keys unique to us or are they used for whatever traffic happens to traverse the same network paths? (I assume shared but with software-defined networking maybe it's practical for them to be unique.) What does the "control plane" encompass?

In any case, I'm curious what people think about trusting the service provider for inter-service and inter-VM encryption. Do you use the LB's TLS termination? Do you still enable encryption for your DB connections even if it is (or will soon be) redundant with their network encryption?

zbjornson··on Token-Based Authentication with Node
It sounds like you mean if you change the signature used to sign the tokens, then existing tokens will fail validation without hitting the db? If so, that's not too practical because all of your users are suddenly signed out. What myself and the two other posters I think encountered is that you have to store revoked/invalidated tokens in a blacklist, and then check that a token in a request is not in that blacklist. (That was my first point, at least.)
zbjornson··on Ask HN: Who is hiring? (January 2017)
Primity Bio | San Francisco Bay Area | Frontend Lead or Engineer | Onsite or Remote

We're building a real-time, cloud-based bioinformatics data analysis application and seeking engineers to join our team. (No experience in bio needed.)

Ideally you have a passion for and experience with building highly interactive, creative interfaces (e.g. business intelligence or dashboarding apps, products like Google Docs). Prefer familiarity with Angular 1.5/2, web sockets, E2E testing.

my username at primitybio . com

zbjornson··on Token-Based Authentication with Node
We naively started with JWT for auth, and gleefully ripped it out after several months because of all of its cons.

1. Overall, no net benefit. We still had to query a k/v store on every action to check that the token wasn't revoked.

2. Less secure because there's no way to make it act like an HTTP-only cookie (no access from JS).

3. No way to revoke all of one user's tokens because there is no list of those tokens. We want to limit (or be aware of) the number of active logins and let the user sign out from all locations (as you can in Gmail). If the token is only stored on the client, there's no way to do this. You could store a list of all granted tokens and only use it for these revocations, but that's yet another level of complexity. (When we dropped JWT, the diff was -1200+95 LOC because we had to handle a lot of scenarios like this.)

4. Adding tokens to client-side requests is a pain. The common example for e.g. Angular is to use an HTTP interceptor to add a header. More code, but it works... Except for img and a (anchor/link) elements where you can't add a header. So you put the token in the URL query instead, and now you're vulnerable to session leaking if a user shares a URL with someone else. And you have to manually update those embedded tokens when they expire, as many JWT folks recommend you make the expiry short.

Good riddance.

zbjornson··on A Mysterious Virus That Could Cause Obesity
There's actually a lot of data on this because adenoviruses are popular vaccine vectors of study right now, and the selected serotype must be one that as few people as possible have titers against, so researchers test random people for immunity.

For example, [0] (2010) reports that ~5% of people in the US were positive for Ad36, 35% Thailand, 52% South Africa, 91%(!) Malawi, 88% Cameroon, 48% Botswana, 43% Brazil. Malawi, Cameroon, Thailand and Botswana are solidly in the lower % obesity parts of the map that you linked to, while the US has the lowest antibody prevalence and highest obesity. They don't have Ad36 data for Europe unfortunately, but ...

Ad36 is not the only adipogenic (fat-causing) serotype. Ad5, 9, 31, 36 and 37 are all correlated or linked to being adipogenic [1]. The above paper [0] has numbers for Ad5 if you're interested: Europe was 39% negative, US 31%, the African countries 10-13%, Brazil 18%.

[0] https://www.ncbi.nlm.nih.gov/pubmed/19925902 [1] https://www.ncbi.nlm.nih.gov/pubmed/26352001

zbjornson··on GCE vs. AWS in 2016: Why You Shouldn't Use Amazon
Coming early 2017: https://cloud.google.com/gpu/
← PreviousPage 4 of 9Next →