HNHacker News
TopNewBestAskShowJobs

predakanga

358 karma · joined December 17, 2013

submissionscomments
predakanga··on Python packaging is good now
In the past 12 hours, I started a new Python project. I can't agree with the sentiment - the most I can say is that Python packaging isn't terrible now.

My intention was to create a Python 3 package using best-practices, a nice division of labour by process to avoid threading problems, etc.

So far I've run into the following issues regarding packaging:

Getting started - there's a glut of documentation, much of it contradictory, much of it out-of-date. Simply google "Python packaging" and you'll have to pick between 4 sources of info on the first page, all of which look official.

The tools - this one was a new one for me; I normally use virtualenvs for development, but vaguely remembered it being bundled in Python 3. Turns out it's not virtualenv but "pyvenv". Beyond the confusion of the name change, there's also a tool called "pyenv" muddying the waters.

The specifics - I started with https://packaging.python.org/ and was struck by how ambiguous the instructions were. Doing something as simple as declaring your package's version has 7 different options: https://packaging.python.org/single_source_version/. In the end, I got the most help from reading the guide's sample project... I only have to wonder about the licensing implications of that.

The infrastructure - because I was creating a project with multiple executables, I needed a way to start one from the other. Despite knowing that setuptools is responsible for generating the executables, I quickly found that there's just no way to find those executable paths programmatically.

Library choice - I needed an inotify library. I searched for "inotify", "notify" and "watch" on Pypi but had little way of distinguishing the results - the "weight" column is useless as compared to a rating system or even download count. Thankfully, I remembered about awesome-python.com which bridges the gap.

All told, it took me several hours to bootstrap the project, not even including things like testing. I'd say Python packaging has a way to go before I'd call it "good".

predakanga··on Airtel is sniffing and censoring CloudFlare’s traffic in India
I like the idea of a client-specified HSTS header - allowing users to control their risk directly (albeit through a browser extension) would definitely be a good thing.
predakanga··on Cloudflare's “Flexible SSL” Traffic Is Being MITMed by an Indian ISP
It's worth noting that "Flexible SSL" is the lowest security option available - Cloudflare provide access to a free private CA (https://blog.cloudflare.com/cloudflare-ca-encryption-origin/) in order to encourage people to secure their backend connections.

I wonder if they might help combat the illusion of security by providing a response header, well-known image URL or similar to indicate the backend SSL status.

predakanga··on Ubuntu Unity running on Windows 10
I've just spent some time experimenting with the state of X-on-windows.

It seems that there are two main options: - Rootless mode (the default install for VcXsrv), in which your windows are managed by the Win10 WM and integrate quite nicely

- Rooted mode, in which you can use your own window manager, but the windows are restricted to living inside a native Windows window. Using this in fullscreen on a virtual desktop provides a near-linux experience, but some remapping is required so you don't conflict with Windows' alt-tab, etc. Other bits of integration like copy&paste still co-exist nicely.

predakanga··on Go’s march to low-latency GC
I'm curious, have you tried viewing the streams or VODs through an alternate player?

I've found that I can almost always improve the smoothness of their content by using Livestreamer[0] to play it in VLC (or Kodi, more often)

[0]: http://docs.livestreamer.io

predakanga··on Thai government to MITM all internet communications
I'm not entirely familiar with sub-CA specifics, but CloudFlare (at the very least) has developed a system for deploying SSL with off-site private keys[0]; I imagine that could be used in a situation like this.

[0]: https://blog.cloudflare.com/keyless-ssl-the-nitty-gritty-tec...

predakanga··on Pebble 2, Time 2 + All-New Pebble Core
Their "Risks and Challenges" section spells it out:

  Pebble 2 and Time 2 is nearly complete. We’re currently ramping up at our factory and are ready to meet the estimated delivery times.
predakanga··on Pebble 2, Time 2 + All-New Pebble Core
The Core is also advertised as lasting through "5 days of 45 minute workouts" - I imagine that 3:45 battery life isn't too tough to achieve
predakanga··on Pebble 2, Time 2 + All-New Pebble Core
The Kickstarter claims that it has 4GB of internal storage that you can load podcasts/audiobooks on.

Besides that they say the Core runs "unlocked" Android 5.0, so I'd imagine you can load it up with whatever you like.

predakanga··on BLESS: SSH Certificate Authority for Ephemeral SSH Sessions
Besides the usual public/private key system, OpenSSH supports a less-used system called user certificates.

User certificates achieve the same purpose as your normal key but instead of pre-installing your public key on the server, you present a certificate during authentication and the server checks that it's signed by a trusted authority - it's more or less a PKI similar to that used for HTTPS, etc.

One of the key advantages of this approach is that the CA can enforce limits on the key, such as validity periods and disabling SSH features like port forwarding, binding a certificate to only run a particular command, or only allowing it's use from a specific IP.

