Ocaml example:
let increment x = x + 1
let square x = x \* x
let to_string x = string_of_int x
let result = 5 |> increment |> square |> to_string
(\* result will be "36" \*)70 karma · joined March 21, 2014
Ocaml example:
let increment x = x + 1
let square x = x \* x
let to_string x = string_of_int x
let result = 5 |> increment |> square |> to_string
(\* result will be "36" \*)https://www.brendangregg.com/ebpf.html
https://www.brendangregg.com/blog/2018-10-08/dtrace-for-linu...
You can do the same thing in Nix (e.g. you can package software with a bunch of options and pull in required dependencies based on the options selected by the user), but you're right that Nix doesn't have a standardized API for doing this like Portage does. I think it would be a nice thing to have. Maybe it takes a lot of work for maintainers to pre-package every possible build option like they do in Gentoo. Instead, Nix focuses more on providing a unified interface (the Nix language) for end users to modify anything about any package. nixpkgs is also pretty flexible, allowing maintainers to use packaging approaches that aren't "standard practice", and those approaches are all exposed to the end user if they need to make changes. This usually means reading the Nix package source to see what's going on if you want to make changes to a given package. For example some packages like vim do provide a nice interface for users to choose pre-packaged build options [4], similar to USE in Portage. Since Nix is lazy-evaluated, you just have to reference the dependency in the code somewhere (search for ${python3} in the linked example), and then that dependency will only get installed if that bit of code gets executed (e.g. if the pythonSupport option gets passed).
I think that's a big part of what makes Nix a pain, the fact that end users can make almost any change they can think of to any attribute on the entire system. But that's also what makes it very powerful. Right now most people use overlays, as people described above. So you can modify the "buildInputs" attribute (the set of build-time dependencies), or the "buildPhase" to pass some different CMake flags, or any install phase you like, for any package in nixpkgs (see [5] for all bajillion phases). Nix flakes might make it easier to compose custom set of packages, but I'm not sure how yet.
Oh and one more random tangent - this whole time I've been talking about build dependencies in Nix as opposed to runtime dependencies. That's because runtime dependencies are loaded automatically based on whether they get referenced in the final output of the build. Since every package has a unique hash, Nix literally greps the final build for package hashes, and if it finds any it loads them in as runtime dependencies. This is different from something like Portage where runtime dependencies are explicitly specified in RDEPEND.
[1] https://devmanual.gentoo.org/general-concepts/dependencies/#... [2] https://gitweb.gentoo.org/repo/gentoo.git/tree/app-office/gn... [3] https://gitweb.gentoo.org/repo/gentoo.git/tree/app-editors/v... [4] https://github.com/NixOS/nixpkgs/blob/master/pkgs/applicatio... [5] https://nixos.org/manual/nixpkgs/stable/#ssec-controlling-ph...
That said, if I understand you correctly, I think nix does let you do what you're describing. You can make an overlay, which is a way to modify a set of packages by reaching in and changing build instructions or add packages to the set. So, you can make an overlay of nixpkgs and add a modified libgcc called mylibgcc to the set. In the same overlay, you can modify package A and package B that depend on libgcc, and change their build instructions, including making them use mylibgcc as a build dependency. If you do this for then both packages will use mylibgcc as a single shared dependency without duplicating it.
Im on mobile but could try to send a working example if you need one, lmk.
Some references:
source: https://help.backblaze.com/hc/en-us/articles/217664898-What-...
Orders.id = Customers.order_id
and also indicates which column is the primary key and which is the foreign key. What about other column names duplicated across tables, should Orders.created_at = Customers.created_at
become Orders.order_created_at = Customers.customer_created_at
Scope exists for a reason, don't be afraid to use it!As far as databases and horizontal scaling, this could probably be done currently within each Docker container at the database layer as you mentioned (CockroachDB also comes to mind). So let's say you add a new docker container with its own persistent+redundant storage volumes, and that container is running a cockroachDB node. You can add more containers as cockroachDB nodes, each with their own persistent+redundant storage, and you get all the DB sharding etc across nodes from cockroachDB while the redundancy+persistence are handled by Docker (plus storage solution) as far as restarting, migrating, reconnecting, etc. This probably has all sorts of problems I'm blind to but that's my rudimentary understanding.
Handling horizontal scaling, sharding etc at the storage layer directly through Docker sounds much much harder, and I don't even know what I've been talking about so far so I'll leave it at that
Here's a list of some people doing persistent Docker storage :
Flocker
Portworx https://portworx.com/
StorageOS https://storageos.com/
Rancher Longhorn https://github.com/rancher/longhorn
Quobyte https://www.quobyte.com/containers
Nexenta https://nexenta.com/solutions/containers
Infinit https://infinit.sh/docker
EMC REX-ray https://github.com/codedellemc/rexray
Ceph
Gluster
Mesos https://mesosphere.github.io/marathon/docs/external-volumes.html
Kubernetes https://kubernetes.io/docs/concepts/storage/persistent-volumes/
vSAN
Nutanix http://next.nutanix.com/t5/Nutanix-Connect-Blog/Containers-Enter-the-Acropolis-Data-Fabric/ba-p/11122
Netapp (Docker volume plugins for SolidFire+ONTAP+E-series)
AWS EBS/EFSThe pros to Docker so far: Dependencies: Dockerfile gives a list of explicit system dependencies for each app. This can be done in other ways with package files or config management but this was not being done before and this is an easy catch all to force it for any different type of environment. Logical Grouping: App environment (Dockerfile + docker-compose.yml) lives alongside codebase in a single git repo Deployment: Deploy to any box with `git clone myapp && docker-compose up` for testing/dev instances or migrations Development: We mount the codebase from a host directory into each container, with git hooks to update the codebase, which works well for us (we have no CI) Plus it's fun!
Cons: Operational Complexity: Devs/Ops teams probably won't want to learn a new tool. I setup a Rancher instance to provide a GUI which makes things a bit easier to swallow. It has things like a drop in shell, log viewer, performance metrics, etc. Network complexity: we never needed reverse proxies before, now we do. Clustering/Orchestration: We don't cluster our containers, but the more we add the more I think we might want to, which would add a whole new layer of complexity to the mix and seems unnecessary for such a small shop. Security?: lots of unknowns, lack of persistence can be bad for forensics, etc. Newness: Documentation isn't great, versions change fast, online resources may be outdated.
Like you, I'm sometimes unsure if this is the right choice. Maybe a monolithic server or traditional VMs + Puppet would be easier, simpler, better? In the end, I think Docker just fit with the way I conceptualized my problem so I went for it. You may never get that "definitely good enough" feeling, but if it fits your workflow and keeps your pipeline organized and manageable, then I say go for it.
I think the real issue here is the fact that Berkeley was giving away the videos for free. If they were charging for those videos, they could incorporate the cost of ACA compliance into the price of the video. As it stands though, the state has the right to force work without providing any compensation. ACA compliance then becomes a form of servitude. (being a public university, UC Berkeley does get some state revenue, but it is only 14-25% of the total [1][2] and much of it comes in the form of contracts & grants which can only be used for the specific project they are awarded for). To me that is the real issue here, a simple matter of being compensated for one's work. I think they shouldn't be held to the same standards as someone selling a product, but that doesn't seem to be the lay of the land. I guess this is why we can't have nice things (for free).
[1] http://ucop.edu/operating-budget/_files/rbudget/2016-17budge... (page 47) [2] http://cfo.berkeley.edu/sites/default/files/2013-14%20UC%20B... (Page 1)
You can play around with different series on Wolfram Alpha https://www.wolframalpha.com/input/?i=infinite+product+1%2Fn
However, if you search site:http://www.google.com/search and show omitted search results, you get a bunch of results (all 404s).
If you do this there are some strange results on the last couple pages.
For example: Obama won't salute the flag | Phallectomy | horse+mating+video | feral+horses+induced+abortion | Lactating+dog+images | animal+mating+video | mating+mpg+-beastiality+-...
So, Half Life 3 confirmed.