Amnon
Amnon on Hacker News
What I do is split the window vertically (C-w v), and resize the left window so that the text in the right window is centered on the screen.
Actually, 10. doesn't necessarily repeat the last command 10 times, it just runs it again with an argument of 10. For example ">>10." will indent the current line and then indent it and the following 9 lines.
I still haven't found an easy way to indent a line N times without pressing ">" 2N times...
The advantage of "streams" is that it can be used to elegantly define infinite sequences recursively.
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.
Of course Python doesn't automatically ensure good code.
But the Python code in your example is readable -- pretty match as readable as it gets, considering the constraints I mentioned.
shells were specifically made to operate with external programs (the Unix way) while Python is a more general programming language, so naturally it will be more verbose for this kind of task.
Of course the first syntax breaks when one of the arguments has a space or any other meta-character in it.
Did anyone notice the mailing list? It's one dedicated to the author. Interesting alternative for a blog.
Yes! Something changed in the search algorithm recently, for the worse. I search for X and get Y. Is this documented anywhere?
(I didn't know that a "+" prefix can fix this. Thanks for the info.)
Posted by
Amnon on Friday December 31, 2010 @08:44AM
from the hpyblg.wordpress.com dept.
It will also be the slowest only 1/3 of the time, so in fact this isn't an explanation why "the other lines" seem to be faster.
Not if you don't know what the Fail Whale is.
Turns out the page is a reference to a certain Fail Whale --
http://www.whatisfailwhale.info/.
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?
Statement 1 isn't true. If you have 10$ in the envelope, and it's the smaller envelope, you gain 10$. But if it's the larger envelope you don't lose 10$. The fallacy is that "x" refers to different things in each case.
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.
Actually I wasn't talking about the monetary value. It's not an investment scheme but a way to keep souvenirs for the future.
(Apparently the people at HN tend to think of everything as a business opportunity ;) )
Interesting. The glossary at
http://www.w3.org/MarkUp/html-spec/html-spec_2.html#GLOSS19 defines hyperlink as
"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.
> Everything in the world has a U-shaped value curve.
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.
Yes, it's a little disappointing. It's like saying the Unix cat is a self referential program since it can be used to display its own source code.
This should be mentioned in every discussion about HN's negative aspects: click your login at the top of the screen and change noprocast to yes. Next time you'll visit HN, you'll see a "Get back to work!" message and hopefully you'll go do something more productive.
What's with the periodicity of the graph? It looks like users who have signed at the beginning of the year -- any year -- are more likely to comment? Or more likely, much more people sign at the beginning of the year. Strange, in any case.
> The end result is that people always tell me I am too skinny even though I eat a lot.
Umm... Doesn't being too skinny mean you're not eating well? (I'm asking because I'm in the same situation).
I wasn't explicit enough about the fact that the article originally attributed the term to Grice, and then an anonymous editor changed it to this scholar who isn't mentioned anywhere else on the Web.
Also, in many cases the hypothesis that Wikipedia is correct isn't /very/ likely.
I wanted to write about how linguistics should be handled by linguists not philosophers, so I checked the citations. I noticed that Wikipedia says implicature was coined by Patrick McBride which, according to Wikipedia is "a retired American soccer midfielder". Turns out the article was edited some time ago by an anonymous user. I guess not enough people visited it to notice.
I suppose you're right. It was the rich man's bias, thinking that you don't need money to be happy. (That word again). Also, I didn't realize that you were speaking more generally.
Of course the lack of internet access is also related to other things (e.g. food shortage) that I didn't refer to.
The "tips and tricks" section is interesting. I didn't know that iterating over node lists can take O(n^2). Also the Closure Compiler was new to me.
> So, how about if we could compile JavaScript into native code?
Isn't that what all modern JavaScript engines do? If so, how are the results for the experiment so good? My guess is that he didn't take the compilation time into account in his own method.
You assume that Internet access makes you happier. I'm not sure. At least they are spared a lot of distractions :)
Imagine humans in prehistoric times thinking about making contact with aliens: "Will their spearheads be made of stone or a more advanced material?" If aliens will come we'll see that the questions you ask here are irrelevant, as the terms programs and programming languages will not apply to their technology -- it will be something completely different.
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.
I tried to click it and nothing happened.
Oh, the link is clickable!
Also, it proves that his name can be spelled without the underscore.
Oh, so that's what A Nation of Shoplifters means! Funny. (It's a song by Carter USM).
How did you skip 4 years?