United States (change)
Shortcuts: Downloads Fedora Red Hat Network
Account Links: Cart Your Account
Fedora Blogs is an aggregation of blogs kept by members of the Fedora community. The opinions expressed are their own, and are not necessarily shared by Red Hat, Inc.
March 24, 2008 10:00 PM
Lets see, what is going on with me... I'm going to Porto Alegre, Brasil in April for FISL. This will be my first trip to South America, another continent down. Now, I just need to visit Australia, Africa, and Antarctica.March 24, 2008 09:00 PM
March 24, 2008 08:01 PM
My secondary laptop has been running Rawhide for a little while now, but today I upgraded my primary workstation to Fedora 9 Beta.March 24, 2008 07:27 PM
I am really looking forward to my trip to Berlin in May for LinuxTag 2008. I’ll get to meet a lot of the Fedora Ambassadors from Europe who make up such a thriving part of our community, to see Europe’s biggest .com-meets-.org Linux trade show, and (hopefully) to realize how little I remember of my high school and university German classes.
I got a chance to talk briefly today on IRC with one of our German contributors and subject him to some of the awful (and probably second-grade, or “zweiter Klasse”) German I remember…
Gabi, es klingelt! Geh doch mal ran!
Mein Deutsch ist schrecklich.
Diese Kleider sind sehr chic!
And most importantly,
Helfen Sie mir, ich bin ein Dummkopf.
That one will come in REALLY HANDY.
[read this post in: ar de es fr it ja ko pt ru zh-CN ]March 24, 2008 07:20 PM
I was in Chicago last week for PyCon 2008. It was my first time in the windy city, and I must say that I was thoroughly impressed. As expected in any city, we got a chance to see a lady get her purse snattched, and a mentally unstable gentleman on the train yelling profanities at god. Anyway, the conference itself was extremely well done, and tons of awesome innovation happened at the sprints afterwords.
Day 1: Tutorials
8+ hours of TurboGears/Pylons/WSGI tutorials. Awesome. I'm really
excited with what is in the works for TurboGears2. By wielding Pylons, the
TG2 team was able to completely re-write their framework with minimal amounts
of code, while at the same time, gaining a *ton* of new features
and some amazing middleware. Mark Ramm and Ben Bangert took turns walking us through the
deep internals of their frameworks, while also giving some examples how to use
them.
Sessions
During the 3-day conference portion of PyCon, there was a vast plethora of
incredibly interesting sessions and conversations. You can find a schedule of
the talks and some slides here. Everything was
video taped as well, so the sessions should be making their way on to YouTube
hopefully at some point soon.
Here are some things that caught my attention while I was there.
WSGI
Defined by Phillip J. Eby in PEP-333, the Web Server Gateway Interface is a simple interface between web servers, applications, and frameworks. Or, as explained by Ian Bicking: WSGI is a series of Tubes. The basic idea is that it lets you connect a bunch of different applications together into a functioning whole.
Since TurboGears2 is based on Pylons, it will be a full blown WSGI application out the box, loaded with lots of useful middleware (WebError, Routes, Sessions, Caching, etc), and will allow you to use any WSGI server that you wish (Paste, CherryPy, orbited, mod_wsgi, etc).
An example of a basic Hello World WSGI application:
def wsgi_app(environ, start_response):
start_response('200 OK', [('content-type', 'text/html')])
return ['Hello world!']
So, what is WSGI middleware? Well, it's essentially the WSGI equivalent of a python decorator, but instead of wrapping one function in another, you're wrapping one web-app in another. You can see a list of some existing WSGI middleware here.
virtualenv
With so many new shiny python programs to play with, I really tried to resist
the urge to easy_install everything into my global Python site-packages so I
could tinker with things. This is generally a Bad Thing in a distribution, as
easy_install not only installs things behind your package managers back,
but it also lacks the ability to uninstall anything with it, unless you want to take Zed's easy_fucking_uninstall
approach ;) During the TurboGears tutorial, I was introduced to a tool call
virtualenv, which will setup a virtual python environment in which you can
easy_install as many eggs as you want without worrying about butchering
your site-packages.
$ easy_install virtualenv
$ virtualenv --no-site-packages foo
$ cd foo; source bin/activate
$ easy_install <shiny python programs>
nose
I've been in love with nose since day
one, but realized that I haven't been utilizing it to it's fullest abilities.
I blogged in the past about nose's
profiler plugin. Come to find out, nose offers a lot more plugins that can
seriously help make your life easier:
$ nosetests --pdb --pdb-failures
.............................................................> /home/lmacken/tg1.1/turbogears/turbogears/identity/tests/test_visit.py(92)test_cookie_permanent()
-> assert abs(should_expire - expires) 3
(Pdb) locals()
{'morsel': <Morsel: tg-visit='452c94de3900fc2adff2cd6b0b0f04c4533e3e9e'>, 'self': <turbogears.identity.tests.test_visit.TestVisit testMethod=test_cookie_permanent>, 'expires': 1206228604.0, 'should_expire': 1206232205.0, 'permanent': False}
(Pdb)
You can also measure code coverage during your unit test execution using the '--with-coverage' option, which utilizes coverage.py.
SQLAlchemy
Also known as "the greatest object-relational-mapper created for any language. ever.", 0.4 has seen vast improvements since 0.3. Among them, a new declarative
API is now available that essentially lets you define your class, Table and
mapper constructs "at once" under a single class declaration (giving you a
similar ActiveMapper feel like SQLObject or Elixir).
from sqlalchemy.ext.declarative import declarative_base
engine = create_engine('sqlite://')
Base = declarative_base(engine)
class SomeClass(Base):
__tablename__ = 'some_table'
id = Column('id', Integer, primary_key=True)
name = Column('name', String(50))
Unicode, demystified.
By far, the most frustrating problems I've ever encountered in Python have been
unicode related. I was fortunate enough to catch Kumar McMillan's
presentation, "Unicode in Python, Completely Demystified". This presentation
helped enlighten many on the concept of unicode, clear up many misconceptions,
and explain how to handle it properly in Python. Check out his slides for more details, but
the general idea here is to follow these three rules:
def to_unicode_or_bust(obj, encoding='utf-8'):
if isinstance(obj, basestring):
if not isinstance(obj, unicode):
obj = unicode(obj, encoding)
return obj
Later that night I went and shined some light on some dark corners of certain projects that I've been working on to try and handle unicode the Right Way.
Grassyknoll
After the code sprints, I got a chance to see these guys show off their hard
work. grassyknoll is a
search engine written in Python. With the ability to handle multiple backends,
frontends, and wire formats, grassyknoll has a ton of potential to
revolutionize the open source search engine. There has been recent talk in
Fedora land about what kind of search engine to use, and I think grassyknoll is
definitley a viable option.
Packaging BOF
Toshio, Spot, and I attended a Packaging BOF where we discussed our
experiences with distutils and setuptools with a bunch of people from various
companies and distros. This then sparked discussions on python-dev and the
distutils-sig mailing lists. You can also find the details of the BOF session
on the Python wiki. There
is definitely a lot of energy behind this, so hopefully we'll see some good changes
in setuptools in the near future that will make our lives as distro packagers much easier :)
Orbited
Orbited is an HTTP daemon that is optimized for long-lasting comet
connections. This allows you to write real-time web applications with
ease. For example, embeding an irc channel anywhere:
You can also use orbited as a WSGI server! Toshio did some brief benchmarking of of CherryPy{2,3}, Paste, and Orbited WSGI servers, and orbited seemed to be the clear winner in all scenerios. There is a good chance that we will be using orbited to handle our comet widgets within MyFedora :)
Code Sprints
class TestPages(testutil.DBWebTest):
def test_forbidden(self):
self.app.get('/hot_action', status=403)
def test_webob_response(self):
user = User(user_name=u"test", password=u"test")
self.login_user(user)
res = self.app.get('/hot_action')
assert "Hot WSGI action" in res
assert res.namespace['tg_flash'] == u'Hot WSGI action'
The WebTest integration is planned to hit in the TurboGears 1.1 release, deprecating testutils.{call,create_request}.
Want to read more blog posts about PyCon 2008? You can find links to lots of PyCon related posts here and on Planet Python.
March 24, 2008 07:00 PM

