73 karma · joined May 9, 2010 (16y ago) · 40 submissions
comment 15y ago · link · parent
I still haven't found an easy way to indent a line N times without pressing ">" 2N times...
comment 15y ago · link · parent
For example, you can define powers of two as:
var powersOf2 = new Stream(1, function() {
return powersOf2.scale(2);
});
(untested) which means that the sequence of powers of 2 begins with 1 follows with the the same sequence scaled by 2!The implementation in the linked article however seems to be flawed, since it doesn't store the node's tail after computing it. This means that to get each element of the sequence you have to compute all the elements before it (even though you already did in order to get to that element).
This works not only for numbers but for other infinite sequences such as expressions in a language. I recommend the book Higher Order Perl if you're interested in this.
comment 15y ago · link · parent
Of course the first syntax breaks when one of the arguments has a space or any other meta-character in it.
8.
Why does the other lane always seem to go faster?(hpyblg.wordpress.com ↗)
1 points · by Amnon · 15y ago · discuss
comment 15y ago · link · parent
The thing that's bothering me about the fail whale -- all the strings that hold the whale are curved. Is this physically possible? (Assuming the birds can hold the whale in the air). Shouldn't at least one of the strings be a straight line?
comment 16y ago · link · parent
Statement 2 is true but it isn't relevant, since you don't know the posterior probability given y. If the envelope contains the smaller amount of money then there is no way you can lose -- it's not a 50-50 chance.
comment 16y ago · link · parent
"a relationship between two anchors, called the head and the tail. The link goes from the tail to the head. The head and tail are also known as destination and source, respectively."
So what we have is "Anchor Head REFerence" when we should simply have "Link DESTination". Think about it when you next design a world changing markup language.
comment 16y ago · link · parent
On this point, a good thing to do is to keep some of the ubiquitous everyday things when you want to throw them away. Especially outdated technology like, say, old mobile phones. In 50 years they will become a rarity.
comment 16y ago · link · parent
Also, in many cases the hypothesis that Wikipedia is correct isn't /very/ likely.
comment 16y ago · link · parent
comment 16y ago · link · parent
Of course the lack of internet access is also related to other things (e.g. food shortage) that I didn't refer to.
comment 16y ago · link · parent
Admittedly, programming has mathematical foundations (algorithms) so it has a good change to still be relevant.
If they do have programs, then the according to the Church-Turing thesis the programs could be translated to human code, but not necessarily in a clear way.