HNHacker News
TopNewBestAskShowJobs

jzwinck

5,693 karma · joined December 14, 2011

submissionscomments
jzwinck··on C++17 Features That Will Make Your Code Simpler
I agree, but TFA said:

> modern C++ style using auto almost whenever possible.

Using auto everywhere, to me, is bad code. It's hard to understand what types we're dealing with, at a glance.

jzwinck··on Elon Musk’s Boring Co. Wins Chicago Airport High-Speed Train Bid
The Shanghai Pudong maglev is a couple miles longer than the train to O'Hare, and it takes just over 8 minutes. Well, except during rush hour, when it takes 7.5 minutes!
jzwinck··on Emirates Planes Could Be Going Windowless
Yes, I know. What's your estimate?
jzwinck··on Emirates Planes Could Be Going Windowless
Perhaps 100 windows at 10 kg per unit, so roughly one metric ton. The metal required to fill the holes will be quite light. LCD screens are light as well, but less so when you account for the long wires to drive them, plus other infrastructure. Still, you ought to be able to carry a few extra passengers by removing the windows.
jzwinck··on Embedding files in C programs with koio
I like objcopy for this. Here is an example command:

    objcopy --input binary --output elf64-x86-64 myfile.txt myfile.o
jzwinck··on Modern CMake short tutorial and best practice
They thought if they used Tcl, CMake would not have enjoyed widespread adoption: http://www.aosabook.org/en/cmake.html

To me, the CMake language is the only part that keeps me on the lookout for a CMake replacement.

jzwinck··on Command-line Tools can be 235x Faster than a Hadoop Cluster (2014)
cut solved your problem. Let's talk about why.

cut is line oriented, like most Unix style filters. It needs to keep only one line in memory at most.

If you say:

    pd.read_csv(f)[[x,y,z]]
It has to read and parse the entire 28GB into memory (because it is not lazily evaluated; cf Julia).

If you actually need to operate on three columns in memory and discard the rest, you should:

    pd.read_csv(f, usecols=[x,y,z])
Then you get exactly what you need, and avoid swapping.

The lack of lazy evaluation does inhibit composition--just look at the myriad options in read_csv(), some of which are only there to enable eager evaluation to remain efficient.

jzwinck··on Google show signs of reconsidering auto mute after developer critique
In American English it's "Group does X" but in British English it's "Group do X."
jzwinck··on Letting go of the GPS to learn the art of natural navigation
A related thing I'd like is a navigation system which understands that some turns are not important. If I'm driving on a Manhattan-style grid, I'd like it to say "You could turn here if you want, but straight is good too." I'd probably go straight if it's green and I'm doing 45, but if I'm at the head of the queue and it's red, I'd rather turn right.
jzwinck··on Heterosexual College Students Who Hookup with Same-Sex Partners
If I eat a piece of chicken, can I not also be a vegetarian?
jzwinck··on United States v. Microsoft Corp. Dismissed [pdf]
The moving part of a "tape library" is known as a "tape robot." For the past few decades there really have been physical robot arms retrieving data from long-term storage. This is still an area of development today, because tapes are cheap but only if you don't need a drive for each one.

https://en.m.wikipedia.org/wiki/Tape_library

jzwinck··on Show HN: Turn Touch wooden smart home remote now shipping
I predict this will work in five years but not in fifteen. By 2033 you will have an iPhone XXIV which will not support Bluetooth, and even if you find an ancient iPhone XVI with Bluetooth on eBay, the remote maker will no longer be working on improving the app, so Apple won't let you install it. Of course today he's here to say the circuit board is replaceable but unless this thing is a breakout hit there won't be enough motivation to enhance it in 2033.

For those who may say if a remote lasts five years it's good enough: maybe you're right in today's context. Things I grew up with came with remotes that lasted 20 years and were only obsolete when the thing they controlled was. I guess that's true of Turn Touch too, if you consider that the device it controls is your iPhone.

jzwinck··on C++17 Compiler Bug Hunt
Occasionally something gets deprecated. Like export template, trigraphs or auto_ptr. But pretty much only when there is widespread disuse and displeasure. 99% of features are used by at least 1% of the user base and need to be kept around.
jzwinck··on The Worst U.S. Maritime Disaster in Decades
Nm is Newton meters. You're looking for NM (Nautical Miles). Common mistake.

Similarly, kt means knots as in speed, but the very same kt also means kilotonnes as in dynamite.

jzwinck··on Parallel tasks in Python: concurrent.futures
Can you name one function other than dot() and tensordot() which has intrinsic multithreading?
jzwinck··on Parallel tasks in Python: concurrent.futures
That's misleading--you say linalg routines "may be" multithreaded, but the vast majority of them never have been. matmul and einsum, despite being candidates for intrinsic multithreading, are not multithreaded. You can read discussion about that here: https://jackkamm.github.io/blog/a-parallel-einsum/
jzwinck··on Parallel tasks in Python: concurrent.futures
That's always been easy enough, just a little hidden:

    import signal
    signal.signal(signal.SIGINT, signal.SIG_DFL)