photo credit: vieux bandit
Ah, the holidays are a great time to try out new stuff
I love ginger beer, by itself and it goes very nicely with whiskey too. Anyway, I decided it would be fun to try and make some ginger beer from scratch, so I googled around and found a recipe (actually the first result for “ginger beer recipes”), bought the ingredients and mixed it all together. Right now I have a two litre bottle of the mix sat next to my radiator, where I’m hoping it won’t explode while the yeast ferments over the next few days!
The recipe is below, but I’m linking back to the original post too because they deserve the credit - and are an ORG supporter too!
Ingredients:
The Method:
Hmm…2 days and I should have some nice ginger beer! Maybe I could use this recipe to work on my technical documentation skills :p
All in all, it’s been a really great easter weekend and I’ve enjoyed it very much. What’s nice is that I have another 4 weeks of holiday left!! Of course, all that time isn’t for relaxing, I need to write essays/revise and possibly find a job to earn a bit of money for the summer.
March 24, 2008 06:26 PM
I got back from the BOSSA conference last week. It still is my favorite conference for just talking to people and getting things rolling. The organizers keep it small and limit the number of talks so that people can get to what they do best and just talk to each other. While I am no longer directly involved in embedded development I still feel this should be the target of most developers. A win on current generation embedded devices means improvements across the board from those devices to the desktop and even the server room. Most of my debugging and optimization techniques for D-Bus, the focus of my BOSSA talk, were gained from working with it on embedded devices. I continue to gear my work with the idea that in the near future a large portion of the people consuming those technologies will be doing so on devices that are considered to be “embedded”.
[read this post in: ar de es fr it ja ko pt ru zh-CN ]March 24, 2008 04:23 PM
If you are an ambassador and come to LinuxTag 2008 you can order again the Fedora Ambassadors Poloshirts. Maybe one ambassador of your country attend there, then you should also order and instruct him to bring and ship it if he/she is back.March 24, 2008 03:58 PM
For those of you in Fedora land who don’t know Matthew Garrett has just accepted an offer from Red Hat . If that name doesn’t ring a bell, it should. Matthew is one of the reasons Linux works on laptops. Being one of the few people who truly understands Linux from the hardware all the way up to the desktop, he will be spending his time working on power management in both Kernel land and Userspace.
It is great to see my company recognize the need for such improvements and hire top notch people to get it done. Welcome aboard Matthew.
[read this post in: ar de es fr it ja ko pt ru zh-CN ]March 24, 2008 02:18 PM
One week window to choose and propose.
If you are looking to be a mentor, you need to sign in with a Google/Gmail account and request to be a mentor of “The Fedora Project & JBoss.org”:
http://code.google.com/soc/2008/mentor_home.html
Please do that immediately, thanks!
March 24, 2008 01:38 PM
We had read a lukewarm review of this on imdb, but we went anyway — and loved it. The plot is a bit thin, perhaps, but the movie has a sweet heart, the cast is good, and the sets and costumes are fantastic.
March 24, 2008 11:46 AM
Çalışma seviyeleri
Runlevel 0 : Bu seviye halt (kapatma) seviyesidir. telinit 0 diyerek sistem kapanır.
Runlevel 1 : Single-User Mode olarak bilinen
çalışma seviyesidir. Network, X ve çoklu giriş kullanıma kapalıdır. Bu
mod sistem bakımı ve kurtarımı yapmak için kullanır. Genelde sistem
yöneticileri yedekleme, kurtarma ve onarma için bu seviyeyi kullanır.
Runlevel 2 : Multi-User Mode olarak bilinen çalışma seviyesidir. Çoklu kullanıcıya izin verip text tabanlıdır.
Runlevel 3 : Runlevel 2 ‘nın aynısı olup network desteğide mevcuttur.
Runlevel 4 : Bu seviye tanımsızdır.
Runlevel 5 : Multi-User, network ve X desteği vardır. Gnome ve kde gibi grafik arayüzleri bu seviye de çalışır.
Runlevel 6 : Bu seviye reboot (yeniden başlatma) seviyesidir. Sistem baştan başlar.
March 24, 2008 11:00 AM
Bardzo dobra decyzja spoglądając z polskiego punktu widzenia (Zdaję sobie sprawę z istnienia innych religii, sam jestem odmieńcem w naszym kraju, jednak co tradycja to tradycja). Święta spędza się przede wszystkim z rodziną a nie z Anacondą bądź yumem. Dlatego decyzja o przesunięciu wydania Bety na wtorek jest słuszna.
Co prawda zanim bym to pobrał minęło by parę dni oraz jutro oddaję po raz kolejny laptopa do serwisu, z kolejną reklamacją, jednak z punktu widzenia przeciętnego fana Fedory planowany poślizg to dobry pomysł.
Po serwisowaniu, z rozkoszą zainstaluję pobrany wcześniej u brata obraz Beta
Pozdrowienia
March 24, 2008 10:08 AM
I know somewhere there has to be a file that retains information on the wireless access points (WAP) that you connect to using Network Manager. Anyone know the name of that file? March 24, 2008 09:48 AM
Well, I loaded Fedora 9 Alpha (mostly Beta) onto my laptop, again. Everything seems to be working pretty well but I am having one fairly large problem.March 24, 2008 09:24 AM
[Patch 19 in a series]int write (int fd, const void *buf, size_t len); We implement a system call in libgloss like so:
/*
* Input:
* $r0 -- File descriptor.
* $r1 -- String to be printed.
* -8($fp) -- Length of the string.
*
* Output:
* $r0 -- Length written or -1.
* errno -- Set if an error
*/
write:
swi SYS_write /* SYS_write is a constant 5 */
ret
case 0x5: /* SYS_write */
{
char *str = &memory[cpu.asregs.regs[3]];
/* String length is at 0x8($fp) */
unsigned count, len = EXTRACT_WORD(&memory[cpu.asregs.regs[0] + 8]);
count = len;
while (count-- > 0)
putchar (*(str++));
cpu.asregs.regs[2] = len;
}$ cat hello.c
#include <stdio.h>
int main()
{
puts ("Hello World!");
return 0;
}
$ ggx-elf-gcc -o hello hello.c
$ ggx-elf-run hello
Hello World
$ ggx-elf-run -v hello
ggx-elf-run hello
Hello World!
# instructions executed 2704 

March 24, 2008 08:51 AM
Was having breakfast , rice and fish curry was in menu. Suddenly understood a bone stuck inside my throat . Tried to swallow it inside by having balls of boiled rice (old Bengali way). But never helped. Then I went to the nearest hospital and they said they don’t have a ENT dept, so again I ran to another big hospital .
The receptionist asked me to fill a form , but after looking at my condition, she took me to the doctor fast. He did local anesthesia and after couple of minutes manage to remove the bone. It was a broken piece , very small.
This is actually second time in my life. Last time same happened around 7-8 years back.