Containers from first principles - <AUTHOR> https://fzakaria.com/2020/05/31/containers-from-first-principles.html <comment><USER2> > Each container should have at least the following isolated: network stack, > filesystem, processes

I'm going to go out on a limb here and say that in 99% of cases, there is no benefit to the network isolation. It adds unnecessary overhead and complexity, all so we don't have to configure individual services with a unique listening port. But the host that exposes the virtual networks still has to route something to them, so you still need to assign an arbitrary port and then do some port forwarding.

Going even further in the unnecessary abstractions category is process isolation. In most cases we don't need that either. From a security perspective, I trust the Linux kernel about as far as I can throw it, so I don't care what guarantees there supposedly are, container breakout and local privesc are (in my opinion) a near-certainty. So why are we forcing ourselves to jump through tons of hoops just to heap dump or ptrace() an application? The regular-old security mechanisms in Linux are enough for every other process on the system, why not container processes?

Filesystem abstraction (copy-on-write overlays and chroots) has been the killer feature of containers since day one. That is the one thing about containers that makes them useful: a reproducible application snapshot without dependency management hell. If we strip everything else about containers away, this is the one thing we need to keep the useful purpose of a container.

Docker threw in a lot of _extra incredibly_ extra features, such as the Dockerfile (no more configuration management!) and overlays and build cache and layers, etc. Nobody would be using containers if all these features weren't present in one solution, and we all owe them a big debt and thanks. But if we really strip the container down to its essential useful element, it's basically just a wrapper round chroot().

<comment><USER3> > _That is the one thing about containers that makes them useful: a > reproducible application snapshot without dependency management hell._

Joe Stein, of Kafka renown, calls containers "21st century tarball".

// I realize I've mentioned this before, in 2017's "My VM is lighter and safer than your container": [https://news.ycombinator.com/item?id=15614777](https://news.ycombinator.com/item?id=15614777)

<comment><USER4> My favorite is "static linking for millennials"

</comment></comment></comment><comment><USER5> I recently discovered systemd-nspawn and was amazed at how lightweight a basic container can be.