BLESS appears to be a piece of infrastructure for autonomously signing these certificates - on it's own that gives you benefits like a proper audit log, but it seems that it's real purpose is to enable an SSH bastion host[0] to generate ephemeral keys for the servers it accesses.

[0]: http://blog.scottlowe.org/2015/11/21/using-ssh-bastion-host/

predakanga··on Google Chrome 51 disables HTTP/2 on most Linux distros due to old OpenSSL
It's definitely been discussed[1]. I last read about it when investigating the use of splice(2) in nginx; seems there are a few use-cases, but nothing really compelling.

[1]: https://lwn.net/Articles/666509/

predakanga··on Docker for Mac Beta Review
I'd certainly be interested - Docker ID: predakanga

Specifically, I'm interested in exploring integration with JetBrains IDE's docker plugins

predakanga··on A Government Error Just Revealed Snowden Was the Target in the Lavabit Case
Grandparent - the comment two posts up
predakanga··on Apple VP: The FBI wants to roll back safeguards that keep us ahead of criminals
Aye, it's called Device Firmware Upgrade (or DFU) mode, and it's specifically mentioned in the FBI's request:

> "The SIF will be loaded via Device Firmware Upgrade (“DFU”) mode, recovery mode, or other applicable mode available to the FBI."

predakanga··on Apple VP: The FBI wants to roll back safeguards that keep us ahead of criminals
You're right in that the system is vulnerable, but this doesn't mean that it's not "secure" in practical terms.

One could argue that the phone is secure because even Apple has no way of recovering your passcode, nor do they have a master key that might give access to your data. That's fairly secure.

On the other hand, the system is insecure because it can have updates applied (which is what the FBI wants Apple to do) without requiring user consent, only physical access.

Imagine that updates required a user to put in their passcode, or otherwise wiped all the encrypted data; it would be more secure, but is that enough? Theoretically, there are still ways of getting at the data - someone might find a bug in the software, or they might physically crack open the CPU to get at a piece of needed data.

Security is always a balance - we want to trust Apple as little as possible, but I know of no way to create an invulnerable system.

predakanga··on Sydney's fun police have put out the light of the nightlife
Over the past few years, there have been a number of deaths caused by unprovoked one-punch attacks ("king-hits", or now "coward punches"), possibly the highest profile being the death of Daniel Christie[0] after being attacked in Kings Cross, a hotspot for nightlife.

In the wake of these attacks, a number of new regulations and laws have been passed, with the stated aim of reducing alcohol-related violence. These regulations had been tested previously in Newcastle, the aforementioned deaths being an opportunity to pass them swiftly in Sydney.

Despite the supposed good intentions, there are a number of things that people question about the new laws, such as that the new regime is overcomplicated and often just silly (see anecdotes in this thread), or the rather suspect exemption of the local casinos from the laws, despite suffering the same problems[1].

Additionally, some people would argue that the response has been disproportionate to the actual problem - this infographic[2] from a violence support group[3] claims that there were only 20 deaths attributable to this kind of attack between 2007 and 2012.

Personally, I'm somewhat of a homebody and haven't been directly affected by the changes in the law, but I do consider them an overreaction and lament the effect they've had on Sydney's nightlife in general.

Having read the article in it's original location[4], where the author provides more figures to support their allegations, I was left feeling rather bitter about the whole situation, though I do agree that it was written extremely emotively and was intended to elicit that response.

On behalf of the other side, though, I would offer this[5] video clip - it's from this week, showing the Senior Australian of the Year Gordian Fulde responding to a question about the lockout laws, for which he was a strong advocate.

[0]: http://www.smh.com.au/nsw/daniel-christie-dies-following-kin...

[1]: http://www.smh.com.au/nsw/star-casino-may-be-the-most-violen...

[2]: http://opck.qhvsg.org.au/wp-content/uploads/sites/38/2014/09...

[3]: http://opck.qhvsg.org.au/

[4]: https://www.linkedin.com/pulse/would-last-person-sydney-plea...

[5]: https://www.youtube.com/watch?v=dDwoqkmZULI&t=40m55s

predakanga··on Boycott docker
There are a great many factual errors in this article and I'm sure someone will write a proper response, but I thought someone should address the most glaring:

- The repeated assertion that you can only use one process container is false. As an example, the most popular non-official base image (phusion/baseimage) provides a full system including SSHd and Cron

- No integration points

Docker provides an extensive event stream[0], as do their tools (such as Registry[1])

- "ps, ls, find [...] are useless here"

This depends on your system setup; on a standard Debian setup, all container processes are visible to the actual system. ps, top, netstat, etc will all work just fine

- "You can not easily and directly access your durable non-volatile data storage"

