HNHacker News
TopNewBestAskShowJobs

jzwinck

5,693 karma · joined December 14, 2011

submissionscomments
jzwinck··on Bill and Melinda Gates Are Paying Off Nigeria's $76M Debt to Japan
Probably not. First this is a highly unusual event, not something other debtors could reasonably expect for themselves.

Second, the money was used to fight polio, a terrible disease. Moral hazard would be Nigerians driving Ferraris purchased by Melinda and Bill. This is not that.

If the Gates want to eliminate such diseases, they must be elated to see effective programs spending their money to do it.

jzwinck··on Reading disks from 1988 in 2018
The Intel DQ67OW motherboard has a floppy connector and an LGA1155 socket for Sandy Bridge (maybe Ivy Bridge too).

3.5 GHz Core i7 with a floppy drive is not too shabby.

It also has both PS/2 and serial ports if you would like to plug in a mouse.

jzwinck··on Why Leaf Shutter Lenses Matter (2013)
There is often an interface between the lens and camera. It's different for each camera maker usually. It may be mechanical, electronic, or both. It may provide significant power to the lens, a data path for firmware updates (Olympus), or even mechanical rotation to drive unpowered focus mechanics in the lens (Nikon).

Various lens parameters can be communicated to the camera, including static lens capabilities but also dynamic factors such as the current manual focus distance, current manual aperture, or focus mode.

So yes, they could do that. But some systems would be designed with the assumption that all lenses will have shutters, or that the user of lenses with shutters will set the camera shutter to remain open.

Sometimes the shutter release "button" is part of the lens instead of the camera.

jzwinck··on How to Print Integers Really Fast
Line numbers in less(1) or GitHub. Row numbers in Excel, Pandas, R, etc.

The most common way to label rows is with sequential numbers.

jzwinck··on How the Winklevoss Twins Found Vindication in a Bitcoin Fortune
Roughly similar: http://nasdaqtrader.com/Trader.aspx?id=PriceListTrading2

But GDAX is a vertically integrated exchange and retail trading platform, so the 0.1% taker fee is all you pay. A stock exchange won't talk to you directly so you must pay additional broker/clearing/bank fees.

Real all-in fees for stock can be 2 USD to trade 2k USD, so 0.1%, same as GDAX. But you can also find fees of 10 USD to trade 100k USD and many other rate examples which are either higher or lower.

I think a lot of people don't notice the huge difference between a traditional exchange (which does not handle money, only agreements about money) and GDAX (vertically integrated exchange + clearing house + trading application).

jzwinck··on If your iOS 11 device unexpectedly restarts repeatedly on or after December 2
When I upgraded a laptop from Windows 7 to 10, and then it wouldn't resume from sleep anymore, I told Windows 10 to revert and it took a long time but worked perfectly.
jzwinck··on macOS High Sierra: Anyone can login as “root” with empty password
It requires the attacker to be able to type a few characters into a logged in session. If the session is not an administrative one, it's not fair to say all bets were off.

If I give you a Mac logged in with an unprivileged account and you can use only the keyboard and mouse to gain root access, the security has failed.

I think you've conflated this with the attacker having (full) physical access to the machine, which conventionally means access to its ports and perhaps a screwdriver. This is not that.

