548 karma · joined September 8, 2011
defer is a function which returns another function. When that returned function is called, we get out of the await block.
So, to take the same example:
await
for k,i in keywords
search k, defer out[i]
Here, defer(out[i]) returns a function. We pass this function to search.Search is like this:
search = (keyword, callback) ->
# do some search
callback(some_result)
And here, by calling callback, which is the function returned by defer, it will end the await block.Here's a trivial example:
await
some_function = (fn) -> fn(1234)
some_function(defer(x))
console.log(x)
defer(x) returns a callback, it's given to some_function. And some_function calls it, which ends the await block.a) The images weren't linked directly to 7signal. b) The html was * slightly* modified, but enough to show that it wasn't the same. 3) A little bit of tweaking here and there to make it * slightly* visually different.
By the way, I'm more playing the devil advocate as, even if this was actually legal, that'd still be an unrespectful move. It's hard something to draw a line between inspiration and stealing. I.e. When you are a beginner, you keep taking stuff here and there. As you become better, you start to use pattern that you've learned. As you become even better, you know that everything you do is based on something, somewhere and can even point to where you've learn it / been inspired by. Only when you really master a subject can you really create something.. and then, it's not a full creation.. it might be only small details.. which will then inspire others.
Note:
I myself had to jailbreak my iphone to install spotify (and asked a friend to pay for it since he's outside of Canada). For some reasons, spotify is illegal here. (Yes, I know, I illegally downloaded an illegal application to legally download/listen to music).
Here's another example:
in: lambdas = [(lambda i: lambda: i)(i) for i in xrange(10)]
in: [f() for f in lambdas]
out: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Why is it a different i? It's misleading because sometime we have a reference and sometime we've got a whole new variable.From their about page:
"What is Tumblr? Millions of people sharing the things they do, find, love, think, or create."
Even if you can do more than a simple blog with tumblr, at its base it is a blogging platform. It's perfect for a startup that is busy doing lots of other things... if it wasn't for the fact that it's always down. I hope they'll someday add a "Always Up and running, no trouble" to their "30 reasons you'll love tumblr".
1.
from __future__ import braces
Use {} to delimit scope!2.
try:
import readline
except ImportError:
print "Unable to load readline module."
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
Used to use [tab]-completion in terminal. One could correctly argue that using iPython would be smarter.. but sometime you are working remotely and don't want to get out of the terminal and install, etc.But yeah, I do agree with you that from a CEO point of view, it's not worth to waste time on this as there are already existing solutions.
Fair enough but still if it takes 1 hour to set it up vs paying 50$*12. (But I get your point, that's why I said I found it a bit risky in another post.. that's the developers mentality vs the CEO's one.)
Programmers are used to configure and hack their way up.. I'd be afraid to ask them to pay for a service that they could quickly "apt-get" on their vps. (I'm exaggerating a little, but you get the point). I mean, for a really small team, just go on freenode and get a channel. (It's obviously free). And for a bigger company, it's worth spending 1-2 hours for that.
I think a free version for small teams would be great. But then, if you can charge for it, why not? :)
Anyhow, I've already offered my help (I'm mostly a django/python dev) but if you need another spare-time contractor feel free to contact me.
(Just wanted to say that mIRC is where I first learned to code.. and this is where I've learned socket, dialogs, etc. I remember, I coded a web server in mIRC to which I'd connect using a client inside mIRC (in @windows).. and I coded the server bot. It was fun time, I miss it.)