1,032 karma · joined March 6, 2009
[ my public key: https://keybase.io/clord; my proof: https://keybase.io/clord/sigs/krTEbnhXaURpsY0ID80LEGUxq4yo4VuWODHIYiqaFsA ]
This is why I like to re-make my shell and associated tools static binaries — shell scripts run 10-20% faster. (lots of small programs running repeatedly)
Inspired by Haskell's newtype, I drafted a proposal for C++14 which would have introduced native newtype to C++, but it got rolled into an omnibus paper (n3635) and appears to have been forgotten.
The proposal is modelled on strong enums, but generalizes them to all types. They are essentially strong typedefs with none of the weaknesses of wrapper types, restrict pointers, typedefs, and pragma disjoint.
newtype NotInt : int;
NotInt k(5); // call ‘default’
NotInt bar(NotInt);
bar(k); // passes exactly as an ABI int would
int baz(int&);
baz(k); // Error! no conversion
While drafting this proposal, I realized it was a much more C++-like way of bifurcating aliases than 'restrict' keyword: newtype D1 : double;
newtype D2 : double;
void biz(D1 *x, D2 *y) {
// Being separate, D1/D2 can be
// assumed not to alias by optimizers
...
}
While playing with it, we came up with this proposed syntax (although I don't think this would get through the committee): [template <typename T>]
newtype [NotT] : [(public|private)] T [= (default|explicit|deleted)] [{
// only non-virtual member functions, no data or reference members (something like POD)
// this->value has all of the operations of T, but only aliases with the new type, and implicitly converts to/from T prvalues.
}] [optional_variable_name];In the case of water, which replenishes, the 'production cycle' is actually the global fresh-water cycle. If we dirty all of the fresh water faster than the earth can clean it, we're going to have to start drilling for the fossil stuff in hard-to-reach places. It's strange to think there would be drilling rigs in the ocean with people risking their lives and taking danger pay... for water. It raises a question in my mind: affordability. Who is going to be able to afford to buy all their water like this?
It's the next step now that there are several major rivers no longer reaching the ocean.
On the go, I find myself using the finger-bone counting method, where you use your thumb to point to each of your finger bones (3 per finger) allowing you to count 12 on a hand. This probably has a name since it's so easy. And 12 has lots of really nice factors when doing math on the go.
If you point at the joints plus the tip of each finger, you have 4 positions per finger (i.e., nibbles), which can be useful for working through power-of-2 stuff.
This was after reading The Crucible of Time by Brunner (one of my favourite books)
AI, nanotech, biohacking, and other possible future technologies just don't seem anywhere near as disruptive as that first list. They'll get incorporated into the "business as usual" machine if they come to pass at all — and much more easily than, say, atomic bombs were.
Anyway, apps that don't need security should be as you describe already.
Our source repo at work (a C++ compiler with full commit history going back to the early 90s...) is smaller and more componentized!
But the real boon is that each process can conceivably be linked with any 'file'. I liken this practice to the STL library's iterator pattern: algorithms are the processes, and files are the iterators (although I bet STL was inspired by unix). You can redirect your tty through an ssh tunnel, you can scp a regular file, or you can ssh tunnel your soundcard or mouse. And of course 'ssh tunnel' is only one such kind of glue. There are pipes, devices, fifos, etc. In the end it works out that there are O(n*m) possibilities for only O(n+m) implementation cost.
But remember that with STL, not all algorithms will work with all iterators, and vice versa. And likewise, not all processes can work with all files, and vice versa. The benefit comes from the significant overlapping portion.
UTF-8 and Unicode are great examples of a practical type. Null-terminated UTF-8 is a type, but unicode is an alphabet of characters in the abstract. The type called "UTF-8 string" has certain permitted operations, and a particular representation in machines.
Another good example is the set of all integers modulo 2^x, and the type consisting of unsigned x-bit binary integers for x86-style processors. The x86 add operation is permitted only on the later, which makes it a distinct type from, say, the PPC integer type. (so does endianness, but that's encoding, not the op)
Ideal types are things like sets, trees, lists, and so on. Their encoding is such that all everything is possible. Look at any functional language. These things are in math, although often less formally defined. The only problem with ideal types is that bottom is a member, which is a problem for some operations permitted on said ideal type.
To put this all another way, types convey something terribly important: What is this thing, and what operations can I do with it. In math, we tend to hand-wave both of these things away, and instead rely on human intuition to determine what something is (set, integer, field, vector, etc.) and what we can do with it (intersect, add, integrate, rotate, etc.) But if you look hard, you'll see types in math. Vectors are bold, fields have arrows, integers have an initial assignment, sets are capital letters, and so on. A human must do type analysis to figure out of an operation or encoding is conforming.
Let's shorten the length for software patents. For the duration that it is valid, the patent office simply acts as a custodian of the code, ensuring that it works and certifying that it is novel. The patent office should maintain (or contract a company like GitHub to maintain) the repository of pending public domain source.
And once the patent expires, the source is released into the public domain, still under source control.
We can also strengthen prior art rejection of bad patents.
Finally, give enforcement more teeth, but narrow the scope to match more closely what is checked into the repository.
A system like this is more in the spirit of what a patent is: a temporary monopoly with a public-domain disclosure of the idea at the end of term.
Granted such companies are pre-lithic in nature, but none-the-less, employers will miss out on great people because they think publicly available code samples mean anything at all.
My wife's blog gets about 10+ comments per post with only 100-300 uniques per day. Sometimes a traffic spike will bring in a bunch of extra hits, but the amount of comments left after the spike depends on who was coming in. If it was a bunch of web developers or something: zero comments, even over thousands of hits.
A minor conclusion I draw from this is that blog comments come from community people, visitors and fans who keep coming back.
The "jadedness" of the community is a far bigger factor though. Some people are on a quest to consume, and not necessarily to participate.
I'd suggest you put your candidates up on http://www.colourlovers.com/ and have them vote.