Say Hello – Nasuni Launches Today!

nasuni_final.png The company I’ve worked for since July of last year – Nasuni Corporation (a startup in Massachusetts) has gone live! This is the culmination of a lot of hard, but exceedingly fun and exciting work over the past months.

The Nasuni team is an excellent one – and one I am very, very proud to be a part of. Our product is called the Nasuni Filer – a simple-to-use, versioned, encrypted and cloud-storage backed virtual NAS (network attached storage) server (click here for more information).

Without going into all of the features, our goal in making this was to make cloud storage simple, accessible and secure – and I know we’ve accomplished all three. All you do is download it, boot it and start using it – once you do so you have access to truly unlimited storage. It’s an unlimited filesystem for the cloud. Here’s the elevator pitch:

Nasuni has developed a virtual file server, called the Nasuni Filer, that delivers unlimited file storage and complete file protection for businesses. Working in partnership with leading cloud storage vendors, the Nasuni Filer leverages the vast capacity of the cloud to store and protect company files offsite, while retaining the local functionality and performance of a traditional NAS.

This technology allows businesses to use the cloud provider of their choice as a replacement for traditional primary storage. Snapshots, file versioning, and offsite storage are integrated into the file server itself – ensuring business file are safe and secure at all times. No need to manage complex backup and DR schemes – if the file server is running, files are protected.

We’ve launched the Beta of the product today – anyone can sign up, download and use it. Anyone can give us feedback and suggestions – I encourage all of you who might need something like this to download and give it a try. If you want – go check out the videos we’ve put together showcasing the Filer (and better yet – check out the awesome animated cartoon we have on the front page).

Most of you know that my blog is mainly Python oriented. Suffice it to say, Nasuni – and the Nasuni Filer make use of Python for a wide range of tasks. We use Python, Django and as much of the Python ecosystem as we can to drive everything from the website, to the GUI on the appliance itself – Python is part of the DNA of the company, and it has served us well. Without Open Source and Python – I don’t think it would have been possible to build what we have built in as little time as we have.

We have a strong dedication to not just Python, but open source in general (and a fair number of us will be at PyCon this month). As time progresses, now that we’re exiting stealth mode we plan on possibly open sourcing stuff we feel would benefit the community. Some of us already push patches back where and when we can, but as I said – as time progresses this involvement will only increase.

So not only am I proud to announce the product, be part of this team and to see what we’ve made, I’m also happy to thank so many people in the Python and OSS community which have helped us reach this point.

So go – check it out, let us know what you think.

Unladen Swallow: Python 3’s Best Feature.

holy-shit-awesome-2.jpgWe all know (well – unless you’ve under a rock) about Unladen-Swallow, the semi-Google-Sponsored optimization-focused branch of Python 2.x. Collin, Jeffrey and many others have been working tirelessly on porting the CPython interpreter over to LLVM, applying optimization patches, writing tests, etc all aimed at speeding up real-world operations and code since before last year’s PyCon – at that time, the first release was already working hard, rendering YouTube’s templates. (See the Project Plan for more information)

You probably also saw the 2009Q3 testing/performance results (here), showing a hefty speed increase for various operation. The 2009Q4 will be coming soon.

What you probably don’t know – yet, is that a PEP is coming, proposing Unladen Swallow be merged back to Python-core – specifically, the Python 3k branch. Yeah, that’s right – a PEP to merge Unladen Swallow back into the mothership, but to Py3k only. Talk about a shot in the arm!

Quoting Collin Winter:

Python 3 is the natural place for something like Unladen Swallow to land: Python 3 is clearly the future, and I think improved performance will be a strong selling point in the language’s favor. What we and others have done for Python 2 applies directly to Python 3.

One of the things we’ve really focused on with Unladen Swallow is creating a solid foundation that the wider CPython developer community can build on top of. We’ve fixed some nasty problems in the x86-64 JIT, for example, so that the CPython community can focus on the fun stuff — more optimizations! Having the basic JIT infrastructure in place and well-tested opens up a world of opportunities that didn’t exist before.

I think PyPy’s focus on research is incredibly valuable. Unladen Swallow has always been about, “what can we achieve right now?” One of our guiding principles has been, Do nothing original, don’t be innovative. PyPy is looking 10 years down the road and thinking, What can we do if we question everything? I think having those different perspectives is important to the community. So, no, I don’t see us in competition (with PyPy) at all.