<comment><USER6> "Docker Without Docker" (2015) explains /sbin/init and systemd-nspawn. Systemd did not exist when docker was first created. [https://chimeracoder.github.io/docker-without- docker/](https://chimeracoder.github.io/docker-without-docker/)

<comment><USER7> That's not what I remember. Wikipedia backs up that recollection as well [0], marking systemd's initial release in 2010. Docker's initial release is listed as 2013 [1]. Maybe that was true of the dotCloud internal releases, and certainly, not all of the EL and other Linux distros had not adopted systemd during 2010 - 2013. Certainly after 2014 or 2015, systemd had spread to the major Linux distros so Docker could have chosen to take a systemd-based approach at that point.

[0] [https://en.wikipedia.org/wiki/Systemd](https://en.wikipedia.org/wiki/Systemd)

[1] [https://en.wikipedia.org/wiki/Docker_(software)](https://en.wikipedia.org/wiki/Docker_\(software\))

<comment><USER6> Are there other systemd + containers solutions?

"Chapter 4. Running containers as Systemd services with Podmam" [https://access.redhat.com/documentation/en- us/red_hat_enterp...](https://access.redhat.com/documentation/en- us/red_hat_enterprise_linux_atomic_host/7/html/managing_containers/running_containers_as_systemd_services_with_podman)

AFAIU, when running containers with systemd:

\- logs go to journald by default

\- there's no docker-compose for just the [name-prefixed] containers in the docker-compose.yml,

\- you can use systemd unit template parametrization

\- it's not as easy to collect metrics on every container on the system without a _read-only_ docker socket: how many containers are running, how much RAM quota are they assigned and utilizing? What are the filesystem and port mappings?

\- you can run containers as non-root

\- you can run containers in systemd timer units

\- you use runC to handle seccomp

... You can do cgroups and namespaces with just systemd; but keeping chroots/images upgraded is outside the scope of systemd: where is the ideal boundary between systemd and containers?

See this comment regarding _per-container_ MAC MCS labels: [https://news.ycombinator.com/item?id=23430959](https://news.ycombinator.com/item?id=23430959)

There's much additional complexity that justifies k8s / OpenShift: when would I want to manage containers with just systemd units?

</comment></comment></comment></comment><comment><USER8> Why do we need to use mount and pivot_root when we have chroot available? Am I missing something here about why those can't be used?

<comment><AUTHOR> You can escape chroot easily with relative paths pretty sure.

In Linux it never surprises me that there's X ways to do Y. A side effect of the OSS system and wanting to not break comparability.

This guide was meant for newbies so it doesn't broach on these security concerns.

</comment></comment><comment><USER9> I was so confused why Fareed Zakaria would be talking about containers until I Googled and read the name more carefully...

<comment><USER10> Heh, apparently you're not the only one. Way down at the bottom of the linked page:

"I'm a software engineer, father and wishful amateur surfer. If you've come seeking my political views; you've found the wrong Fareed."

<comment><AUTHOR> (I'm the author)

It's a long running joke that I've come to terms with.

</comment></comment></comment><comment><USER10> Favorited; thanks for this useful, well-written post!

<comment><AUTHOR> Thank you (author). This was a written version of a live tutorial I have my peers.

It's always challenging to translate shell focused teaching in prose but I'm glad it struck a chord.

</comment></comment><comment><USER6> > _Many people might think the word "container" has a specific meaning within > the Linux kernel; however the kernel has no notion of a "container". The > word has been synonymous with a variety of Linux tooling which when applied > give the resemblance of what we expect a container to be._

Before LXC ( [https://LinuxContainers.org](https://LinuxContainers.org) ) and CNCF ( [https://landscape.cncf.io/](https://landscape.cncf.io/) ) and OCI ( [https://opencontainers.org/](https://opencontainers.org/) ), for shared- kernel VPS hosting ("virtual private server"; root on a shared box), there was OpenVZ (which requires a patched kernel and AFAIU still has features, like bursting, not present in cgroups).

Docker no longer has an LXC driver: libcontainer (opencontainers/runc) is the story now. The LXC docs have a great list of utilized kernel features that's also still true for docker-engine = runC + moby. The LXC docs: [https://linuxcontainers.org/lxc/introduction/](https://linuxcontainers.org/lxc/introduction/) :

> _Current LXC uses the following_ kernel features _to contain processes:_

> _## Kernel namespaces (ipc, uts, mount, pid, network and user)_

>> _Namespaces are a feature of the Linux kernel that partitions kernel resources such that one set of processes sees one set of resources while another set of processes sees a different set of resources._ [https://en.wikipedia.org/wiki/Linux_namespaces](https://en.wikipedia.org/wiki/Linux_namespaces)

> _## Apparmor and SELinux profiles_ > [https://en.wikipedia.org/wiki/AppArmor](https://en.wikipedia.org/wiki/AppArmor) > / [https://en.wikipedia.org/wiki/Security- > Enhanced_Linux](https://en.wikipedia.org/wiki/Security-Enhanced_Linux)

udica is an interesting tool for creating SELinux policies for containers.

Is it possible for each container to run confined with a different SELinux label?

> _## Seccomp policies_ > [https://en.wikipedia.org/wiki/Seccomp](https://en.wikipedia.org/wiki/Seccomp)

See below re: Seccomp.

> _## Chroots (using pivot_root)_ > [https://en.wikipedia.org/wiki/Chroot](https://en.wikipedia.org/wiki/Chroot)

Chroots and symlinks, Chroots and bind mounts, Chroots and _overlay filesystems_ , Chroots and SELinux context labels.

FWIU, Chroots are a native feature of filesystem syscalls in Fuchsia.

> _## Kernel capabilities_

[https://wiki.archlinux.org/index.php/Capabilities](https://wiki.archlinux.org/index.php/Capabilities) :

>> _" Capabilities (POSIX 1003.1e, capabilities(7)) provide fine-grained control over superuser permissions, allowing use of the root user to be avoided. Software developers are encouraged to replace uses of the powerful setuid attribute in a system binary with a more minimal set of capabilities. Many packages make use of capabilities, such as CAP_NET_RAW being used for the ping binary provided by iputils. This enables e.g. ping to be run by a normal user (as with the setuid method), while at the same time limiting the security consequences of a potential vulnerability in ping."

> _## CGroups (control groups)* > [https://en.wikipedia.org/wiki/Cgroups](https://en.wikipedia.org/wiki/Cgroups)

Control groups enable per-process (and to thus per-container) resource quotas. Other than limiting the impact of resource exhaustion, cgroups are not a security feature of the Linux kernel.

Here's a helpful explainer of the differences between some of these kernel features; which, combined, have become somewhat ubiquitous:

From "Formally add support for SELinux" (k3s #1372) [https://github.com/rancher/k3s/issues/1372#issuecomment-5817...](https://github.com/rancher/k3s/issues/1372#issuecomment-581797716) :

> _[https://blog.openshift.com/securing- > kubernetes/*](https://blog.openshift.com/securing-kubernetes/*)

>> _The main thing to understand about SELinux integration with OpenShift is that, by default, OpenShift runs each container as a random uid and is isolated with SELinux MCS labels. The easiest way of thinking about MCS labels is they are a dynamic way of getting SELinux separation without having to create policy files and run restorecon.*

>> _If you are wondering why we need SELinux and namespaces at the same time, the way I view it is namespaces provide the nice abstraction but are not designed from a security first perspective. SELinux is the brick wall that's going to stop you if you manage to break out of (accidentally or on purpose) from the namespace abstraction._

>> _CGroups is the remaining piece of the puzzle. Its primary purpose isn't security, but I list it because it regulates that different containers stay within their allotted space for compute resources (cpu, memory, I /O). So without cgroups, you can't be confident your application won't be stomped on by another application on the same node._

From Wikipedia: [https://en.wikipedia.org/wiki/Seccomp](https://en.wikipedia.org/wiki/Seccomp) ::

> _seccomp (short for secure computing mode) is a computer security facility > in the Linux kernel. seccomp allows a process to make a one-way transition > into a "secure" state where it cannot make any system calls except exit(), > sigreturn(), read() and write() to already-open file descriptors. Should it > attempt any other system calls, the kernel will terminate the process with > SIGKILL or SIGSYS.[1][2] In this sense, it does not virtualize the system's > resources but isolates the process from them entirely._

... SELinux is one implementation of MAC (Mandatory Access Controls) that is built upon the LSM (Linux Security Modules) support in the Linux kernel. Some distros include policy sets for Docker hosts and lots of other packages that could be installed; see: "Formally add support for SELinux" (k3s #1372) [https://github.com/rancher/k3s/issues/1372#issuecomment-5817...](https://github.com/rancher/k3s/issues/1372#issuecomment-581797716)</comment>


Bare Metal Raspberry Pi BASIC - <AUTHOR> http://highcaffeinecontent.com/rpi/

<comment><USER2> This sort of already exists in the form of RISC OS Pico: [https://www.riscosopen.org/content/sales/risc-os- pico](https://www.riscosopen.org/content/sales/risc-os-pico)

(You don't have to buy it, just download the zip.)

A bare-bones version of RISC OS with the GUI desktop stripped out, leaving only the command line ("supervisor") prompt, and ARM BASIC V, which is arguably still the most featureful version of BASIC: [https://en.wikipedia.org/wiki/BBC_BASIC#Acorn_Archimedes_.28...](https://en.wikipedia.org/wiki/BBC_BASIC#Acorn_Archimedes_.28RISC_OS.29)

A unique feature of ARM BASIC is the presence of an inline assembler allowing users to write ARM assembly language programs. The assembler is fully integrated into the BASIC interpreter and shares variables with it, which can be included between the [ and ] characters, saved via ★SAVE and ★LOAD, and called via the CALL or USR commands. This allows developers to write not just assembly language code, but also BASIC code to emit assembly language, making it possible to use code-generation techniques and even write simple compilers in BASIC.

<comment><USER3> Yes, you definitely want a proper BASIC, and BBC BASIC V would just about do it. It's actually a decent BASIC, not some unstructured POS, and it's got an integrated assembler. So even if you're an assembly language programmer, you can treat it like an assembler with a fancy macro language.

It does smell of the 1980s, sporting line numbers and RESTORE/DATA and implicit variable declaration. But it's a reassuring, nostalgic smell, even if not a healthy one, a bit like four star petrol, perhaps, or stale tobacco smoke. A far cry from its Microsoft BASIC equivalent, with its two-char variable names and single-dimension arrays: nothing there but the stench of ordure and corpses.

</comment></comment><comment><USER4> Fantastic! I've been meaning to do this myself, but glad to see that it exists.

I believe that this kind of single-purpose OS can be even easily created using an unikernel such as mirage, but that removes part of the fun of course.

</comment><comment><USER5> Too bad the SoC in the RPi is far more undocumented than the C64, and even experimentation is unlikely to yield much. PEEK/POKE were probably the most fun commands for doing interesting things from BASIC.

</comment><comment><USER6> Awesome! How do you boot up the processor, do you still have to use the GPU firmware blob to get the processor to do anything?

edit: Looking at the source, yeah you have to use Broadcom's firmware.

</comment><comment><USER7> Oh man, this reminds me of my Mattel Aquarius days! Numbering every line, leaving gaps in between line numbers incase I wanted to add something in between. So much work. Now I just need a terrible rubber keyboard and I'll be set!

</comment><comment><USER8> When can I play Gorillas[1] on it?

[1][http://en.wikipedia.org/wiki/Gorillas_(video_game)](http://en.wikipedia.org/wiki/Gorillas_\(video_game\))

<comment><USER2> Now. [http://store.raspberrypi.com/projects/fastdosbox](http://store.raspberrypi.com/projects/fastdosbox)

<comment><USER8> I don't think this app will run on RPi BASIC

</comment></comment></comment><comment><USER9> I'd love a full c64 emulator on a Pi :D

<comment><USER10> [http://www.commodorepi.co.nr/](http://www.commodorepi.co.nr/)</comment></comment>


Multitouch Away3D + Flash 11 Incubator Build - <AUTHOR> http://www.youtube.com/watch?v=jbF6Tvv2aCo

<comment><USER2> as super impressive as this is, i just went them to get flash working on tablets.</comment>


Peter Sunde arrested in Sweden - <AUTHOR> http://www.aftonbladet.se/nyheter/article18983493.ab <comment><USER2> From Google translate ...

Peter Sunde arrested in Skåne

One of the brains behind the file sharing site The Pirate Bay has been arrested.

Peter Sunde, 35, was arrested today in a raid in southern Sweden.

\- He has been on the run since 2012 , says Carolina Ekéus , press contact at NCIS .

Rikskriminalen state that Peter Sunde has been wanted by Interpol and that he is now arrested.

\- He was arrested for him to serve a prison sentence of eight months. It's about the Pirate Bay case , says Caroline Ekéus .

Expressen says that the raid took place at a farm in Skåne Tonganoxie . According to the newspaper shall Polish police and skånsk picket police have participated in the arrest . Sentenced to prison

Peter Sunde were sentenced for aiding copyright infringement along with two other men in the Svea Court of Appeal in November 2010. Together sentenced Pirate Bay founders in addition to prison to pay damages of around 46 million.

In its judgement, the Court of Appeals held that the men through file-sharing site The Pirate Bay " has facilitated illegal file sharing in a way that lead to penalties for those who run the service ."

Peter Sunde has repeatedly applied for revision of the Supreme Court , most recently in February this year. He also refers to new cases from the European Court which deals with how to assess aiding and abetting . "Deeply unhappy '

Peter sundes defender Peter Althin says to Aftonbladet that he still finds it difficult to accept the verdict .

\- Has a final judgment , you have to enter and serve this . I kväljer them but I still think that the judgement is deeply unfortunate and inaccurate when it comes to him. There was nothing that showed that he had an active part in this as he was sentenced for, says Peter Althin.

He says that an open prison now awaits Peter Sunde.

\- It does not get Kumla Security or something like that. It will be a little more open prison and that will happen pretty soon, says Peter Althin.

<comment><USER3> "Together sentenced Pirate Bay founders in addition to prison to pay damages of around 46 million."

Yeah, that's never going to happen. The prosecutor in their case came up with some fantastical amount of money TPB is supposed to have made, but it's complete nonsense (see the documentary TPB: AFK for details).

<comment><USER4> Can he just fill for bankruptcy to clear the damages?

<comment><USER5> Without knowing Swedish law, I'm rather certain he cannot.

Personal bankruptcy is usually out of the question for debts arising from unlawful behaviour. You cannot evade damages or a penalty imposed by a court just by filing bankruptcy.

Imagine a legal system where you could. Preposterous.

<comment><USER6> @sergiosgc: Which country is that?

<comment><USER7> Sounds like Norway.

</comment></comment></comment></comment></comment></comment><comment><USER8> Relevant: If you haven't seen it, TPB: AFK is a fantastic documentary.

[https://en.wikipedia.org/wiki/TPB_AFK](https://en.wikipedia.org/wiki/TPB_AFK)

[http://watch.tpbafk.tv/](http://watch.tpbafk.tv/)

<comment><USER9> Not enough to fully understand the situation, but great documentary. Highly recommended. Freely available, of course, so here's a magnet link, for those unwilling to open their PirateBrowser / to bypass TPB censorship.

        magnet:?xt=urn:btih:98a2faaf2393aa4494bdc4f01f50ec3d010de8cf&dn=TPB%20AFK%202013%20The%20Pirate%20Bay%20Away%20From%20Keyboard%20SimonKlose&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ffr33domtracker.h33t.com%3A3310%2Fannounce&tr=udp%3A%2F%2Ftracker.istole.it%3A80%2Fannounce&tr=udp%3A%2F%2Ffr33dom.h33t.com%3A3310%2Fannounce&tr=http%3A%2F%2Fgenesis.1337x.org%3A1337%2Fannounce&tr=udp%3A%2F%2F11.rarbg.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.com%3A2710%2Fannounce

<comment><USER10> Would you mind putting your magnet link in a indented code block? The non- breaking string of chars is causing the page to go wonky.

<comment><USER9> Thanks, done!

</comment></comment></comment></comment><comment><USER11> Very clever to arrest him _after_ the elections. Before the elections this would have been a much bigger issue and possibly would have gained votes for the Swedish Pirate Party resulting in more seats in the European Parliament for them.

<comment><USER12> Why would the police give two shits about the EU election? I don't know what corrupt hellhole you are from, but Sweden doesn't work like that.

Not that it would have been an issue. The Pirate Bay trial is old news and it's hardly a major scandal that a convicted man has to serve his time. As it is, the Pirate Party was wiped out and were far from getting a seat.

<comment><USER13> > Why would the police give two shits about the EU election?

Because police are part of the government, and the government of Sweden has obvious reasons to care about EU elections.

<comment><USER14> Ideally police should just enforce the laws on the books and have no government influence of their actions, aside from the changing of laws.

<comment><USER15> No worries! It's not the government that is the major influencer; for example, in 2006, you had Henrik Pontén¹ of the Svenska Antipiratbyrån physically leading the raid against The Pirate Bay host and Jim Keyzer², the lead investigator for the case, was employed by Warner Brothers during the investigation.

1: [http://en.wikipedia.org/wiki/Henrik_Pont%C3%A9n](http://en.wikipedia.org/wiki/Henrik_Pont%C3%A9n)

2: [https://torrentfreak.com/warner-confesses-pirate-bay-cop- com...](https://torrentfreak.com/warner-confesses-pirate-bay-cop- compromised-080605/)

</comment></comment></comment></comment></comment><comment><USER16> Gottfrid Svartholm is currently being held in solitary confinement in Denmark, Peter Sunde is arrested in Sweden. I thought these countries were like role models.

<comment><USER17> Not trying to be a troll, but aren't these people essentially supporting theivery on a massive scale? I've never understood why so much of the Internet community thinks downloading software and/or movies that is meant to be paid for is ok.

<comment><USER18> Sharing is at worst a victimless crime. At best.. well I don't know about best but I'd say something about living in the future where we have the technological means to give people anything they need or want. That if something is wealth. And progress.

Thievery is an inappropriate description of making copies.

<comment><USER19> I'm not making any judgement on whether it should be legal/illegal etc. but I think saying it's a victimless crime at worst is potentially incorrect.

In the worst case, it's absolutely possible that you share something with someone, A, which A would have bought and then they don't buy it. In the worst case they don't in the future buy anything from the author/creator etc. In the worst case I'd consider that author/creator a victim in this case, they would have been paid whatever amount A would have paid but now haven't been.

I'm not arguing that's often the case (I don't think it is) but to absolutely rule it out feels like too much of a simplification. There can be a legitimate victim, it almost certainly isn't the person suing you and in most cases there probably isn't - but there can be I think.

<comment><USER20> It is not much of a market argument to say "there is this legal framework to artificially restrict information transfer, and if people don't obey it someone might not make revenue from nothing".

Most of the IP abolitionists (myself included) would just argue you should be doing free market information creation, and charging for scarce resources and not erecting some artificial framework mess to destroy a potentially enlightening capability of the information age. If you want to make a movie, seek funding to make the movie. If you want to write software, seek those who want software and ask them to give you money to make it, etc.

That is really inevitably the only way this ends, because IP is incompatible with the modern forms information can take. The ease, rate, and speed of transfer marginal expenses have collapsed to zero, so treating it as a scarce good is only systemically harming society with artificial scarcity.

<comment><USER19> I agree with you. I think it's inevitable that it will go that way, the current system is impractical in the modern world. I agree that artificial scarcity is of no benefit to society. The only thing I disagree with is that there's no possible way for piracy to have a legitimate victim, that feels like too much of a simplification to accept.

</comment></comment></comment></comment></comment></comment><comment><USER21> OK so I never knew Peter, but I knew Gottfried. And I live next to Laos and Cambodia. Full disclosure: I am presently in Luxembourg, solidifying legal situation for cryptographic currencies, and we are kicking ass.

Just this morning I was reading Peter's blog, including the Swedish parts, and although I don't have the background on the (dis)agreements between the various TPB founders, I know they are all legit people.

The fact that Peter got smacked-down is clearly a result of his political positioning, and nothing to do with anything else.

The reality we are living in is this: _keep quiet, shut up , and you are OK. Start talking like I am now, and they target you_. Well, fuck you US authorities. We are fucking free, and we will keep talking, and we will fucking send you to the graveyard of anachronisms that you belong in.

</comment><comment><USER9> Too bad he didn't made to the EU Parliament.

That makes two out of the three in jail, which is very saddening. I wonder what will happen to Frederik: I doubt they will just let him be. They are beating three to scare millions.

<comment><USER22> He's in Laos, and according to TPB AFK he will stay there wanking for 5 years.

<comment><USER9> Yes, I know (one on and one off). They can catch him anyway, like they did with Gottfried.

</comment></comment></comment><comment><USER23> Why would Polish police take part in a raid in Sweden?

<comment><USER24> I was also wondering. The reason is that he left Sweden and apparently moved around quite a bit. He is reported to have been residing mostly in Berlin and his girl-friend lived in Gdansk, Poland.

[edit: addition] The reports are ambiguous; it sounds like what they mean is: the Swedish police collaborated with the Polish police to track him down.

Source (in Swedish): [http://www.expressen.se/kvallsposten/pirate-bay- grundaren-gr...](http://www.expressen.se/kvallsposten/pirate-bay-grundaren- gripen-av-piket-polis/)

<comment><USER25> That's most likely what happened. Search and Identification branch of the Crime Bureau (?) worked with Sweden in the past - these guys [http://www.policja.pl/pol/kgp/biuro-sluzby-kryminaln/bsk- str...](http://www.policja.pl/pol/kgp/biuro-sluzby-kryminaln/bsk-struktura-i- zadani/bsk-wydzial-poszukiwan/20883,dok.html).

</comment></comment></comment><comment><USER26> I use google's 'filetype:epub' to download ebooks, whether or no they have "copyright" or not. When will Larry & Sergey go to prison for me doing that?

</comment><comment><USER27> It looks like he was the Pirate Party candidate for European parliament in recent elections, but was not successful. It also means, that his immunity from prosecution as a candidate has just finished and the arrest was possible.

Quote from the article: "In Finland, where Pirate Bay founder Peter Sunde sought a seat, counting the Party secured just 0.7 per cent of the vote." [http://www.theregister.co.uk/2014/05/26/european_voters_make...](http://www.theregister.co.uk/2014/05/26/european_voters_make_pirate_party_walk_the_plank/)

</comment><comment><USER28> Skåne! He should have headed to Södertälje they never would have found him there ha. In all seriousness, this is heck of a way for old Sverige to stay in the press don't you think? (and this is coming from a yank who loves the place like a second home)

</comment><comment><USER29> I wonder what impact this will have on the development of [https://heml.is/](https://heml.is/) …

<comment><USER9> Me too (they are in closed beta, at the moment, as far as I know). But I have to admit that I don't appreciate hemlis: a solution like TextSecure, i.e. allowing federation, looks better to me.

</comment></comment><comment><USER14> So what's the URL now? Is it thepiratebay.org, or thepiratebay.se? It jumped around so much that it's hard to keep track.

<comment><USER30> Google usually finds the right one ([https://www.google.com/search?q=piratebay](https://www.google.com/search?q=piratebay))... but of course that could change.

</comment></comment><comment><USER31> Aftonbladet is one of the worst tabloids in Sweden a cant say i trust any details in their articles.

<comment><USER32> Like for example the simple fact that Peter never founded TPB, he merely spoke for it once it became huge.

</comment></comment><comment><USER33> Ufda.

<comment><USER2> Is this what you mean?

        Uff da (sometimes also spelled huffda, uff-da, uffda,
        uff-dah, oofda, ufda, ufdah, oofta, uf daa, or ufta)
        is an expression of Norwegian origin adopted by
        Scandinavian-Americans in the 19th century.

        ...

        The expression has lost its original connotation, and
        it is increasingly difficult to specify what it means
        now in America. Within Scandinavian-American culture,
        Uff da frequently translates into: *I am overwhelmed.*

<comment><USER33> Wow. I am not sure what all the downvotes are about. I am an American who is married to a Norwegian and have lived in Norway for a few years now. I never used the phrase when I lived in the US, but picked it up here.

"Ufda" is a phrase commonly used here to mean something along the lines of "that's too bad" or "how unfortunate," with undertones of sympathy (like when you would say "ouch"). The spelling is kind of besides the point, because it is generally a spoken phrase.

But if folks want to get really picky about authenticity, and apparently they do, "Ufda" is how my Norwegian friends spell it in text messages. Although, I am sure alternate spellings would be acceptable too.

I meant it here to say simply that it was too bad this guy got arrested, with undertones of sympathy and a bit of Scandinavian solidarity. Norway and Sweden are only jokingly rivals, but are actually very friendly.

Something obviously got lost in translation, probably due to the American- centric nature of this forum.</comment></comment></comment>


Ask HN: As a software developer how do you maintain your health? - <AUTHOR> As a software developer, I have a sedentary lifestyle because of that I got belly fat. Drinking coffee with sugar and sitting 10-12 hour is usual for me and all other bad habits you can guess - late night, churning snacks in the night. I go for running alternate days but it is not helping with my belly fat and I feel a little lazy after work.<p>What tricks did you have found and adapted and have for software developers to maintain their health? <comment><USER2> You don't need to go to a gym, But you do need to workout. Push-ups, sit-ups, and buy a curling bar with some weights--nothing crazy. Do a couple of sets of presses, some curls, and two other types of weight lifting exercises consisting of what ever else you want. Do it fast, and a lot of reps. 3 or 4 times a week is enough, and once you get into it only takes 20 - 30 minutes.

Also, walk fast; really fast, and run up the stairs whenever you can. I work at a big campus so that helps with the fast walking.

Eat vegetarian a few times a week, and as others have said; don't drink sugar, and be wary of the bread and potatoes.

Not bragging here but I'm 59 years old and Friday morning I banged out 140 pushups; a set of 30, a 40, and then I did 70 (my most ever. Typically I do a set of 30 and two 40's, but I will do 50 for the last set at times if they are coming easy enough. And I'll max out once in a while--formerly 60 was my high).

I only got back into working out around 2.4 years ago so its never too late.

<comment><USER3> That's impressive. I'm early 40s and have found doing this kind of exercise really beneficial recently.

I think push-ups are great for posture and all round conditioning. I could barely do 10 in a row a few years back, but now do 60-100 over 3 sets a few times a week.

I also do kettle bell swings and maybe some sit ups and this seems to complement the other exercises I do really well.

Like you I like to do lots of walking quite quickly and get out cycling or kayaking at least once a week.

<comment><USER2> You the man! Remember you are only in competition with yourself.

Btw: protip, I don't count to 70 or 60 and usually not even 40. I'll typically count to 30; than either just additionally count to 10, or more often just to 5, and than add the sums as I go--but then reset to the lesser count as I continue that set of push-ups. A great psychological trick, at least for me ;) .

GL!

</comment></comment></comment><comment><USER4> * I have a £200 sit-stand desk and alternate at least once between sitting and standing.

* most mornings, I put on death metal and do a 15-minute run while I imagine myself carrying a defibrillator or fighting orcs or something dramatic. I intersperse pushups, squats, and pull-ups in that.

* I have an Instant Pot and a chest freezer and a kitchen setup to reduce the cognitive cost of cooking. I usually eat leftovers for lunch.

* For snacks, I try to go with apples or carrot sticks for the satisfying crunching feeling.

* Most months, I go contra dancing at Cecil Sharp house, which is healthy simultaneous dose of physical touch, social interaction, monofocused mental stimulation, and aerobic exercise.

</comment><comment><USER5> I've replaced regular Cola with Cola Zero (yeah, I'm aware that it's not healthy as well but..) while keeping eating one or two candies while drinking black coffee and I've stopped gaining fat. Once I've started working out (running, ~5km, 1-3 times per week) and doing some pushups (nothing fancy, just 10 of them at the end of the day before shower) and here I am, one year later, feeling much better, with 13kg less :)

(before: ~93kg, now: ~80kg)

</comment><comment><USER6> You can't out-exersice a bad diet. Develop lean muscle. Sleep well.

</comment><comment><USER7> Pay close attention to your diet and sleep. Try avoiding sugar and high carb foods. Try journaling your sleep quantity and quality, your moods and food you eat. Try finding pattens in the journal and keep experimenting till you find a combination that works for you.

I tried to fix my sleep few months ago. Written more about it here: [http://avichalp.me/2019/04/06/debugging- sleep.html](http://avichalp.me/2019/04/06/debugging-sleep.html)

</comment><comment><USER8> I do not work longer than 8 hours a day. I have a regular sleep schedule (10PM to 7AM), do strength training 3 times a week. I _try_ to eat properly, stay away from the company fridge which is stuffed with sugary drinks and beer. I try not to drink coffee after 1PM or so to not affect my sleep. I also try to not write any code after work hours, unless it's low work intensity in the office around that time.

</comment><comment><USER9> I don't use this, but I recently saw the StrongLifts 5x5 [1] workout plan mentioned in an HN comment. Looked interesting, straightforward, and approachable for any level of practice.

[1] [https://stronglifts.com/5x5/](https://stronglifts.com/5x5/)

</comment><comment><USER10> Intermittent fasting, keto, no sugar at all.

</comment><comment><USER11> I set some personal rules:

Sleep \- I go to bed at the same time every night (10pm). Exercise \- I go to the gym 3-5 times per week (every other day). Diet \- No junk food. I can't stand the wasted plastic or the calories. Di \- No coffee after noon.

</comment><comment><USER12> There are no tricks. Being healthy and slim is hard work. Hit the gym, run more, eat less.

<comment><USER13> There are _some_ tricks, so to speak. I purposefully will only live a 30 minute walk to work. While I realize not everyone can do this, I make it such a high priority that I do sacrifice a lot to ensure it happens. I also try to ensure a gym is between work and home. This way on average I walk an hour a day to and from work, and the fixed cost of adding a 30 minute workout is essentially zero. So 1.5 hours a day is spent combined physical activity and commuting. It makes exercise very cheap.

</comment></comment><comment><USER14> I go for a short walk at the end of every hour. I have found my fitbit pretty useful in reminding me to do at least 250 steps every hour. The number might be small but i usually end up doing more than that once i get going.

</comment><comment><USER15> A few of the things I do have the most impact: make sure I lift / exercise regularly, skip breakfast / cut food off at a certain time, and avoid drinking calories (stick to black coffee, no soda).

</comment><comment><USER16> One easy change is removing sugar and just drink coffee black.

<comment><USER17> I drink my coffee black and I work from a bench with a lab stool instead of chair. I found you get used to the black coffee and don't miss the sugar rush yo yo. And being on a stool encourages you to get up and move around the office. Like when stuck. Instead of sitting, slip off the stool and got for a walk around the block.

<comment><USER18> Have you noticed any back discomfort from sitting in a stool or does the increased motion offset it?

<comment><USER17> My stool it about 30 inches off the ground with a bar to rest your feet on. I find I tend to sit straight with my legs slightly down which is comfortable and the bench is the right height so that my hands end up just gently resting on the keyboard.

I started out working on a lab bench in college working as a tech and generally dislike desks and office chairs.

</comment></comment></comment></comment><comment><USER19> I got it too. there was a time when I was happier, having lots of sex ( like light aerobic exercise ) , and just naturally eating less.

my theory is that it starts with the mind. happy mind, light exercise, naturally eat less, and I lost weight.</comment>


Ask HN: Passive Income Suggestions? - <AUTHOR> Please share suggestions of whats worked for you and what hasnt <comment><USER2> Buy either a larger multi bedroom house or a multi family home with 5% down payment and get roommates.

Charge roommates for rent who mostly cover either all or 50%+ of your mortgage.

Live in it for a year (you have to reside for a year because 5% down gets you owner occupied financing), then buy a 2nd place, move out of the first place, and backfill your bedroom with another tenant.

Repeat every year for 3-5 years, and you'll have 3-5 properties with tenants. if you do it right, you'll cash flow right away.

</comment><comment><USER3> Buy VT or a similar broadly diversified equity index fund, it can't get more passive than that. I have all my savings invested that way.

<comment><USER4> what happens when you need to pay for $TragicLifeEvent and are forced to liquidate your ETF position in a downturn?

<comment><USER3> I should have probably said that I also keep 6-9 months of living expenses in a traditional savings account for emergencies. It didn't even occur to mention it since it's a minuscule portion of my net worth (< 2%), compared to the amount that's invested in the market, but that's definitely a good observation and I should have specified that to begin with.

<comment><USER5> >6-9 months of living expenses in a traditional savings account for emergencies

Geez seeing comments like this make me wonder if I'll ever be debt free enough to have nearly a year of living expense to fall back on. I've barely got enough in my savings account for 2 months of bills and loan payments.

<comment><USER3> If it makes you feel any better, I had to travel 6k miles from my home country to Silicon Valley in order to reach this level of financial stability, so I had to do some significant sacrifices (e.g. not being able to stay close to friends and aging parents, ...).

</comment></comment></comment></comment></comment><comment><USER6> A couple of suggestions:

\- Affiliate websites. These are basically content websites with built in affiliate links. You try to rank your content for certain keywords in search results

\- Real estate. I've been a real estate investor since 2008 and I can say that it's probably the most well known way of building passive income. Simply put, you buy a house, rent it out and continue the process. However, it's a long term game because of the amount of starting capital required to buy. I wouldn't recommend it if you don't have much money to start because of the repairs and maintenance you will be responsible for as tenants continue renting.

I hope this helped. Let me know if you have any questions.

</comment><comment><USER7> Did you hear about Amazon FBA?

You can source a product from a Chinese manufacturer and sell it on Amazon: 1.) find a niche that you find interesting before you source 2.) you bulk buy this product and ship it directly to Amazon warehouse 3.) make attractive Amazon listing and put much effort into your launch so that you can get your product ranked 4.) with a successful launch and a quality product you can get to the first page of Amazon 5.) just sit back and refill orders

It has some cons as well, but it is definitely viable way how to create passive income. The cons are following: \- the fees for Amazon FBA including monthly seller fee, shipping to warehouse, warehouse storage each month, long term warehouse storage, shipping to customer, Amazon referral fee \- you are dependent on one platform \- you are not building your own brand (but you can start it afterwards if you see FBA is working for you)

</comment><comment><USER8> \- Web hosting

\- Write rich, good quality articles comparing services that pay recurring comissions. I made $1000+ on one lousy blog post like that. One service keeps paying me monthly recurring commission for the last 15 yrs for referring them few customers.

<comment><USER9> Could you expand on your second point? What do you mean by services paying recurring commissions? Do you have any examples or ways to identify opportunities like this?

<comment><USER10> > one lousy blog post

I keep hearing that guy's voice - the one with the animated fake hand-written white boards that seems to sell _everything_ online from stock tips to home business deals to manly man ways to be a man - when I read phrases like this. It immediately means "prepare to be sucked in."

"I got rich by writing one simple advertisement. AND SO CAN YOU!" followed by three hours of blah blah blah (no content) until you either give up, or pay up out of desperation to finally get that so-called "tip".

And if it took 15 years to make that thou, I'd pass.

</comment></comment></comment><comment><USER11> DeFi apps like [https://compound.finance](https://compound.finance)

<comment><USER12> Not really good idea if you don't have much money because of low interest rates.</comment></comment>


John Carmack: My personal legal disputes are over - <AUTHOR> https://twitter.com/ID_AA_Carmack/status/1050464667326443520 <comment><USER2> I'd love to see a Joe Rogan interview with him.

<comment><USER3> I'd prefer him to just hold a talk somewhere for 2-3 hours like he used to. I don't see the point in somebody like Joe Rogan interviewing him, especially since Carmack's most interesting ideas and insights are of such technical nature.

<comment><USER4> The utility I get from Joe Rogan interviewing experts is that he asks a lot of clarifying questions to help bring the material back down to a more understandable level. I love Carmack's talks because I am in the same field and can usually follow him, but I cannot imagine a layman being able to keep up.

<comment><USER3> Why do you want a layman to keep up with him? What an utter waste. He knows his audience and that's great.

<comment><USER5> Relax... he can do both, talk to laymen and his specialized audience.

<comment><USER3> No, what makes Carmack interesting is his discussions about highly technical topics at a moderately advanced level. There are plenty of people who are more than happy to explain what functional programming is at a basic level for laypersons. Carmack is not that.

I assume you're American because of your need to dumb everything down instead of respecting intellectualism as is.</comment></comment></comment></comment></comment></comment>


Sam Altman on the Elements of a Successful Startup - <AUTHOR> http://techcrunch.com/2015/03/04/y-combinators-sam-altman-on-the-elements-of-a-successful-startup/?ncid=rss

<comment><AUTHOR> I feel that passion is sometimes overrated.

I see a LOT of people with a LOT of passion with their idea, but almost no ability to execute on that idea - which, by the way, sucks.

So, even if passion might be seen in every successful startup, I bet it's not the most important trait. You see a lot of passion in many of the failures too.</comment>


Merb/Rails merge, or Why should merbists be happy? - <AUTHOR> http://merbist.com/2008/12/25/merb-rails-merge-or-why-should-merbists-be-happy/

<comment><USER2> "Option 1 would keep the competition alive, but now you have 2 groups of people trying to do the same thing and being better at different aspects. The community gets confused and communication breaks."

The community gets confused? Give us more credit than that. We're not helpless babes in the woods. We're faced with making implementation decisions every day. Which language? Which database? Which framework? Which http server? Which hosting provider? Which linux distro? And, soon, which Ruby VM to use? And you know what? Somehow... somehow, we get by. We evaluate our choices (being glad that there are choices), and we make decisions. Can anyone out there honestly tell me that they wish there were no choices to make? Granted, too many choices can be a bad thing, but that's not what we're talking about here.

Perhaps the whole merging thing isn't a bad idea in some respects, but p-l-e- a-s-e stop trying to convince people that competition is bad. If you really believe that, then start a lobbying group to get nginx, apache, and lighttpd to merge. And let's not stop there, let's eliminate all duplication of effort -- at the operating system, database, programming language, and application levels. If you're going to make that argument, then take it to its logical conclusion.

The one solid argument made in the article is the point about having a bigger core team -- that's always a good thing -- especially at a time when we're just barely dipping our toes in the water of what is sure to be an ocean of economic upheaval.

One question I have: will Rails 3.0 break existing Rails app _and_ break existing Merb apps? If so, then there's room for a new player to come along. Web-based frameworks are in their infancy and modularity isn't the end-all- and-beat-all. Something new and different will emerge. At it will be a compelling alternative to Rails 4. And that will be a good thing. Until, of course, the Rails team convinces that small group of radicals that choice isn't what people want. And when that happens, you can expect me back here, like a broken record, making the same arguments. :-)

<comment><USER3> Thinking that choice isn't what people want implies that people, intelligent people, like being told what to do. This isn't my position, nor my experience, and I can't think of anyone else who chooses "being told what to do" over making a choice, given the option.</comment></comment>


How To Hire Hackers: A Realistic Guide For Startups - <AUTHOR> http://onstartups.com/tabid/3339/bid/92130/How-To-Hire-Hackers-A-Realistic-Guide-For-Startups.aspx

<comment><USER2> Avoid they common Job-Posted-on-Web, 1000 applicants, sort out by bingo words mistake, and instead search your developers where they are: On IRC, GitHub, CPAN, ...

Offer home office, remote work. Restricting yourself to your home town, or to developers who are willing to move, will restrict you to 2nd class devs who just need a job.

<comment><USER3> I disagree with your '2nd class devs' comment. Being a developer is not a calling. It's possible for anyone with sound mind and logic to sit down and contribute to a company should they have the will to make rent. That may sound depressing and unfair to the folks who are putting in 90 hours a week but that's reality.

<comment><USER4> I disagree with your disagreement. Although being a developer that's just in it to make a living is a fine thing -- just like most creative professions, being an exceptional developer requires a passion for the job. Few developers that are really, really good don't love what they do.

<comment><USER3> No one is in it just to make a living, but just because they aren't active on a social coding network doesn't mean they aren't worth top dollar. The popular way to define an exceptional developer is a very narrow definition.

</comment></comment></comment></comment><comment><USER5> > Call them hackers, 'ninjas', or 'rock stars' if you'd like.

No, don't.

<comment><USER6> I personally avoid any listing which labels developers as such.

</comment></comment><comment><USER7> _"Call them hackers, 'ninjas', or 'rock stars' if you'd like."_

Anyone who uses any of those terms to mean "developer" is a huge red flag for me.

<comment><USER8> Agreed. Its an extension of the Dunning-Kruger Effect. People who truly are good at programming, don't see themselves as 'rock stars'. Its only the shitty developers who would call themselves 'rock stars'.

<comment><USER4> I'm with you. So what should we call these exceptional developers?

<comment><USER9> Exceptional developers.</comment></comment></comment></comment>


Why You Should Stop Using CAPTCHAs - <AUTHOR> http://webdesignledger.com/tips/why-you-should-stop-using-captchas

<comment><USER2> CAPTCHAs are indisputably a nuisance. They have to be used, however, where necessary—some sites are simply too spam-prone to avoid needing to use CAPTCHAs (usually in conjunction with one or all of the other suggested methods on the blog.)

For those sites, reCAPTCHA is usually a good enough spam deterrent that has a fairly high human success percentage.

</comment><comment><USER3> I had several flip outs because of these captcha things. As it says in article, some of them are simply impossible to read. I'm definitely not putting any of those on my website, there are plenty of other solutions out there.</comment>


The problem of showing digital proof of payment - <AUTHOR> Imagine that you have four parties to a deal: 1. buyer 2. seller 3. delivery firm 4. bank.
When the buyer has paid the seller in US dollars, the buyer will provide a digital proof of payment to the delivery firm who will then ship the goods to the buyer.
It is obviously not safe to provide the digital scan of a paper document, because such digital scan can be trivially photoshopped.
The problem can be solved with stablecoins such as Tether, USD Coin, TrueUSD, Paxos, Dai, or Gemini Dollar.
The contract between buyer, seller and delivery firm specifies that the amount must be transferred to the specific address for the contract.
From there on, the delivery firm can trivially verify in stablecoin's blockchain that the money is now present in this specific address. Hence, the stablecoin's blockchain will contain irrefutable, digitally-signed proof of payment.
Have you ever heard of any traditional bank which is capable of issuing an irrefutable digital proof of payment on behalf of the buyer?
By the way, would you even be able to send digital proof that you have paid last month's rent? Just think of it. Not one bank can email to you a digital document with which you can prove that you have made that payment. It is not that it would be a particularly hard thing to do. It is just that they are not capable of doing it. <comment><USER2> This is why Bitcoin was invented. This problem is already solved.

If you want to accept payments with irrefutable proof that they arrived, simply accept bitcoin.</comment>


Schools are banning best friends to protect students' feelings - <AUTHOR> https://www.businessinsider.nl/schools-are-banning-best-friends-to-protect-kids-feelings-2017-9/?international=true&r=US <comment><USER2> This seems incredibly stupid. You can't ban kids from having just one or a few friends, it's one thing to teach them manners etc. But saying you can't have close friends seems just plain stupid if I understand the article correctly and doesn't reflect the life of grown-ups at all.

> Best friends, with their tight bonds and inside jokes, throw a wrench into > that open environment, school officials contend.

How? The article doesn't explain why it should. Only because you have close friends doesn't automatically mean that you are hostile towards everyone else.

I am a grown up, I only have a few friends and I think that is perfectly normal. I hate this kind of over protecting, "we know better than you" mentality. Personally I think it's way more important to have a few close friends than a lot of people you are simply loosely connected to.

Even the science is against it the idea:

> And although anti-best-friend policies may help kids in the short-term, > research suggests the strong connections found among best friends could be > vital for mental health in a world where adolescents are lonelier than ever.

</comment><comment><USER3> This seems a very extroverted policy since extroverts naturally tend to have a large pool of people they are friends with. Introverts tend to have a few people that they know really well.</comment>


The Future of Tower - <AUTHOR> https://www.git-tower.com/blog/coming-up-on-the-roadmap-2020/ <comment><USER2> Aesthetically Tower was very pleasing, and I was a customer for many years, but its performance was horrible compared to its competition for very large repos. I've since switched over to GitKraken and suffered none of the slowness I'd experienced when using Tower.</comment>


Top Mistakes Entrepreneurs Make When Writing a Business Plan - <AUTHOR> http://www.inc.com/print/129

<comment><USER2> 1\. writing a business plan.

<comment><USER3> I think your comment is a little short sighted, in the case of obtaining bank funding some form of business plan may be required. Similarly, when applying for some franchises. You have to remember that tech entrepreneurs are a subset of all entrepreneurs - and all businesses can't be boot strapped (e.g city center food outlet on leased premises).

</comment></comment><comment><USER4> Pretty generic suggestions, but I thought the art was fun. Well done inc for making me read something I've read a dozen times before.</comment>


Ask HN: How to build a data authoring tool with spreadsheet interface - <AUTHOR> I would like to ask for suggestion of implementing an Excel or Google Sheets like standalone editor with basic support of spreadsheet formula.
I work for a mobile game studio. All of the game data like levels or dialogue are stored and edited on Google Sheets then exported as JSON when we need to release a new build or do a server update. It works for a while, but it became a versioning nightmare. Also some of the data has tree like structure and shouldn't have been modeled as sheet. So I am thinking of rolling our own authoring tool that support both tree data structure and sheet. But our designers really like the interface of Google Sheets and they use some basic sheet formula like arithmetic ones and cell reference. Hence I am looking for a way to come up with a sheet editor which is good enough to make users happy in a reasonable time frame.
I tried integrating Handsontable into Electron, the performance is worrisome when loaded with production data. <comment><USER2> Handsontable has a lot of potential for performance improvement through configuration. Have you contacted support?

</comment><comment><USER3> Have you looked at visidata from visidata.org?

<comment><AUTHOR> I haven't. Thank you very much.</comment></comment>


Show HN: Particle Effects in React - <AUTHOR> https://387z7o2zrq.codesandbox.io/ <comment><AUTHOR> It's more like a performance test really, each "particle" is actually a React component animating its own course, just to see how far it can go. Makes for a cool effect anyway. Full code: [https://codesandbox.io/embed/387z7o2zrq](https://codesandbox.io/embed/387z7o2zrq)</comment>


Ask HN: Share your Game of Life implementations - <AUTHOR> I know John Conway wasn't always fond of being known for GoL[0], but that doesn't make it any less important to me. I suspect for many, Life represents their first magical experience with programming. It can give the sense that you're glimpsing a connection to the deeper underpinnings of the universe. For me personally, Life has played a big role in my love of automata, and simulations in general.
I thought it would be fun for everyone to share their personal implementations of Life. Here are my meager contributions:
Recent hand-written wasm implementation (ui incomplete): https://github.com/anderspitman/wasm-life
Basic JavaScript/CSS intended to be used as self-contained animated icons: https://anderspitman.net/apps/golicons/
WebGL (for simulation and visualization) (unfinished): https://github.com/anderspitman/mogol/tree/webgl-sim
Two of my favorites that I didn't do:
Life in Life: https://www.youtube.com/watch?v=xP5-iIeKXE8
Life in WebGL: https://www.shadertoy.com/view/Xd33WS
[0]: https://youtu.be/E8kUJL04ELA <comment><USER2> Twitch Plays Conway's Game Of Life is back, in memory of John Conway [1]

It's a multiplayer implementation you play through the Twitch chat by sending commands (!ON, !OFF, !RLE, !HELP, ...).

The list of commands and help: [2]

You can use/learn more complex patterns with RLEs (Run Length Encoded), where a "o" means alive, "b" means dead and "$" is carriage return.

Example of RLE command for a glider: !rle bob$2bo$3o! 0.0 # Create a glider at coordinates 0,0

TPCGOL has a database of 446 patterns (Sir Robin, Gosper Glider Gun, ..), so the equivalent command for the glider above is:

!glider 0.0

A slideshow of all 446 patterns (still lifes, oscillators, guns and spaceships) is available here: [https://www.youtube.com/watch?v=u4XgALyX6w8](https://www.youtube.com/watch?v=u4XgALyX6w8)

You can find more patterns on the Conway Life wiki [3]

There's also a Battle Royale mode you can start with !PLAY [4]

In Battle Royale mode, the rules are similar to Fortnite: join a game with !PLAY, !THANK the bus driver, and try to be the last one to have cells alive as the storm shrinks.

RIP John Conway

\----

[1] [https://www.twitch.tv/bzh314](https://www.twitch.tv/bzh314)

[2] [https://bzh314.com/twitch_plays_conway_game_of_life/](https://bzh314.com/twitch_plays_conway_game_of_life/)

[3] [http://www.conwaylife.com/wiki/Main_Page](http://www.conwaylife.com/wiki/Main_Page)

[4] [https://bzh314.com/twitch_plays_conway_game_of_life/#play](https://bzh314.com/twitch_plays_conway_game_of_life/#play)

</comment><comment><USER3> I played around a lot with cellular automata over a year ago and made the general case for game of life [1] but also other variants [2] and [3] which I consider especially beautiful.

[1] [https://www.arnevogel.com/life-like-cellular- automaton/](https://www.arnevogel.com/life-like-cellular-automaton/) [2] [https://www.arnevogel.com/brians-brain-cellular- automaton/](https://www.arnevogel.com/brians-brain-cellular-automaton/) [3] [https://www.arnevogel.com/cyclic-cellular- automaton/](https://www.arnevogel.com/cyclic-cellular-automaton/)

</comment><comment><USER4> Back in the days of s100 computers, I had a poly 88. I wrote a game-of-life that used the video memory as the cell array. characters meant a dead cell that next gen would be live, dead -> dead, live -> dead, live->live - one pass replaced the current generation with one of those 4 chars. The second pass would resolve the chars back to Live "@" and dead "." cells. 8080 Machine code (hand assembled). It would do about 1 generation a second. The life array was 40x25..

</comment><comment><USER5> A very rough JavaScript implementation I did this morning after looking at the Wikipedia page

[https://gist.github.com/RaedsLab/e4d5eed8f1d7e0b90f407bdef71...](https://gist.github.com/RaedsLab/e4d5eed8f1d7e0b90f407bdef710c871)

</comment><comment><USER6> This is something I put together 5 years ago:

[https://github.com/kapilkaisare/game-of- life](https://github.com/kapilkaisare/game-of-life)</comment>


Building a High Throughput Image Pipeline - <AUTHOR> http://blog.picloud.com/2013/04/03/introducing-queues-creating-a-pipeline-in-the-cloud/?e

<comment><USER2> As a Picloud fanboy whose side project maps really well to queue processing, I'm rather excited about this.</comment>


Ask HN: What interests you musically? - <AUTHOR> What interests you music-wise currently? Can be software, artists, songs, algorithms, genres, hosts, instruments, methods etc. <comment><USER2> What I really want is a music recommendation system that scans my music library and using a combination of likes, play counts, genres and what I've played recently make a list of recommendations. Even more awesome - let me explore new genres. Say I'd like to explore more Jazz, let me explore Jazz and using the aforementioned information make a recommendation for what I'd like. The awesomest would be to let me stream the recommendation(s) a few times - I'd even pay for that - so I can decide if I like it and want to add it to my library. Ideally it would use my likes/dislikes on its recommendations as input to future recommendations.</comment>


Writing a blog platform in Go - <AUTHOR> http://www.steve-lacey.com/2011/03/reinventing_the_wheel <comment><USER2> Always fun to read about how someone rolled their own, but as nerds we have to poke right?

Why write a textile parser in Go? Run the JSON through one that's already written? Store the posts pre-rendered?

<comment><USER3> Exactly. He uses Disqus for comments, so it could actually be a static site. No worries about performance, caching, load, security anymore (almost).

<comment><USER4> Spot on. I think a hybrid approach would be good however as having maintained a huge static site, it's a pain in the arse getting templates etc right.

I actually have a static site generator that I wrote that uses Go to apply reusable templates (using the built in template package) and generate navigation that outputs static HTML only. The idea is that you store your HTML static documents in Mercurial, run the site through the site generator and rsync it to your web root. I really need to clean it up and chuck it on bitbucket.

<comment><USER3> I'd be interested in that code. There's lots of static site generators out there already--and like so many procrastinating nerds I wrote my own--but it'd be a nice real-world example of Go and its Template package.

<comment><USER4> I'll clean it up and upload it when I get a chance - probably in the next couple of weeks. I'll post it to Show HN.

</comment></comment></comment></comment></comment><comment><USER5> You know, sometimes the best way to learn a language is to just have a relatively straightforward problem to solve (like your own blog) that you actually care about doing well and will continue to use. Otherwise, you are just doing tutorials for the sake of tutorials and that doesn't always stick.

<comment><USER6> I always viewed blog platforms as the "Hello World!" of web apps. They are non-trivial, but everyone has written one, knows what it should do, and how it should look. So instead of worrying about how to solve the problem, you can see how the language or framework works.

</comment></comment><comment><USER7> _"It's way too slow. Page load times are awful."_

His own blog is also very slow. Sometimes you should not reinvent the wheel but optimize it.

I don't know why he needs all the Javascript but when I open his page the whole page kind of rebuilds after 2 seconds.

<comment><AUTHOR> The site doesn't use much js itself (other than to wrap the images which sometimes seems to look like a rebuild). I should probably just modify the textile formatter to do that...

The bulk of the js is disqus and a code pretty printer.

For actual performance it seems to be doing pretty well for me. See here for a before/after: <http://steve-lacey.com/2011/04/perf_improvement>

<comment><USER7> You are doing 20 requests to external Javascripts and 8 requests to external stylesheets according YSlow. "The page has a total of 61 HTTP requests and a total weight of 637.2K bytes with empty cache".

When I read about performance issues I just wondered why you are including all this stuff. That's why I prefer optimizations in the first place before reinventing the wheel ;)

</comment></comment></comment><comment><USER8> Im going to reinvent a blogplatform in Clojure mainly to learn do something in a really restful way and learn a little bit of more about the clojure webstack.

</comment><comment><USER9> how can this guy have so many tags in his tag cloud?!

<comment><USER10> Because of tags like this: <http://www.steve-lacey.com/tag/still%20alive/>

</comment></comment><comment><USER11> What's with his impatience? Scala isn't that hard.</comment>


Frederick Mayer (spy) - <AUTHOR> http://en.wikipedia.org/wiki/Frederick_Mayer_(spy)

<comment><AUTHOR> Just caught a showing of "The real Inglorious Basteurds" on Channel 5 - including this guy, Fred Mayer - a Jew from Brooklyn who disguised as a Nazi officer sends back intelligence to OSS, infiltrates Messerschmitt factories, and finally accepts the surrender of Innsbruck.

WTF ! See the documentary on UK channel 5.

edit: there is a part in the Wikipedia article where he is tortured by two Gestapo agents, one notices he is circumcised, but they cannot believe a Jew would parachute in and pretend to be a Nazi. You're telling me ...

and I'm wondering if I am doing enough Open Source work as if that will make the world a better place</comment>


How did you find a mentor? - <AUTHOR> I'm currently looking for a mentor, and would love to listen to any advice HN has to offer. Currently I am learning C on my own, but have no experience in the field. How did you find a mentor? Was the experience worth it? If you were a mentor did you find any value in the relationship? Thanks in advance! Also feel free to contact me at n_villela(at)yahoo.com <comment><USER2> I found my mentor through my first paid web development job. The experience is absolutely worth it. That experience happened almost 10 years ago and I still catch up with him every so often.

I have been a mentor in the past (and present) and there is immense value it brings to me and the organization I am employed by.

Depending on what you are looking to gain from the relationship, I would recommend watching some C live coding streams or finding meetups for that in your area. You could also find some LinkedIn groups and reach out for a coffee/google hangout to start the process.

</comment><comment><USER3> Might be helpful:

[http://pindancing.blogspot.nl/2010/12/answer-to-will-you- men...](http://pindancing.blogspot.nl/2010/12/answer-to-will-you-mentor-me- is.html)

[https://news.ycombinator.com/item?id=9400288](https://news.ycombinator.com/item?id=9400288)

<comment><AUTHOR> Thank you for the links. I am currently reading them, and will try to apply the information gleaned.</comment></comment>


Porn Like You Never Seen it Before (SFW) - <AUTHOR> http://thenextweb.org/2008/10/08/porn-like-you-never-seen-it-before-sfw/

<comment><USER2> SomethingAwful did an image version of this (I assume it influenced this video) called "Porn Not Porn" about a year ago - sadly it's SA member only to view now, but you can find some examples by doing a Google Images search for "porn not porn" (as a phrase)

For those into porn but not porn, don't forget to check out Furniture Porn: <http://furnitureporn.com/>

</comment><comment><USER3> Ha ha ha ha!!!</comment>


Japanese new recruit fired for being out of frame during video meetings - <AUTHOR> https://japantoday.com/category/business/japanese-new-recruit-fired-after-one-month-for-being-partially-out-of-frame-during-video-meetings <comment><USER2> "The rep explained that during online meetings he could be seen wearing a cardigan over his dress shirt, at times his chin was out of frame, and other times his knee was poking up into the frame."

There has to be more to it than this. If etiquette is brought up, firing etiquette dictates that the employee should not be surprised for his firing.</comment>


Uncertainty and the Welfare Economics of Medical Care (1963) - <AUTHOR> http://fermatslibrary.com/s/uncertainty-and-the-welfare-economics-of-medical-care <comment><USER2> Libertarians and conservatives believe that health care is or could be a well- functioning market, like buying a refrigerator.

But there are many basic differences. You know when you need a refrigerator, but often are not sure if you need a given test or health treatment. Refrigerators are bought one at a time, but tests and treatments are often whole bundles. Refrigerators of a given brand and model are basically identical, not so health treatments. If you get a bad refrigerator you can exchange it under warranty, a bad health treatment can cause you permanent damage.

You can get reliable information on refrigerators from Consumers Reports, not nearly so much for health care. You can generally get along without a refrigerator for a while, taking time to get information before making a decision which one to buy, often that is not the case with important health care.

There are many sellers of refrigerators with public prices and lots of price competition, not the case for health care. The prices for refrigerators are standard around the country, not at all the case for health care. The majority of health expenses are in the last few years of life, when people are in poor mental shape to make decisions. You can buy a refrigerator at a reasonable price without insurance, but not individual health treatments.

In these and i would guess other ways, a purchaser of health care services is, by the very nature of things, in a far weaker position than a buyer in a normal market. And of course, the health care providers like it that way.

Can anyone suggest any other basic differences?

<comment><USER3> I was under the impression that under the current US medical system that it is impossible to get a pre-purchase price on a lot of medical care. If you are going into hospital for a knee replacement you can't get anyone to tell you the total bill in advance.

One major difference is the actual price paid for a medical service by an insurance company is much lower (often 10%) of the cash price.

Another is that the you don't know what the insurance company will cover until months afterwards. None of these apply to normal consumer items where markets work.

The most efficient USA healthcare system would probably be to just expand the VA system to cover everyone and put a tax to pay for it.

<comment><USER4> > One major difference is the actual price paid for a medical service by an > insurance company is much lower (often 10%) of the cash price.

It is often much lower, but it also varies by insurance provider and _the specific plan you are on_ , which can itself (AFAIK) vary depending on _when you joined said plan_ , your group, _et c_.

The hospital can't even guess at a price until they figure out which procedure codes they're going to bill, which itself isn't always clear, then to know what you'll actually pay they have to apply the effects of your _specific_ insurance. It's often quite difficult to get them to do this. Often it will end up being wrong anyway.

Bonus: you can't be _really really_ sure your insurance will pay their part until the bill goes out and they do. Sometimes they deny claims. They _may_ be wrong to do so (it's sometimes hard to tell) but even if they are you're in for 100+ hours of work (much of it waiting on hold) to get them to do what they were supposed to.

<comment><USER3> All I can say is I am glad to be Australian. We might have some nasty wildlife, but at least I know that if I am bitten or stung I am not going to end up bankrupt.

</comment></comment></comment></comment><comment><USER5> This is a little long to commit to close reading. Summary, anyone?

<comment><USER6> It's a classic in economics that explains why health care doesn't fit the free market ideal. The basic problem is that, unless you know as much about medicine as your doctor, you can't evaluate the quality of advice you're getting.

It's heavy reading, I don't know why it's getting upvoted here.

<comment><USER7> This is a bad argument.

Does anyone know as much as the contractor who made their house? Then why don't houses crumble, long after they are built?

A free market would have various accrediting bodies, and doctors would advertise the quality of their accreditation as evidence of their skills and qualification.

<comment><USER8> It doesn't work out that way though. Asymmetric information inevitably leads to market collapse [1]. The only reason healthcare "works" is because we're not rational actors. I mean those more as mocking quotes rather than scare quotes. Perhaps it's more accurate to say, the only reason healthcare works is because many actors are not motivated solely by money. Which, a decent MBA would consider a sucker.

[1] [https://en.wikipedia.org/wiki/The_Market_for_Lemons](https://en.wikipedia.org/wiki/The_Market_for_Lemons)

<comment><USER9> Sure, but forcing healthcare on everyone makes the market failure a government failure--if "failure" means someone paying much more for insurance than it actually costs for that person.

<comment><USER8> There is a pretty easy calculation, but the numbers are hard to come by.

People pay about $3000 for health care in the us, per year. people pay $750 for medicare. To be fair, half is by the employee, half is by the employer, so let's say $1500, because theoretically you would make more if the employer didn't have to pay that tax. On the flip side, high paying jobs, the employer pays the lion's share of health insurance premiums - but let's just ignore that.

Old people (medicare patients) get sick all the time. Heart attacks, cancer, whatever. Young people rarely get sick, but there are more young people - perhaps 15,000,000 70-74 year olds, and perhaps 21,000,000 20-24 year olds. If the cost of medicare for everyone is less than $3500, it's cheaper to just cover everyone at some basic level via medicare.

Very few 22 year olds get cancer. It's expensive. lots of 72 year olds get cancer. That is also expensive. Medicare pays for the expensive part of people's lives (the end of their lives). I'm pretty sure if the medicare tax rate doubled, 3% to 6%, $1500 to $3000 it'd still be cheaper than what we're doing now.

I dunno. It's late. It's a complicated topic. I have no problems with well off people paying a whole lot to get special care, extra insurance, or whatever. I think it would be a good thing for people who get in car accidents, have heart attacks, or get cancer to know they're not financially ruined.

It's nothing more than a linear programming problem. Right now people pay X. If everyone was taxed more they would pay Y. If Y < X, we should do Y. If not, what we have now is the best we can do. So be it.

<comment><USER9> > If Y < X, we should do Y.

This depends on whether you're fine with some people subsidizing other people. The average cost by forcing everyone to get insured is less because you're forcing some people to buy plans for whom it's not worth it. See adverse selection.

<comment><USER8> > some people subsidizing other people.

This is called insurance. Historically some deeply religious groups were opposed to insurance, because they felt it was gambling.

> he average cost by forcing everyone to get insured is less because you're > forcing some people to buy plans for whom it's not worth it.

It's really a timeframe question. A 20 year old, generally, needs less care than a 50 year old, who needs less care than an 80 year old. one approach is to provide lifetime care, and hope that technology improves (as it has for all of human history) and assert that care today for an 80 year old will be less expensive in 10 years than it is today.

Now, of course, actual payments for health care is more expensive year to year, because, as you say, adverse selection.

In any case, as you point out adverse selection (the problem of information asymmetry) means the payer must be as knowledgeable as the payee. An obvious solution (but maybe not the best solution) is something like medicare.

I'm not sure i understand what you're advocating. Perhaps you mean each person should set aside some portion of their cash for whatever expenses they might have, and the odd 20 year old with leukemia should take on a few hundred thousand dollars of debt. of course if you're unlucky enough to have one of those 10% survival variations, the cost will of course be multiplied out by 10.

The average american only makes about $2,000,000 over their lives, and they have to eat and have a place to live and stuff, and only half will beat the average, what sort of return could an actual care provider expect? perhaps $200,000? So your model becomes pretty clear, if cost to treat @ 18 > $200,000, the person shouldn't be treated. That number will change with education, but of course decline with age.

Seems like not a good solution, but i see where you're coming from.

<comment><USER9> > This is called insurance. Historically some deeply religious groups were > opposed to insurance, because they felt it was gambling.

No. I'm saying it's a subsidy NOT because randomly you roll the dice of risk and you get lucky; but because the expected value or utility of health risks is less than the cost of insurance (for example, you wouldn't buy health insurance for 1 billion dollars a month).

I'm not saying it's a subsidy because some people don't end up "using" their insurance plan; I'm saying if you repeat the scenario a billion time healthy people will be on average worse off so it's a subsidy. They wouldn't take the insurance unless government forces them.

> I'm not sure i understand what you're advocating. Perhaps you mean each > person should set aside some portion of their cash for whatever expenses > they might have, and the odd 20 year old with leukemia should take on a few > hundred thousand dollars of debt. of course if you're unlucky enough to have > one of those 10% survival variations, the cost will of course be multiplied > out by 10.

I didn't advocate anything; I'm just saying the issue is a normative question; it doesn't have an absolutely objective answer.

Sidenote: maybe the 20 year old should be in debt. If we want to save as many lives as possible, it's cheaper to put money into clean water, stopping open defecation, vaccines, etc (depends on whether you value someone outside your country as much as someone inside).

The leukemia case is convenient for your viewpoint but what about nonsmokers subsidizing smokers? Should I have to pay for the treatment of the cancer of a smoker or the AIDS of someone who injected drugs or the measles of someone didn't take vaccines?

It's a normative question on altruism.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> If anyone wants an accessible summary, this is good:

[http://hspm.sph.sc.edu/courses/econ/Classes/Arrow.html](http://hspm.sph.sc.edu/courses/econ/Classes/Arrow.html)

This is the key paragraph:

" The basic problem is that, unless you know as much about medicine as your doctor, you can't evaluate the quality of advice he or she (mostly "he" in 1963) gives you. "</comment>