Dlang: how to get the length of a SList or DList

D language developers decided that those structures are so simple that they should not maintain any kind of state. As a consequence you need to relay on external functions for finding out their length:

import std.container;
import std.range;
import std.stdio;

void main(string[] args) {
    auto data = SList!double();
    data.insert(1);
    data.insert(2);
    writeln(walkLength(data[]));
}
Posted in Uncategorized | Leave a comment

Icarians and Shakers, two approaches different results


A not very well know part of the history of the United States is that of the communes started there in their beginnings. I learnt about them thanks to Antonio Escohotado's book «Los Enemigos del Comercio II: una historia moral de la propiedad».

Icarians were wealthy, posh, socialists, utopians and educated. Shakers were religious, hard workers, were escaping from prosecution in the continent. Two groups of people that couldn't be more different trying to create a new home in a strange land full of dangers. Who would you bet on for surviving and founding a new community?

History tells us that the Icarian dream ended in disaster, while the Shakers' one perdured more than a century, finishing only because of the sect rule of not having children (I think that not may communities could survive such a rule anyway, right?).

Escohotado explains how the «Icarians» wanted a new Eden. They expected from the commune the freedom to express themselves fully. Not more manual work, as the commune will guarantee a minimum amount of work for everyone and a maximum amount of time for enjoying poetry, study and thinking. The plan was to create a paradise for thinkers. The dream ended in nightmare with groups in confrontation, finger pointing and political fights. Instead of a perfect system they ended bankrupting and ruining the fortunes of some of their founders. From their wikipedia page:

Shattered by the loss of about 40% of its members and no longer able to raise financial support in France, the Nauvoo colony of the majority faction ultimately ran into financial difficulties and was forced to disband in 1860. Many of the participants of the defunct Nauvoo colony would join the parallel Icarian colony in Iowa.

Most «Icarians» communities ended in the same way.

On the other hand, the «Shakers» only wanted peace. Their religion established a clear correlation between virtue in work and happiness. Their goods were famous because of its quality and craftsmanship and every negotiator praised them as honest hard-working people that just wanted to live in peace. The result of this hard work is impressive (from the Shakers wikipedia page):

Shakers won respect and admiration for their productive farms and orderly communities. Their industry brought about manyinventions like Babbitt metal, the rotary harrow, the circular saw, the clothespin, the Shaker peg, the flat broom, the wheel-drivenwashing machine, a machine for setting teeth in textile cards, a threshing machine, metal pens, a new type of fire engine, a machine for matching boards, numerous innovations in waterworks, planing machinery, a hernia truss, silk reeling machinery, small looms for weaving palm leaf, machines for processing broom corn, ball-and-socket tilters for chair legs, and a number of other useful inventions.

Hard work and innovation wasn't in conflict. They kept thinking in ways of making their job better and more efficient (something that could contrast with the preconception that many of us could harbor regarding these communities.)

In my experience, too many start-ups are more «Icarians» than «Shakers». Dreams of perfect societies (or perfect work environments) normally end abruptly, even minimal annoyances could make the members defect too easily. Having funding, a big dream or a perfect team of founders is not enough. You need something else too. You need commitment, hard work and craftsmanship. Sometimes you have to ignore the big dream and concentrate in moving forward today. But that's too much, when you have been selling the idea that every member of the community will end up rich (or living like one). And yet having a good, useful product today is the best possible start point to fulfilling the big dream tomorrow.

(Published in https://www.linkedin.com/today/post/article/20140710190309-6333725-icarians-and-shakers-two-approaches-different-results)

Posted in essay, Uncategorized | Leave a comment

Narcissistic design

37 minutes of pure gold.

 

Narcissistic Design - Stuart Halloway from Reaktor on Vimeo.

Posted in Uncategorized | Leave a comment

Empiricism is not a matter of Faith

Scientists reproduce results; engineers build impressive and enduring artifacts; and
theologians muse about what they believe but can’t see or prove.

From «Empiricism is not a matter of Faith» (PDF)

Posted in Uncategorized | Leave a comment

Vim + Fish = "E484: Can't open file /tmp/vRDNVqe/0" error

If you get errors in Vim like:

E484: Can't open file /tmp/vRDNVqe/0

It's because you probably are using the Fish shell. The fix is simple, just tell Vim in the ~/.vimrc config file to use a different shell for running commands:

set shell=/bin/sh

Posted in Uncategorized | Leave a comment

Skype and missing LibGL.so.1 error solution

Just follow the instructions in:

http://askubuntu.com/questions/285642/skype-crashes-with-a-segmentation-fault/285916#285916

Posted in Uncategorized | Leave a comment

Scientific American: «Life on Earth Was Not a Fluke»

https://www.scientificamerican.com/article/life-on-earth-was-not-a-fluke/

Posted in Uncategorized | Leave a comment

30 Free Essays & Stories by David Foster Wallace on the Web

We started the week expecting to publish one David Foster Wallace post. Then, because of the 50th birthday celebration, it turned into two. And now three. We spent some time tracking down free DFW stories and essays available on the web, and they’re all now listed in our collection of Free eBooks. But we didn’t want them to escape your attention. So here they are — 23 pieces published by David Foster Wallace between 1989 and 2011, mostly in major U.S. publications like The New YorkerHarper’sThe Atlantic, and The Paris Review.

30 Free Essays & Stories by David Foster Wallace on the Web

 

Posted in Uncategorized | Leave a comment

The Atlantic: The Rise of the New Global Elite

To grasp the difference between today’s plutocrats and the hereditary elite, who (to use John Stuart Mill’s memorable phrase) “grow rich in their sleep,” one need merely glance at the events that now fill high-end social calendars. The debutante balls and hunts and regattas of yesteryear may not be quite obsolete, but they are headed in that direction. The real community life of the 21st-century plutocracy occurs on the international conference circuit.

The Atlantic: The Rise of the New Global Elite

Posted in Uncategorized | Leave a comment

Bill Stone: The caves and the moon

Posted in Uncategorized | Leave a comment