There’s been a lot of talk about how slow adoption of 3k has been – a backwards incompatible implementation of a widely used language will always have slow(er) adoption then releases of the same language, backwards compatible – but I’d argue that to an extent, part of the reason is that there “haven’t been enough carrots” in the Py3k cart to provide enough of an incentive for projects, libraries, etc to move to it at an accelerated rate.

This, well – this changes things. A significantly faster interpreter, a more rational GIL thanks to Antoine Pitrou – these are the improvements to Python 3 which make it the perfect target to aim for for new projects and libraries. It should drastically help provide the impetus for larger libraries to move over. Things like these are exactly why something like the moratorium make sense, efforts can be focused on the ecosystem of python outside of the syntax, on the interpreter, the standard library, etc.

This is huge; and with a little luck, a lot of discussion and debate – and a ton of work, by the end of 2010, we’ll have not only the best implementation of Python, as a language to date in Python 3 – but the best interpreter as well.

The PEP should go out for review soon, probably within the next two weeks – and more details/information will be coming out at PyCon in February (you’re coming, right?!).

Also see Michael Foord’s post about this news too.

I want your awesome python snippets.

I’m building (and will eventually post someplace) a collection of the cooler Python snippets I dredge up. I’m looking for snippets which are:

  • Short
  • New-to-Python accessible
  • Showcase the best ideas of python – clean, simple, powerful.

The goal is to build up a small pile of code snippets that programming newbies, or programmers from other languages can look at and go “wow, I got to get me some of that”.

Anything is game; feel free to post them in the comments, on pastebin (obviously post the link), etc.

PyCon 2010: Talks I want to see; Keynotes, registration open

So, following the lead of several other PyCon/Python people – I thought I’d share the talks I’m pretty jazzed about, as well as some other bits of PyCon-related news.

First up – early bird registration is open – early bird reg nets you a decent discount on registration fees for PyCon, and will run until January 6th.

Next – for those of you who didn’t see the news, Mark Shuttleworth will also be doing a Keynote at PyCon – this is awesome news. I think both keynotes, his and Antonio Rodriguez’ will be great. I don’t want to speak as to the content just yet – but with two high caliber entrepreneurs/founders, I’m dead sure it will be awesome.

