This was definitely one of those "ah-ha!" moments in my programming journey.
Take a read of Implementing "weightless threads" with Python generators
Some ideas are so simple they're hard. I think this is one of those cases.
This was definitely one of those "ah-ha!" moments in my programming journey.
Take a read of Implementing "weightless threads" with Python generators
Some ideas are so simple they're hard. I think this is one of those cases.
Don't look now, but there has been a new release of Python Mode for emacs. I just happened to look by chance. First time in years and it appears as if it just came out! Loaded it up and - bam! Didn't really notice any difference. I guess that is a good thing.
So if you're the one person I know that develops Python and uses emacs make sure to update your stuff.
Since it has already been hilarious to look back at the things I thought were cool in the past, I wanted to write up something about all the tools I find most useful today.
What is LaunchBar? It's kind of like trying to describe how the Internet works. It's both simple and complex at the same time, yet all encompassing. Launchbar is an app launcher - simple. And then their blurb:
LaunchBar is a smart and powerful, keyboard driven productivity utility that lets you access and control every aspect of your digital life.
After the development of Quicksilver stagnated and I could no longer get it working (something having to do with perl and macports) I found LaunchBar. After a few weeks of retraining my fingers it is definitely something that I can't do without. The built-in help is excellent, but there are so many features that I can only seem to add about one a month to my repertoire. Very much like learning new vocabulary or any new key combination in Emacs.
This text editor is second to none. Except maybe Emacs which I'm using to type this. I constantly alternate between Emacs and Textmate depending on the task at hand. Textmate has incredible bundles (modes) for almost all programming languages including many of the popular Javascript libraries.
A new version has not been released in years and a development seems to have stalled out. Though, considering Emacs hasn't changed significantly in 300 years there is really nothing to complain about. Textmate still works great!
When I was looking for something a little more light weight than Photoshop yet powerful enough to do some fancy image editing I found Acorn. Some great built-in filters for some fancy effects. Simply a great little graphics editor for the price. This is one of those programs I don't use very often, but when I need it - I need it.
I can honestly say Omnigraffle is an indispensable tool in my arsenal of graphic design utilities. Actually, it is about the only one I use these days. I've done everything: logos, birth announcements, business cards, letterhead, web page mock ups, fancy pdf editing. It is so cool I find it hard to describe. Kind of like Visio meets Photoshop - except usable by normal humans. It tends to do the right thing most of the time. Impressive.
This is one of those OMG why didn't I know this before moments. Been developing python for how many years?
Was slapping some doctests into an ancient library written years ago and searched for... I don't even remember. But ran across this little gem about %doctest_mode in iPython
http://renesd.blogspot.com/2009/08/ipython-and-doc-tests-cutting-and.html
Outrageously cool. Game changing. Life altering. Okay, at least outrageously cool.
For my couple of friends writing in python it's totally worth checking out.
gleaned with respect from http://maradydd.livejournal.com/293666.html
C: You are a paranoid schizophrenic who spends most of your time confused about which type you should be, convinced that blatantly false things are true because your extreme efficiency leaves no room for sensible error checking. Moreover your terseness encourages people to interact with you badly, providing incomplete and ambiguous instructions for which you nevertheless come up with a legal interpretation, even though most of the time it is completely nonsensical. People come to you because you promise them simplicity, not realising that below the surface you're a rat's nest of issues. In the end you are always abandoned for someone like C++ or Python.
Python: Python cares deeply about you and does its best to make your life easier. Python is willing to try new things to make you happy -- "Sure, I can do generators, if that's what you want" -- and really doesn't mind if you're seeing other languages on the side. It insists upon arranging the cupboard into strict rows, but you stop noticing after a while, and eventually you come to prefer your shelves organized this way. Your friends think this is weird until they start dating Python too.
Ruby: Your older sister is the most popular cheerleader in school, but she's kind of a slut. You think that maybe if you add more features, the boys will like you just as much.
PHP: You've seen what works for Ruby and you think it will work for you too, but you haven't figured out that lipstick doesn't go on your cheeks and you shouldn't brush your hair with a mascara wand.
C++: C++ has seen people in love, and thinks it has everything figured out. C++ thinks it loves you, but it errs on the side of being controlling when it thinks it's being concerned and caring.
Ada: You are far more flexible than C++, and know how to be strict and forgiving at the same time. However, your tendency to wear the bondage and discipline gear all the time, as opposed to when your lover asks you to bring it out, frightens people off. You need to learn to stop calling people "worm" and "slave" in front of their mothers.
Java: You try to be loving, but you were raised by a commune of 60 nervous women who have told you that everything you do is loving, even when it isn't. Your unhelpful behaviors have never been corrected and everything you do is subtly wrong and destructive.
JSP: You are Java's younger sister, working in a strip club to pay for your women's studies degree.
Perl: You're incredibly enthusiastic and you have five different ways of doing anything that anyone could possibly want to do. As a result, you tend to overwhelm people and you leave a bad impression on people who could otherwise benefit from knowing you. You promise people answers to all their questions, but you're not ready for a real relationship. You like to guess what people want, but tend to jump to conclusions. When other people would say "what, really?", you've already gotten out a ball-peen hammer and a tub of beeswax. Because of this, people find themselves speaking to you using a range of expressions and vocabulary even more limited than what they'd use for someone who didn't speak the language at all.
Smalltalk: Smalltalk won't meet you outside Smalltalk's apartment. Smalltalk says that if you really loved it, you wouldn't leave.
OCaml: You know yourself to be fast, smart, and extremely reliable. However, you look kind of funny and nobody really wants to talk to you. You spend most of your time sitting in a public library glaring at people, occasionally yelling "NOBODY HERE APPRECIATES MY GENIUS!" and getting kicked out.
Prolog: You are a deaf and blind synthaesthete, who experiences the world entirely through smells, each of which triggers expansive flurries of poetry and music in your mind. Certain problems are trivial for you, but nobody will ever understand the answers you give them, because your numbering system involves colors that cannot be perceived by humans. Prolog can sometimes have a good time with people, but it's hard for a person to stay with someone who only wants them for their ochre vibrato.
Lisp: Lisp cares about you, but really loves itself more than it will ever love you. Lisp thinks that it's the world's greatest lover, and it is a lot of fun, but it's completely blind to its own inadequacies. Watch out: it flies into a rage if it finds you've been seeing C on the side. Lisp swears up and down that it can be anything and anyone you want, and in a lot of ways it's right, but in the end, it's still Lisp.
Logo: Lisp's adorable 7-year-old niece who likes to play with her toy turtle. On casual conversation, she proves to be disturbingly worldly and well-informed. You resolve not to let your kids play around Lisp's house. Thinking about using Logo in any serious way makes you feel a bit dirty.
Visual Basic: You're a fifteen-year-old girl with her very own computer in her room, pinging random strangers on AIM and claiming to be a 23-year-old girl who wants to cyber with them. However, your efforts fail at convincing people, mostly because you aren't very imaginative and most of the things you're promising them are ideas you ripped off from other sources and changed slightly, leaving them less believable.
ASP.NET: As above, except you're a fifteen-year-old boy.
Objective C: You grew up in a cold and loveless home. Everything you know about love, you learned by listening to Smalltalk and Lisp's sex parties in the apartment next door. Now you have met a sweet young thing named Darwin, and you are eager to please.
Dylan: Sombody sat Lisp down and told it it was too clingy. Now it's bipolar.
Twisted: Twisted Python not only loves you, it loves everyone, in 10ms intervals, on demand. But once you learn to take turns, you don't notice the difference.
E: E is very clear about its hard limits, and there are a lot of them. It tells you up front what you're not allowed to do, and sometimes you end up forgetting what you can do without pissing it off.
lex/yacc: lex and yacc are those twins you have a one-night stand with every couple of years. In the intervening period, you forget all about the neat tricks they can do, and every time you meet up you end up learning them all over again. But they're really rather one-sided, and schizophrenic in the same way C is, so in the end it's good that they're not after you for a long-term relationship.
Haskell: Haskell is pretty, but always uses an elaborate range of prophylactic techniques. By the time you're all in place, the person you're with no longer resembles Haskell. If you've had other lovers, Haskell doesn't like many of the things that you may have come to enjoy doing with them. Haskell will pretend never to have heard of these things, and call you a pervert.
SML/NJ: You cannot take anything away from a relationship with SML/NJ that you did not bring with you. If you leave anything at SML/NJ's apartment when you break up, SML/NJ will leave it on your doorstep without ringing the bell.
Assembler: Assembler has no limits -- none whatsoever -- but you have to make it do what you want. It will not make a move to help you; assembler just lies there.
FORTRAN: FORTRAN isn't a real relationship. Telling people you're happy with FORTRAN is like telling people you'll be happy taking care of your cats for the rest of your life and don't really need another person.