632 karma · joined December 22, 2011
If the admin wants the logs in syslog, 2>&1 | logger or similar. If the admin wants to use multilog, s6-log, or journald, that's also easy.
(For the same reasons, daemons should not include daemonization routines but should run in the foreground. If I want it in the background, I'll arrange for my process supervisor to start it.)
The author of the book "Brain Rules for Baby" is on the side that breastfeeding leads to smarter babies (~5 IQ points?), and claims that the principles in the book are backed up by peer-reviewed research.
As for the mechanism behind it, not sure this is known. I've heard speculation that it is the antibodies, and that breastfed kids have a little extra learning time since they aren't distracted with as many illnesses. But I've also heard that receptors on the mother's breasts react to the babies saliva, resulting in milk nutrient profile slightly customized to the baby's current needs (so, would donated milk not have the same effect?).
http://www.panasonic.com/in/consumer/home-appliances-learn/t...
> resource limits
Daemontools includes the softlimit [1] helper.
> namespaces
It's not clear to me why this need be built in to a supervisor instead of being applied through generic helper programs such as unshare(1).
> daemontools will just keep restarting your process as fast as possible, taking 100% CPU if possible
supervise [2]: "It restarts ./run if ./run exits. It pauses for a second after starting ./run, so that it does not loop too quickly if ./run exits immediately." Simple and not configurable, sure, but should not hammer the CPU.
> support for syslog/journal rather than just local files
Daemontools svscan [3] "optionally starts a pair of supervise processes, one for a subdirectory s, one for s/log, with a pipe between them". The "s/log" script can do anything you wish, reading logs on stdin. If you use the included "multilog" program, then it's certainly geared toward writing local files, though it does include the ability to run arbitrary post-processor during rotation (which might, for example, fire off a job to copy the logs to an aggregator). Or you can not run multilog and just send the logs to syslog or whatever.
What I do myself is send save the logs locally using s6's multilog analog, s6-log, and also pipe them to a local syslog that forwards them to an aggregator outside my control.
And, in spite of newer supervisors adding more and more features beyond what daemontools provides, daemontools is still an awesome system that was 14 years ahead of its time.
[1] http://cr.yp.to/daemontools/softlimit.html
Is there a good reason? I assume you're thinking of the ability to fork and exec a new master process, running, e.g. a new version of nginx, then handing control to that new master without dropping any connections, possibly even waiting around a bit in case the new master dies and the original master needs to take over again.
I suspect with something like s6-fdholder-daemon [1] could be used to orchestrate a similar process, though I'm not enough of an expert to know. Instead of inheriting file descriptors through forking, an entirely separate, supervised nginx-newversion could be started, get the file descriptors from fdholder, then coordinate with nginx-oldversion about who's going to accept new connections.
Certainly depending on such a service is arguably more complex then just having the functionality built-in. On the other hand, just as every service should not implement its own daemonization, one can argue each service should not implement its own hot restarting. If the technique was more common, the argument to not duplicate such code would be stronger.
[1] http://www.skarnet.org/software/s6/s6-fdholder-daemon.html
This is a nice feature of systemd. I've been using s6 quite a bit (of daemontools heritage), and often want such a feature, but part of the reason I'm using s6 is so that I can use the same run scripts in darwin and Linux, and only Linux has cgroups.
We're looking at Go right now, and our instrumentation is currently done manually at the source level. Are there, or will there be, tools to add instrumentation similar to those available on the JVM? I'm sure it's possible...
1) Adding the package to the nix store, /nix/store/checksum-coreutils-version
2) Linking this into your nix profile: ~/.nix-profile/bin/ls will be a symlink to /nix/...coreutils.../bin/ls
Your PATH is then ~/.nix-profile/bin.
Now if you're packaging a shell script, and it calls coreutils and rsync, then inside the build scripts for that package, you might do something like this to wrap the script with the required PATH:
wrapProgram myScript --prefix PATH ${coreutils}/bin:${rsync}/bin
That way, the script will still work even if the user running it does not have coreutils or rsync in PATH. If will also work if the user does have rsync-1.0, but the script requires rsync-2.0, because the custom PATH being used by the script includes the required rsync.In this situation, both coreutils and rsync would be present in /nix/store, even if no user has linked them into their profile.
ArrayBlockingQueue<Work> q = new ArrayBlockingQueue<Work>(10)Nix generally uses dynamic linking, though the links are to absolute paths to a specific library version, so upgrading OpenSSL requires a recompile much like with static linking.
With "normal" dynamic linking, upgrading OpenSSL and restarting some service means you're now running untested code, hoping that the new version of the dynamic lib really doesn't change an interface on which your code depends. But to be fair, this is usually a good assumption.
It requires the user function return the same data type as contained by the slice. Furthermore, for a slice of size 1, it simply returns that single element.
case 1:
return in.Index(0)
...
if !goodFunc(fn, elemType, elemType, elemType) { ... panic }
So I could not, for example, reduce a slice of numbers into a struct of (min,max,mean).As an example of a (probably?) bad way to organize services, I worked on a project that had factored a role-based access control system into its own service. Every single web request hit this service, which made it a single point of failure, performance critical, impossible to temporarily disable, etc.
I believe it was this article: http://www.americanscientist.org/my_amsci/restricted.aspx?ac...
This is still true in Nix (and Guix I assume), although there are facilities for overriding, say, just the source tarball (to a different version) without needing to create a whole new Nix package (and worst case, creating a whole new Nix package is an order of magnitude easier than creating a Debian package in my experience).
In the "nixpkgs" set of packages, a few packages come in multiple versions (gcc, autotools come to mind), but most are only available in a single version.
Of course, once you've managed to install package-version-1, even as nixpkgs moves to version 2, 3, and so on, your version 1 can remain installed forever if you wish, and nothing can swap out the libpng, or libc or whatever it may depend on, since as you say all these can live side-by-side with other versions of themselves.
[1] https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt
I installed it, ran it, and it immediately complained "not a systemd system" and refused to run. I've not looked into things further, but presumably systemd-nspawn requires that systemd be running, which was a surprise to me since systemd-nspawn calls itself "chroot on steroids", and chroot cares nothing about the init system.
> Length fields automatically make the grammar context sensitive which is much harder to secure according to langsec.
Is this accurate given a finite length field? I can imagine a DFA that recognizes the language of a single byte length prefix followed by strings of 1 to 255 characters, just that the node that consumes the length field will have 255 branches to sub-DFAs that recognize 1, 2, ..., 255 character strings.
http://www.jaoa.osteopathic.org/content/106/6/342.full
"Is there a causal relationship between running and osteoarthritis? The current data are based on small studies, and their results are often unclear."
I've previously come across the cited studies by Lane, "at 9-year follow-up, the results were the same; there was no difference in the incidence and progression of knee and hip osteoarthritis in runners and nonrunners", but had not seen Sohn's comparison of college varsity runners and swimmers, "There is no association between moderate longdistance running and the future development of osteoarthritis. Furthermore, the evidence suggests that neither heavy mileage nor the number of years running are contributory to the future development of osteoarthritis."
On the other hand, Schmitt et al found that "Osteoarthritis of the knee joint is rare in former elite marathon runners. The risk of osteoarthritis of the hip joint seems to be higher than in control subjects who do not engage in much sport."
I looked into this quite a bit some years ago and found no research to suggest more cushioned shoes, less cushioned shoes, pronation-control shoes, barefoot running, etc. have any effect on injury rates. Are there recent studies or info that I missed on this topic?
> it's unlikely to be so damaging to you as to outweigh its benefits
It's even possible that all the shock and load bearing of running /is/ a benefit.
Running is associated with acute injuries of all sorts, but as others have commented does not correlate with osteoarthritis or other long term injuries.
I've had no problems, but just recently I had two separate emails be ignored by GMail users. Some followup communication suggests to me the mails were never seen, but I am unable to find out if they ended up in the spam folder or not. (At least one other GMail user did receive a recent mail from me.)
That has shaken my confidence in my email setup, which has run without issue for many years now.
And I don't have any end-to-end tests, other than seeing people reply to my emails. I occasionally check my domain on various blacklist checkers.
Some excerpts:
> Agda is a programming language that uses dependent types ... you can actually include values inside a type. For example, the List type constructor can be parameterized by both the type of its contents and the length of the list in question ... . This allows the compiler to check for you to make sure there are no cases where you attempt to call head on a potentially empty list, for example.
> If I can come up with a function of type Foo -> Bar (and Agda says that it’s type correct) that means that I’ve written not only a program, but also a proof by construction that, assuming some premise Foo, the judgment Bar holds.
> Proofs work in concurrent scenarios. You can’t reliably unit test against race conditions, starvation or deadlock. All of these things can be eliminated via formal methods.
> Thanks to Curry-Howard, Agda can also be used as a proof language, as opposed to a programming language. You can construct a proof not just about your program, but anything you like.
Nix package manager [1] offers a potential means to know the complete dependency tree. If you're not familiar, a nix expression to build a package takes a set of inputs (specific binary packages of, e.g., make, gcc, bash, libc, libxml2) and produces a binary output (depending only on the inputs). The run-time dependencies can be a smaller set than the build-time dependencies and are deduced by observing shared library linking for example.
I've been using it (outside Docker) for various Ruby apps, and I can't say it's been easy, but a large part of the pain has been Rubygems' inability to encode dependencies on C-libraries (e.g. libxml-ruby depends on libxml2).
There have been attempts at provisioning Docker containers with Nix [2]
Of course, if you are using Nix, some part of Docker's isolation becomes redundant (Nix isolates multiple version of things on the filesystem using plain-old-directories, so it's trivial to run ten different versions of Ruby side-by-side, for example).
[1] http://nixos.org/nix/ [2] http://zef.me/6049/nix-docker/