Now it will just die on Ctrl-C. For text filter programs it's a good idea to do the same for SIGPIPE too.
jzwinck··on Parallel tasks in Python: concurrent.futures
Only np.dot() has intrinsic multithreading. No other functions do. Bizzarely np.dot() is the fastest way to do things other than dot product (like copy or multiply) in some cases.
jzwinck··on Robocalypse Now: Using Deep Learning to Combat Cheating in CSGO [video]
How high level can a team get in CS (in terms of national or world rankings) without playing in a controlled environment where this sort of cheating would be more easily detected by local human observers?

Could my team be ranked in the top ten in the US or Korea or wherever if we only ever play via the internet?

jzwinck··on Linux Raw Sockets
VLAN is a popular one.
jzwinck··on Vim Clutch – A hardware pedal for improved text editing (2012)
Around 2001 I made a pedal from Radio Shack parts and connected it to the Backspace key on an IBM Model M keyboard.

Why Backspace? It was a gift for a friend who had what we called Rusty Degenerative Typing Syndrome. His typo rate was just terrible.

The pedal did not improve his typing error rate but it night have saves hid friends a lot of contusion.

jzwinck··on The C++ Metaclasses Proposal in Less Than 5 Minutes
The guidelines say to use class when there is an invariant and struct otherwise. This is counter productive because if a struct without invariants suddenly gains an invariant, it should be changed to class. Which doesn't matter except that all forward declarations now also must change (despite years of more permissive compilers allowing a forward declaration of a class later defined as a struct, this is not standard).

Better to always use struct and never class, or the opposite. Always class is simpler because the first members declared in most classes are public, and struct saves you typing "public:" at the top of every class. But always class has the advantage that it is far more popular in C++ library code...including std::array which has no invariants.

jzwinck··on Coinbase Index Fund
Yes. You can only buy this if you can show income over 200k USD for the past 2-3 years (or meet other criteria which are less common for people on HN).

https://www.investopedia.com/terms/a/accreditedinvestor.asp

jzwinck··on An employer asked me to do a HackerRank test. Here's my alternative proposal.
45 person office, hiring developers gradually and continually. But what I wrote also applied when I was at a 6 kiloperson firm and we hired a hundred developers a year.

Some tests will seem impossible to complete in the alotted time. Often that's intentional. It saves time for the candidates and gives a better spread of scores (very few will get 100% in some test batteries). But it can be disheartening. For these initial online tests I try to give enough time that most people won't really run out of time unless they get stuck.

jzwinck··on An employer asked me to do a HackerRank test. Here's my alternative proposal.
I am responsible for hiring developers, and I do find online programming tests very useful.

They serve as a relatively simple early-stage screen for applications from people we've never met. Ours costs each candidate 1-2 hours. But we do not require cover letters, which in the good old days might have taken about half that time, and been thrown in the bin.

Some may think no CS graduate would fail a test that let you choose any popular language to implement some basic string parsing. But in practice about half the candidates fail this stage of the hiring process, which saves us quite a lot of time. Yes, it costs each candidate an hour or so, but that's a feature, similar to the oft-proposed idea that sending email could cost one cent to reduce spam.

jzwinck··on An employer asked me to do a HackerRank test. Here's my alternative proposal.
US companies ghost candidates all the time. They actually do it on purpose, partly out of a fear that explicit rejections (especially with reasons given) may elicit lawsuits.

Our applicant tracking systems won't be upset if you ghost them/us. Your application will simply expire after a while.

jzwinck··on Strava heatmap can be used to locate military bases
Moving between North and South Korea is restricted but not completely eliminated. There are people who legiimately work in one and live in the other (not just officials).
jzwinck··on Ad campaign runs cryptocurrency miners while unwitting users watch videos
Three problems:

1. It would not make sense to run on mobile.

2. Mining this way is inefficient, so if the site gets one penny worth of work done, it costs me five pennies.

3. Unless readers have decent GPUs, it's probably not enough money.

jzwinck··on Ad campaign runs cryptocurrency miners while unwitting users watch videos
Once a widget has run say 100 million instructions, suspend it if it comes from a different domain than the main page, mark it visually and provide a button on it to enable high CPU usage.

We used to do something like that with Flash: make the user click it if they want it to run.

jzwinck··on A summary of what quantitative trading firms do
Finding tick by tick data is easy. Every major lit exchange sells it for a few hundred to a few thousand dollars per year, either directly or indirectly (through a data vendor). Just search for "market data price list" and the name of your preferred exchange.
← PreviousPage 11 of 34Next →