One of the most basic concepts in Docker is that of a "volume"[2]; essentially a directory that bypasses Docker's abstraction layers, for performance and durability. Additionally, using your normal storage is absolutely trivial[3] - if Linux can see it, you can use it.

- No authentication for images

This one's true to a certain extent. While most images aren't currently signed (that's a relatively new feature[4]), it's disingenuous to say that there's no authentication at all. Docker enforces the use of HTTPS to talk to registries, and requires HTTP authentication for registry accounts. It's not signing, but it's something.

Finally, just as it's a personal bugbear of mine, I would note that the userland proxy is a very real problem. It causes major issues if you need wide port ranges, spawning an instance of the proxy per port per container. There's work being done to remove it, but it can't go soon enough in my opinion.

There are a great many reasons you might not want to use Docker, but a lot of what's listed on this site just doesn't check out.

EDIT: Formatting

[0]: https://docs.docker.com/engine/reference/api/docker_remote_a...

[1]: https://github.com/docker/docker-registry/tree/master/docker...

[2]: https://docs.docker.com/engine/userguide/dockervolumes/#data...

[3]: https://docs.docker.com/engine/userguide/dockervolumes/#moun...

[4]: https://blog.docker.com/2015/08/content-trust-docker-1-8/

predakanga··on Introducing dumb-init, an init system for Docker containers
I can't speak to the others that have been mentioned in this thread (tini in particular seems to be identical), but the solution used by phusion/baseimage is written in python[0] - a C-based solution allows for lighter-weight containers

[0]: https://github.com/phusion/baseimage-docker/blob/master/imag...

predakanga··on HTTP/2 is here. Goodbye SPDY? Not quite yet
I've love to see CloudFlare enable admins to utilize Server Push without extra configuration on their backend.

My ideal situation is one where I can have my webapp specify it's dependencies through a spec such as Server Hints[1], and have them be requested and cached edge-side, turned into a Server Push to the end user.

[1]: https://www.chromium.org/spdy/link-headers-and-server-hint/l...

predakanga··on Using Docker-in-Docker for your CI or testing environment? Think twice
Definitely the preferred approach - it's worth noting, though, that you might provide access to the docker daemon over other transports as well.

Regarding the question of bind-mounting docker, it's worth knowing that there are still static binaries available at https://docs.docker.com/engine/installation/binaries/#get-th....

In the process of building a bamboo-agent container for image CI at the minute, the static binaries have come in very handy.

predakanga··on Spinnaker: Global Continuous Delivery by Netflix
While I agree with you generally, the linked script isn't really a fair criticism of Spinnaker.

The linked script is just a standard bootstrap script, used by Gradle - I won't defend the logic behind it (they have a page for that themselves: https://docs.gradle.org/current/userguide/gradle_wrapper.htm...), but you can see the same thing in just about any project's Autotools files (see https://github.com/ruby/ruby/blob/trunk/aclocal.m4)

predakanga··on Thinking about 'meta' torrent file format
Because the hashes that are stored in the .torrent operate on that unaligned data.

In practice, what this means is that you can't verify that two files of the same name and size but at different alignments within the consolidated data stream are identical; you can't compare hashes, can't do anything without first downloading. This opens the door to mass poisoning of swarms without even having to enter them in the first place.

There are potential solutions (including providing a broader hash per-file, as opposed to per-piece), but my statement was only that it's not that simple, not that it's impossible.

predakanga··on Thinking about 'meta' torrent file format
Unfortunately it's not as simple as that - when asking each other for data, the individual peers ask for a particular 'piece' of the torrent, where that piece isn't relative to a given file, but the torrent as a whole.

The files are concatenated into one long stream, and the piece number is an index to that, with no guarantees about alignment.

For instance, if you have a torrent (we'll call it 'X') with three files: the 4mb file 'a', the 3mb file 'b' and the 1mb file 'c', and two separate torrents ('Y' and 'Z') describing files 'b' and 'c' seperately, then the pieces would map something like this:

'Y' piece 1 -> 'X' piece 17 'Z' piece 1 -> 'X' piece 29

That's an absolute best case scenario though - in most cases, file sizes aren't quite as perfect as that (each being a multiple of the default piece size, 256kb). If 'b' just happened to be 1373kb, or anything else that wasn't a multiple of 256kb, then any files after it aren't addressable from other torrents.

predakanga··on Thinking about 'meta' torrent file format
There are many types of private tracker that would love to see this - for instance consider gaming trackers, where you may have a single .torrent for a large collection of ROMs, or DLC for a game. Consider TV trackers, tracking a whole TV season with a single .torrent file, or music trackers with discographies.

More importantly, a key concern on private trackers is swarm size - an extension like this would have the potential to expand the available peers on a given file, if the file exists in other swarms on the same tracker. Not a very common use case, but one to consider nonetheless.

← PreviousPage 5 of 5