As for the talks I want to see – well, this is criminally difficult. I pretty much want to see almost every single invited talk we have (I’m especially excited about Alex’s, Jack’s, Joe’s and Ned’s talks. I think our invited speakers this year will be very, very popular.

As for talks that “made it through the painstaking review process” I presided over, here’s my personal “gotta see” list:

  • “Understanding the Python GIL” – David Beazley; David’s been hinting at taking his talk he did earlier this year “up a notch” – I can’t wait!
  • “Actors: What, Why, and How” – Donovan Preston. Hell yeah!
  • “Turtles All The Way Down: Demystifying Deferreds, Decorators, and Declarations” – Glyph Lefkowitz; Glyph is a fantastic, and energetic speaker. Definitely looking forward to see this dog-and-pony show.
  • “Using Django in Non-Standard Ways” – Eric Florenzano; I’ve been doing a fair amount of non-standard Django work lately, and I’m interested to see things which may apply to my day-to-day work.
  • “Modern version control: Mercurial internals” – Dirkjan Ochtman and “Hg and Git : Can’t we all just get along?” – Mr. Scott Chacon; these both apply to a lot of the work I’m doing (not the day job) and given the adoption rate of both mercurial and git, and the fact git continues to fill me with a seething rage every time I use it, I desperately need to see Scott’s talk!

That’s a quick top five (six) off the top of my head – and I could probably list out a heck of a lot more. I’m completely jazzed about PyCon this year. We’ve added a fifth track, we’ve got poster sessions, kick ass tutorials, fantastic talks, and rocking Keynotes.

So why haven’t you registered yet?

attending-pycon2010-325x50.png

Python’s Moratorium – Let’s think about this.

Since the news of PEP 3003 being released crossed the ‘web – I’ve seen more than a handful of assertions and statements made that seemed to grossly miss the point.notdeadyet.jpg

I figured I’d expound on my last post to further explain the why of the moratorium and some of the other personal reasons I stepped forward to help author it.

The one that really gets me is the assertion that the moratorium was some ego-driven “python is perfect” statement. That Guido/core dev think the language is “done” and that no new syntax or constructs are needed.

False. Categorically false. Quite the opposite is true. Most of us who are involved on python-dev and python-ideas and the various -sig lists are actually quite sure that some changes, whether they be syntactic sugar for existing things, or new fundamental constructs continue to be “needed” (“nice to have”) for Python The Language.

Still yet; many of us do think of new things to add – there is always a small wish list of “nice to have ponies” waiting in the wings to add to the language by a variety of people. So, no, no one asserts that “the language is done”. We all know, accept and look forward to the continuing evolution of the language over time.

However, language changes have side-effects. For example, context managers introduced two new keywords – “with” and “as” – you should take a moment to go back through the archives to see how many people were up at arms at those two new keywords being added. Apparently, a lot of developers use them as variable names.

To this day, I still download packages off of PyPI which throw warnings about those two keywords. Which is amusing, because they just crash under python 2.6. It was added to __future__ in 2.5 – but became syntax in 2.6.

I only mention this to illustrate the consequence of adding new things – does this mean adding new things is bad? No. Does it mean we have to be wary/aware of the ramifications of doing these things? Yes.

In the past 5 years, Python has gone through an accelerated evolution – decorators, context managers, etc. More new syntax, keywords and cool things have been added to the language than normally occurs in other languages. This has consequences.

The first consequence: Users. Users (developers) who want to support many version of python walk a tight rope. Ultimately, they have to write code for the lowest version (say, 2.3) and make sure their code doesn’t use anything (or any keywords) that will conflict with a newer version. That’s life – I think we, as developers, all accept that.

But the second one is more interesting. The second consequence is more of a recent development. For many years, CPython has been the implementation of Python. When you asked a person “hey, what python interpreter are you running” they typically say “the one from python.org” or “the one that came with my OS” – this is always CPython.

That’s changing. Take for example my surprise when I asked a friend “so what are you guys running” and his reply was Jython. He then lamented the fact that Jython was behind the curve on syntax changes in the latest version of Python, etc, etc.

More and more we see the fact that Python The Language is more than Python The C Interpreter. We have PyPy, IronPython, Jython, Unladen-Swallow (really, a branch of Cpython) and others. Sure, most of the community is still running good-old CPython (“old reliable”) but we’re at a point where more and more people are running “those other guys”.

We’re also at a point where some of the “cool” interpreter changes, such as JIT, free threading, etc are coming from those other interpreters. We face a possible future wherein CPython is just the reference implementation of the language, but most of the world runs “one of the others”. This is not a bad thing! It’s not that the CPython interpreter is dead – it’s simply that the other interpreters have a greater focus on “cool interpreter stuff” which CPython has a focus on “stable”.

Adding syntax, keywords, and new constructs to the CPython implementation negatively impacts those implementations. For the longest time, Jython was simply aiming at Python 2.5 compatibility – I’m sure us adding a pile of new things in every version doesn’t make their lives any easier. Sure, we can feel free to keep adding things in there, but without all of the implementations being at some parity with one another, every time we do so, and ship it, we set them back and possibly confuse users.

Now consider the fact that in the past 5 years, we’ve done a pile of releases, adding a bevy of features to the language, the latest and greatest being Python 2.6. Stop and realize for the moment most of the world is probably still running Python 2.4 or 2.5. Rumor has it, some people are still running Python 2.3. The fact is many operating system vendors, and normal people using python day to day, aren’t getting exposure to the latest and greatest things we’ve added. This means all the cool stuff we’ve added hasn’t seen the light of day – sure, some of it is “pretty minor” – but when you’re adding things to a language, you generally want to see them get used heavily so you know you “hit the mark” and don’t need to go and fix the thing you just added.

It’s important that we don’t (and shouldn’t) just chuck “really cool ideas” in there and then never look back – sure, some of them might be constructs from other languages which have been proven in that language but Python isn’t that language – Python is Python, and we have to be very self-aware to the consequence to Python a change might incur. It takes time, and adoption (see above) of those features to see how they stand up to real-world usage. Sometimes, we simply get an interface/API wrong, or the behavior isn’t as clear as we would like. It happens, but just adding thing on top of thing without taking a moment to consider how it worked out is bad.

Even with an extensive review/PEP process, even with some of the smartest people I have ever had the pleasure of talking to, mistakes happen. The only thing which allows us to see if a mistake has been made is time.

And now we get to Python 3.

Python 3 is an interesting animal – it breaks backwards compatibility in the name of forward progress – some of the changes made to the language required that break to occur. Now, throw a new, backwards incompatible version of Python onto the pile of things users, packagers, developers, OS Vendors, etc all have to deal with. Remember of course the point above – many people are still running/shipping python2.4/2.5. How are we going to get any runtime on the syntax we added in the 3.x line?

Python 3 is the ultimate syntax change – not to mention, to most users it’s several years off for them, given they’re reliant on third-party packages that haven’t ported, their OS doesn’t ship it, etc. For all the problems a “normal” python release suffers with adoption – Python 3 suffers from them in spades.

So now, we have Python 2.6, and Python 3 – both in the adoption pipeline. Python 2.6 is an easier pill to swallow, Python 3 is a bit more painful as it requires much more intervention to port to it, and maintain a compatible code base.

Let’s also account for the fact that, as of this writing, Python 2.7 (scheduled for next year) is intended to be the End of Life release of the Python 2.x syntax – Python 3 being the next evolutionary step.

Python 2.7 is going to be a good release – there’s going to probably be some Python 3 stuff pulled back into it to help porting to Python 3, there will be some “new” things – minor features back ported from Python 3 as well as more migration helpers to assist in the 2 to 3 jump.

Notice in that last part – almost everything going into 2.7 is a feature/change of Python 3 we’re pulling back to help developers and users alike. Big time features and changes are not typically going into 2.7. In fact, there’s a growing number of changes which are not being pulled back into 2.7, Antoine’s recent Global Interpreter Lock changes (also here) being amongst them.

I haven’t even mentioned the fact that every change to the code base has to go into at least 2 branches, and in many cases 4 individual branches (py26-main, trunk, py3k, py31-maint). Many changes don’t have a clean-merge, given the change of syntax each time you move something between trunk and 3k, you have a non zero chance of having to make decent changes to the patch you’re merging. This causes non-zero pain for core maintainers/developers.

So, here we are – a 2.6 release still being adopted by users, OS vendors, etc. A new 2.x release coming down the pike within the next year and a backwards incompatible release (Python 3) also in the pipeline.

At this point, it only makes sense to put a moratorium on the language – we have to artificially put on the brakes for the syntax and core language to make sure the next few releases (2.7, 3.2) don’t increase the burden for adopters. We have to let the other implementations catch up – we have to focus on things like stdlib improvements/fixes/cleanup, we can focus on interpreter improvements, tests, cleaning out the bug list, etc.

The next few releases of Python won’t introduce new language and syntax – they will be releases focused on bug fixes, cleanup – things that make everyone’s life better. This time will serve as a reflection period for the syntax we have, and allow us to help push along Python 3 adoption, maybe helping bigger projects port, improve porting tools and guides, etc.

I’d also like to add – this moratorium doesn’t apply to the standard library! We can still fix things like the mimetypes module, we can improve warts and fix things which are broken. We can keep cleaning the standard library up – we can polish all of those batteries which help make Python, well, Python. Ultimately Python isn’t just it’s syntax – many people adopt it because of the standard library (over 216 modules, at last count) – and that deserve as much, maybe more, attention than adding cool syntax to the core of the language.

So, don’t be afraid of it – don’t think that Python is evolutionarily dead – it’s not. We’re taking a stability and adoption break, a breather. We’re doing this to help users and developers, not to just be able to say “no” to every random idea sent to python-ideas, and not because we’re done.death.jpg

We’re doing it for you – the developer who needs stability, the OS vendor still working on a new release, the language/interpreter implementation group still catching up to 2.6/2.7 and to all the people who would like to adopt Python 3 in the next decade.

Python’s not dead people. It’s just outside sitting in the grass thinking about what it’s going to do next.

PyPI Poll: Comments and Ratings

There is a Poll running on the front of the PyPI page – you have to log in to see it/vote. This poll is asking a question about the new feature(s) of allowing users to comment/5-star-rate a given package in the index.

Some of the Pros/Cons have already been added to the python wiki here, as well as this bug report here. The catalog-sig has some of the discussion as well.

This poll was created in part by this Python-Dev thread. I obviously make my opinion known.

Given my vehemence in the python-dev thread; I’d like to point out I am not against giving package consumers a voice – however, I do not think that as-implemented, these features serve anyone.

As developers of, moderators and community members on any number of social news and voting sites will point out to you – getting the system right takes a lot of time, and planning. Why not borrow pages from their play books?

You also can’t give the users a voice at the cost of the package maintainers – a balance has to be made. You have to protect and moderate out astroturfers, spammers, coordinated attacks against a given package, etc. It’s hard to get right, but easy to get wrong.

With regards to the rating system, Zed Shaw recently had an interesting piece on the bimodality of 1-5 rating systems. Comments on that here and here.

In any case; Martin put the poll up as he wants to get people’s opinions via the votes on this issue. Please take a moment to do so.

If you have suggestions on the actual implementation of a full-blown system for dealing with this, please drop an email to the catalog-sig mailing list.

PEP 3003: “Python Language Moratorium” – Accepted

PEP 3003: “Python Language Moratorium” has been accepted. After several weeks of discussion, Guido switched the bit this morning.

This PEP effectively freezes the syntax and following items:

  • New built-ins
  • General language semantics
  • New __future__ imports

This does not apply to the standard library; adding methods to builtins, or bug fixes to existing things.

I know there’s opinions on both sides, but I see this as a Good Thing(tm) – this hopefully frees up core-dev to work on the standard library, tests, the interpreter, docs, etc – basically everything “else” that makes Python, well – Python.

This quiescence will also allow other implmentations to catch up to the current syntax, builtins, etc. This is a good thing for everyone as Python the language is no longer “Python the C interpreter” – it’s Python the Language as interpreted by unladen-swallow|jython|pypy|ironpython.

There’s also the point that in the last 5 or 6 years, Python as a language has added a pile of new syntax and features that still haven’t seen wide spread use. For example, context managers. Operating System vendors lag behind us in terms of releases. We need to see these things used in the wild to see if the various experiments work.

Yes; this slows the development of the language down, but given most of the known world is still on 2.4/2.5 – does it really fundamentally effect anyone other than outliers (early adopters) and core-developers?

We’ll see how the experiment goes.

PyCon 2010: Talks are live!

The official talk list for PyCon 2010, happening in February in Atlanta Georgia is now live:

http://us.pycon.org/2010/conference/talks/

My thanks go out to every author, and person involved in getting us this far. With out the hard work of a lot of people, this would not have been possible.

Dive Into Python 3: The Foreword

Several months ago; Mark Pilgrim contacted me, asking if I would be interested in writing the foreword to Dive Into Python 3 – the latest revision to his seminal book Dive Into Python.

After I was done being flabbergasted, and after I picked myself off the floor, I gladly accepted. What follows is what I wrote, and what will appear in the print edition of Dive Into Python 3 (amazon link).

I wanted to convey my passion for both the language, the community – for everything involved in this. I wanted to explain why I, as just another developer see Python 3 as critical to the evolution of Python the Language. I also wanted to convey my thanks to Mark for a book which fundamentally helped alter what path I’ve taken in my life.

I hope you enjoy it, and I hope you enjoy Dive Into Python 3.

Seven years ago, had you asked me if I would be sitting here writing the foreword to a book, much less the foreword to a programming book – I would have looked at you incredulously and I’d have probably laughed.

Yet here I am. Seven years ago, I was simply a test engineer with some scripting skills and a systems administration background. Not a lot of programming and no passion for it, by any stretch of imagination.

One day, a soon-to-be-coworker of mine mentioned this “new” “scripting” language called Python. He mentioned it was easy to learn, and might add to my skill set – although I was wary – programmers seemed to be so separated from my “real world” of tests and systems and users. I went out to the nearest bookstore and bought the first book I found.

The book I bought was the original Dive Into Python by Mark Pilgrim. I have to think that I am not the only person who can say without exaggeration that, that book changed my life and career forever.

Mark’s book – his passion for Python and presentation, and the language itself fundamentally altered the way I thought. It drove me to not just read “yet another book about tech stuff” – it drove me to code, to represent my ideas in a completely new, alien way. His passion for the language infected me with a newfound passion.

Now, seven years later, I’m a contributor to the Python standard library, an active community member and teach the language to as many people as I can. I use it in my free time – I use it at my job. I contribute to it in between my daughter’s naps. Dive into Python – and Python itself changed me.

Python, as a language may not be the prettiest nor the most flexible language out there. What it is though, is clean, simple and powerful. Its elegance lies in the simplicity and the practicality it holds dear. Its flexibility lies in enabling you, or anyone to get something – anything – done and just “getting out of your way”.

I’ve said for some time – the beauty of Python is that it scales “up” – it’s useful for someone just wanting to do some math, or script something simple, while staying useful for programmers wanting to create large scale systems, web frameworks and multi-million dollar video sharing sites.

Python has not been without its warts though. Building a language is much, at least in my mind, like learning to program. It’s an evolutionary process where you constantly have to question the decisions you’ve made, and be willing to correct those decisions.

That’s what Python 3 fundamentally is. It’s both the admittance of mistakes and the subsequent fixes, removing some of the warts and maybe introducing some new ones. Python 3 shows a self-awareness and willingness to evolve in much needed ways you don’t see in a lot of things.

Python 3 does not redefine, fundamentally alter or suddenly invalidate all of the Python you knew before – what it does is take something which is time-proven and battle worn and improve on it in rational, practical ways.

Python 3 also doesn’t end the evolution of the language – not by any stretch. New features, syntax and libraries are still being added, and will probably be added, tweaked and removed for as long as Python itself lives on.

Python 3 is simply a cleaner, more evolved platform for you, the reader, to get things done.

Much like Python 3 – “Dive into Python 3″ is an evolution of something which was already very good into something even better. Mark’s passion, wit and engaging style is still there. The material has been expanded and improved and updated, but like Python 3 itself – it’s still the same thing which gave me a passion for programming.

Python’s simplicity is infectious. The passion of the community, and the passion with which the language was created and maintained is astounding.

I hope Mark’s passion, and Python itself inspires you, like it did me. I hope you find Python, and Python 3 to be as practical and powerful as hundreds of thousands of programmers and companies across the world.

Jesse Noller
Python Programmer

Python 3to2: Go check it out.

awesome.jpg Earlier this week – Joe Amenta shot an email to the Python-Dev mailing list announcing the completion of the Google Summer of Code project he had be working on – a Python 3 to Python 2 translation tool.

This is something which, when discussed at the Python Language Summit at PyCon 2009 was met with much “yes please make this” – but not a lot of people could allocate the time. In fact, when asked who could at least help drive it forward, I was lame^H^H^H awesome enough to raise my hand.

In true upper management style, I discussed it, and promptly delegated it to Benjamin Peterson, our release manager to later delegate to a google summer of code project.

Some work was done during the sprints – I don’t know if that work ended up being part of this, but thanks to Joe, we now have the first alpha of a Python 3 to Python 2 conversion tool.

Here’s Joe’s announcement:

Hello all,

I have released the first alpha version of 3to2 after finishing it for my Google Summer of Code 2009(tm) project. You can get the tarball for this release at http://bitbucket.org/amentajo/lib3to2/downloads/3to2_0.1-alpha1.tar.gz. This requires python 2.7, because it requires a newer version of 2to3 than what comes with 2.6.

Release notes are in the RELEASE file. Development happens at http://bitbucket.org/amentajo/lib3to2/, and the source code for this release lives at http://bitbucket.org/amentajo/3to2-01-alpha-1.
Report bugs at http://bitbucket.org/amentajo/lib3to2/issues/, please.

Additional notes and comments can (for now) be found at http://www.startcodon.com/wordpress/?cat=4.

–Joe

This is awesome – again, major props to Joe (and Benjamin!) and GSoC for making this happen. Please, please, please – if you have free time, go give it a shot. Especially if you have real, honest-to-goodness Python 3 code you’re working with.

Right now, it’s probably too early to get near python-core – there’s some discussion of that going on in the thread on Python-dev, but I personally feel if we can bang the hell out of this and get a lot of eyes looking at it, it would go a long way towards helping Python 3 adoption along.

Go check it out – again, the project page is here, and Joe’s notes on things 3to2 does not accept is here.

p.s. The first person to write an online 2to3 -> 3to2 app ala translation party gets mad props, and a bottle of something alcoholic at Pycon.