HN user

deizel

23 karma

[ my public key: https://keybase.io/deizel; my proof: https://keybase.io/deizel/sigs/cs4WoNSffZSd-5e49gKFxWMw97_1_FT7v6PoKDVq0O8 ]

Verifying my Blockstack ID is secured with the address 14Rpnqpvi1BbbXkWinhB7fJyqea3ecoJGT https://explorer.blockstack.org/address/14Rpnqpvi1BbbXkWinhB7fJyqea3ecoJGT

Posts1
Comments20
View on HN

Given you'll want to activate a virtual environment for most Python projects, and projects live in directories.. I find myself constantly reaching for direnv. https://github.com/direnv/direnv/wiki/Python

    echo "layout python\npip install --upgrade pip pip-tools setuptools wheel\npip-sync" > .envrc
When you CD into a given project, it'll activate the venv, upgrade to non-ancient versions of Pip/etc with support for latest PEPs (ie. `pyproject.toml` support on new Python 3.9 env), verify the latest pinned packages are present.. it's just too useful not to have.
    direnv stdlib
This command (or this link https://direnv.net/man/direnv-stdlib.1.html) will print many useful functions that can be used in the `.envrc` shell script that is loaded when entering directories, ranging from many languages, to `dotenv` support, to `on_git_branch` for e.g. syncing deps when switching feature branches.

Check it out if you haven't.. I've been using it for more years than I can count and being able to CD from a PHP project to a Ruby project to a Python project with ease really helps with context switching.

As I understand it (though I could be wrong) - this repository (in relation to the old one) is intended to be a parent.

Rather than having just the Docker engine, it will coordinate docker, swarmkit, infrakit, linuxkit in a single project.

These will be swappable, so for example you could a) swap swarmkit for Kubernetes, b) swap linuxkit for Debian, c) swap infrakit with Terraform.

Like "Docker for Mac/Windows/AWS/Azure/GCE", etc. already exist - Moby will likely house all these variations and allow the creation of custom "Docker/Other for X/Y/Z".

I believe most of your questions have a (mostly) positive answer. Admittedly the Docker project moves fast, so I've tried to provide a link or two for each:

Are these signed with some sort of crypto and known-good keys, similar to package signing keys attached to a package repo, or are we taking Docker's word for it?

The official images are all signed with Notary[0] (released <2 years ago). The "Content Trust" feature makes use of TLS plus a number of keys[1]. It can be enabled in required environments to prevent the pulling of non-signed images (`export DOCKER_CONTENT_TRUST=1`).

I had to go 3 levels up from the link on the Docker Hub page to get to this one because most of the images are FROM:something.

There is a helpful Chrome extension, OctoLinker[2], that makes the `FROM parent` clickable (among other non-Docker things). I'm sure there are similar extensions, but this is the one I currently use.

a) still derived from some other upstream Dockerfile (must this file also be validated by Docker to qualify as an "official repo"?)

The `FROM` line in the Dockerfile would likely be the first thing to undergo scrutiny, for obvious reasons. Also, all the layers go through security scanning[3], some issues can be fixed[4] and others are tracked upstream (e.g. by Debian in the case of the Ruby image you linked[5]).

you end up with an image that is very bloated due to the way Docker's caching layer functions

You can now use `docker build --squash`[6] to combine multiple image layers while still benefiting from layer caching during builds. Also, the final image won't contain files that are added in previous layers and removed in later ones. (And with multi-stage builds recently merged, soon multiple inheritance will be easier.)

Is this "transparency" only the case on "official" images? As far as I can see Docker Hub just stores the pushed binary blob and not the Dockerfile required to build it

I would say groups or sole developers that want others to use their images will usually provide documentation and links to the Dockerfiles. Of course, this isn't always possible or desired (e.g. see closed-source projects like Windows Server Core[7], or the countless people using Docker Hub as a free image host.)

[0] https://github.com/docker/notary

[1] https://docs.docker.com/engine/security/trust/trust_key_mng/

[2] https://octolinker.github.io/

[3] https://docs.docker.com/docker-hub/official_repos/#how-do-i-...

[4] https://github.com/docker-library/official-images/pulls?utf8...

[5] https://github.com/docker-library/ruby/issues/117

[6] https://docs.docker.com/engine/reference/commandline/build/#...

[7] https://hub.docker.com/r/microsoft/windowsservercore/

... anyone who wants to enlarge its available message space ...

Bear in mind that the proof-of-work algorithm actually aims to reduce chatter on the network. Every ten minutes, a single Bitcoin full node broadcasts: "Hey, this is the latest state of the ledger, and you can trust it because [insert proof-of-work that was calculated out-of-band]." So, as the network's processing power scales up, the computation difficulty is also scaled up, so that the "message space" required for consensus remains constant.

That seems rather limited for a growing population's needs for communications around an increasingly valuable resource base.

While the way distributed consensus is achieved (see "Byzantine Generals' Problem") consumes most of the network's processing power, it's what makes the resource valuable. However, since this is done in parallel, it hardly consumes any of the network's bandwidth, freeing up that "message space" for important things like sending/receiving/propagating transactions, which are much less demanding computationally. All that is required there is some elliptic curve cryptography (ie. a valid public/private key pair + any low-powered device with correct software and an internet connection.)

Popcorn-app 12 years ago

XBMCtorrent approaches this by seeding the movie until you finish watching it. In my experience, movies start playing within the first minute and are finished downloading within the first hour (well, 10-20 minutes for popular content), meaning a large portion of the movie's running time is devoted to seeding 100% of the file.

https://github.com/steeve/xbmctorrent#doesnt-sequential-down...

If you are saying the size of your application could be reduced by rewriting it to using a framework (an existing one or one of your own creation), I think this is the point we are all trying to make here.

Assuming one uses all the features of a framework, the total complexity of my 24K line framework application (counting only code I've written) could be compared to that of a 321K line non-framework application (counting all the code in my project).

Thankfully I only have to write/maintain 8% of the codebase, as the remaining 92% is kept up-to-date by typing `composer update` on a weekly basis.

I'm not sure I agree. All the frameworks just mentioned do more or less the same thing and have comparable lines of code counts.

- Django - 215,000 LOC (.py)

- Ruby - 232,000 LOC (.rb)

- CakePHP - 240,000 LOC (.php)

Example: I'm working on a "large" CakePHP application (similar to Rails) with 24,000 lines of our own code, 57,000 lines of code from community plugins, and 240,000 lines of core framework code.

Update 18:15 09/08/2013-- "[We collect anonymised and aggregated MAC data -- we don't track individuals or individual MACs. The ORBs aggregate all footfall around a pod for three minutes and send back one annonymised aggregated report from each site so the idea that we are tracking individuals again is more style than substance," says Memari in an email. "There are applications in the future which Quartz focused on but during the trial period we are only looking at anonymised and aggregated MAC data".

He adds, "as some of the technology we will be testing will be on the boundaries of what is regulated and discussed it is our intention to discuss it publicly and especially collaborate with privacy groups like EFF to make sure we lead the charge on [adding necessary protections] as we are with the implementation of the technology"

Granted, but then you don't gain this:

for the first time, you could have high performance JavaScript on the server, thus potentially ending the nightmare of having “client side developers” who knew HTML/JavaScript and “server side developers” who knew .NET/C#/Ruby.

Say you set a session cookie that spans multiple subdomains (cookie domain = `.example.com`).

Now, if one of your authenticated users visits the wrong subdomain, they are directed to a server of name.com's choice.

That server now has access to your user's session ID (using Javascript or PHP or whatever to read the cookie).