jzwinck··on Linked List Problems (2002) [pdf]
> data [needn't] be continuous to stay in cache. Cache is more like paged virtual memory, it consists of cache lines.

It sounds like you're saying everything will be OK so long as each chunk of 64 bytes (cache line) is used together. But one page is typically 4 KB, and if you use for example all 64 bytes of one cache line, but only one cache line per page, you will suffer from TLB misses.

jzwinck··on The Uncertain Future of Bitcoin Futures
> When the futures clear, you basically end up with dollars, which is odd to an extend as a future in oil will literally give you oil once it clears.

Futures come in two types: physically settled and financially settled. Physical means the owner at expiration receives the product (in this case BTC). Financial means the owner at expiration receives the quote currency (in this case USD). Many futures contracts are financially settled, usually in the national currency where they are traded.

It would be possible to write physically settled BTC contracts, but that would be more complex for CME to implement (they'd need brokers to manage flows of cryptocurrency), and would be a less differentiated offering compared to existing cash exchanges.

jzwinck··on Trip report: Fall ISO C++ standards meeting
If you want to check whether either of two values is NaN, rejoice, it is now optimized to a single instruction on x86 by GCC 6 and Clang 3.7: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63387

You write isnan(x)||isnan(y) but the compilers now optimize the whole thing to one instruction.

If you want specific syntax you can use the builtin unordered(x, y).

jzwinck··on I hate telephones
> if you have a group of half a dozen people who each pay a few hundred $ a month you could almost employ one person who takes care of such stuff

You could move to Singapore, where a full-time (24x6) "domestic helper" costs about 400 USD per month. They'll cook meals for you, help care for your kids, buy groceries, do laundry, etc. Some people I know say they'd never move back to the US because of this.

For comparison, that cost is roughly 15-20% of typical rent.

jzwinck··on USS McCain collision ultimately caused by UI confusion
I sail regularly in the waters where this occurred. They are extremely crowded with large ships, small fishing boats, and more.

The Navy ship was moving at 12 knots which is relatively fast in the local context. Not only does this open them to a violation of the Safe Speed Rule discussed in another comment, it means that any automated course correction would have a decent chance of putting them on a new collision course with a different boat. Perhaps even a small one their radar will not see.

The solution is to slow down. This is well known in nautical practice: if things are not going your way, slow down. If you are not sure what to do, slow down. If you are unable to control your vessel, slow down.

jzwinck··on New Zealand to ban foreigners from buying existing houses
Yes I'm aware of that document. From your link:

> Because the English and Māori versions of the Treaty differed significantly, there is no consensus as to exactly what was agreed upon.

So it does little to clarify. The Maori are a minority now. Anyone arguing that some of the land of NZ should not be sold to the highest bidder may want to explain how that relates to the not-so-ancient trade of all the land in NZ for compensation of a disputed nature and extent.

jzwinck··on New Zealand to ban foreigners from buying existing houses
Do you mean it belongs to the Maori? Or the Britishish? It is not at all clear who this land belongs to.
jzwinck··on C++ Tips of the Week
Tip #1 appears on the surface to be about C++17's std::string_view, but many shops had something similar to string_view for a decade or more before C++ made it official. The tips are not presented in their original form; edits have been made (as per the linked page). I think Google had something like string_view by 2009 at the latest, using C++03 compilers.
jzwinck··on How to break into 100k+ Euro salary in EU/EEA?
You've asked how you can get 100k EUR per year. But you have not mentioned anything about the value you can offer for this money (unless DS means something there, I have no idea what DS is).

In many companies, low-level managers don't earn that much (especially green ones, which it sounds like you would be during the time frame you specified). Companies wouldn't want to distract all their employees by offering a huge pay bump just to switch fields.

When you ask for money you should first talk about what you can contribute. Which is?

jzwinck··on A pub in North Yorkshire has won TripAdvisor’s Travellers’ Choice Awards
Yes. Here's one place that came up when I sorted by "Top Ranked" and filtered by "Dinner": https://www.tripadvisor.com.sg/Restaurant_Review-g298285-d11...

It even beat out the Night Market, which is the best in the state, if not the country.

I think proprietors and/or customers are able to update their listings and select which meals are applicable. And obviously you'd want to select all of them, even if you are a coffee shop that sells one type of sandwich.

jzwinck··on A pub in North Yorkshire has won TripAdvisor’s Travellers’ Choice Awards
I've noticed when looking at "democratic" restaurant rankings, they tend to be dominated by places that cater to some common denominator. Cafes with latte art, dessert shops, drinking spots. Those are what win, even in rankings nominally about food.

In many cities it becomes tricky to find an actual restaurant. The top ten spots might only contain one or two, plus everyone's favorite ice cream parlor.

jzwinck··on HPAT – A compiler-based framework for big data in Python
Yes you need to install an MPI implementation such as OpenMPI or MPICH. You probably also want to install a scheduler such as TGSFKA Sun Grid Engine (https://en.m.wikipedia.org/wiki/Oracle_Grid_Engine), Torque, or Slurm. All of these contain a program called qsub which launches multiple copies of a job in parallel across machines. Perfect for MPI.

A vanilla compiler will suffice for MPI code, so you don't need anything special at build time.

jzwinck··on Numba: High-Performance Python with CUDA Acceleration
Numba can be much faster than NumPy for some calculations. For example if you want to compute both the min and the max of an array, NumPy requires two passes but in Numba it is easily done in one. This can give close to 2x speedup for arrays which do not fit in cache.
jzwinck··on Buffett wins $1M decade-old bet that the S&P500 would outperform hedgefunds
There is no single Wall Street vendor who has nearly every hedge fund as a client, unless perhaps you are talking about a major exchange like NYSE. Even that is probably not a valid because of the huge number of firms doing smaller volumes via third parties (and having no direct relationship with the exchange).

Or perhaps you worked at Reuters or similar, in which case you would not have much visibility into the funds.

So are your two sentences related in any way?

jzwinck··on There Are Only Four Billion Floats, So Test Them All (2014)
Intel has MKL/TBB/IPP/etc which are now under one umbrella: https://software.intel.com/en-us/performance-libraries
jzwinck··on What's So Bad About Posix I/O?
File write could work the same as socket send. If the data cannot definitely be written now, write nothing and allow the application to try again, probably after waiting for readiness via poll or select.
jzwinck··on House Address “Twins” Proximity
I grew up in a neighborhood where one pair of streets intersected twice. This led to quite some confusion whenever a friend said "Meet me at Kiln & White." The two intersections were far enough apart that many people did not know there was a duplicate, and both were prominent junctions suitable for meeting other kids.
jzwinck··on Introduction to Statistics using NumPy
Two reasons. First is that NumPy works in Python 2 as well as 3.

Second is that everyone uses NumPy for this. It is proven, it is fast, and using it for simple things is a great way to get started on a path toward using it for more complex things. For example I use NumPy for tabular text processing sometimes, as it is much faster than the built-in stuff if you have a lot of data.

jzwinck··on Three Equifax Managers Sold Stock Before Cyber Hack Was Revealed
What if you cancel the planned trades when you learn of some coming news that disadvantages them?
jzwinck··on Three Equifax Managers Sold Stock Before Cyber Hack Was Revealed
No there is not a law against giving legal advice if you're not a lawyer. It's lawyers who are sometimes prohibited from giving legal advice. Non-lawyers have the usual freedom of speech, restricted in the usual ways.

Claiming that you are someone you're not on the Internet is so commonplace it is hard to see where any trouble would come of it by itself. Again it's different if you knowingly cause harm to others.

I'm not a lawyer. This is not legal advice. Or maybe I am and it is. Who knows.

jzwinck··on Missed optimizations in C compilers
Most of the top questions I've asked on Stack Overflow are related to missed optimizations in C (or C++, but I'll skip those here):

- https://stackoverflow.com/questions/45052282/why-is-memcmpa-...

- https://stackoverflow.com/questions/23055704/why-cant-gcc-op...

- https://stackoverflow.com/questions/26052640/why-does-gcc-im...

- https://stackoverflow.com/questions/18951520/gcc-optimizatio...

But my favorite is this one:

- https://stackoverflow.com/questions/26053934/is-it-feasible-...

That one is now optimized in GCC and Clang: (isnan(x) || isnan(y)) becomes a single instruction on x86.

Some of these are very tricky, but the isnan pairing one is simple, and quite useful for some math routines whose first order of business is finding NaNs.

jzwinck··on How to Make Python Run as Fast as Julia (2015)
Faster than fastest:

  import numba
  @numba.vectorize(nopython=True)
  def add2(x, y):
      return x + 2 * y

  add2(X, Y, out=X)
This is 40% faster on my machine. It only needs to read X and Y once, and write X once. It does take a bit of extra time on the first run, because it uses JIT compilation (LLVM).

Numba lets you implement vectorized operations in terms of elements. In the above, x and y are scalars. You get support for various NumPy "ufunc" features for free, such as the out parameter used here.

Ref: http://numba.pydata.org/numba-doc/dev/user/vectorize.html

jzwinck··on X-Seed 4000
That has already happened: https://en.m.wikipedia.org/wiki/Ryugyong_Hotel

The North Koreans have been trying to build this hotel for 30 years. It was a response to the Singapore Swissotel which was the tallest hotel in the world and built by a South Korean company.

← PreviousPage 12 of 34Next →