Account Links: Cart | Your Account

Skip to content

Fedora Blogs

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.

Fedora Project

March 24, 2008 10:00 PM

Tom 'spot' Callaway: BANG BANG BANG BANG BANG WHACK WHACK BANG BANG

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.

I found out today that I'm not going to LinuxTag Berlin. I'm disappointed, because I was looking forward to seeing Germany again, but I will get to be home for my birthday for once.

Chocolate Rabbit holiday was good for me, Pam got me lots of unhealthy things to eat. I played some Rock Band, worked on clearing out more items from the Fedora legal queue, and worked through more items on my List Of Doom.

I am really, really ready for Spring/Summer to get here already. This cold weather is not my friend.

I fixed up logjam so that most of the crasher bugs are gone now, thanks to Ray Strode. I still don't understand GTK threading, but he does, and it works better now, which is good enough for me. Plus, it has better tags support (not my work, I just apply the reasonably sane patches). One user is still reporting threading related crashes, but I can't reproduce them. :/

There is a new employee who sits on the other side of my cube wall (it was previously empty), and he BANGS the keyboard like he's trying to break it, instead of simply typing. On top of that, his keyboard is obviously not level, so it is BANG BANG BANG BANG BANG WHACK WHACK BANG BANG, all day long. I have to leave my headphones on all day, just to keep from going insane.

Fedora Project

March 24, 2008 09:00 PM

Chitlesh GOORAH: This week: on the news

Fedora Project

March 24, 2008 08:01 PM

Max Spevack: fedora 9 beta

My secondary laptop has been running Rawhide for a little while now, but today I upgraded my primary workstation to Fedora 9 Beta.

Transaction Summary
=========================
Install 90 Package(s)
Update 806 Package(s)
Remove 1 Package(s)

Total download size: 772 M

It's looking great -- our entire engineering, packaging, QA, and release engineering communities continue to do absolutely tremendous work. Can't thank you all enough.

I have one question though -- on both my laptops, a Think Pad x41 and a Think Pad x60, GDM's screen by default is very dark, and I have to manually adjust the brightness. Has anyone else seen this?

Fedora Project

March 24, 2008 07:27 PM

Paul W. Frields: Wenn man sich in Rom.

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 ]

Fedora Project

March 24, 2008 07:20 PM

Luke Macken: PyCon 2008

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:

  • decode early
  • unicode everywhere
  • encode late
His solution to decoding to unicode turns out to be quite elegant compared to some nasty try/except UnicodeDecodeError blocks that I have written in the past ;)
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
I stayed the entire time for the code sprints, and mainly focused on TurboGears hacking. This is what I ended up working on:
  • Added SQLAlchemy support to turbogears.testutil.DBTest (Ticket #1764). When you inherit from this class, it will automatically set up and tear down your SQLObject or SQLAlchemy database before and after each of your unit tests.
  • Added a FlotWidget using ToscaWidgets to twTools This widget allows you to create attractive graphs with ease.
  • Made the TurboGears2 templating engine configurable (Ticket #1680). Things were hardcoded to use genshi; this is no longer the case.
  • WebTest integration for unit test (Ticket #1762). I wrote a some high level unit testing classes that wrap a WebTest object around your WSGI app. This gives you an extremely powerful API to write "framework independent" unit tests. The WebTest.get/post methods simply return WebOb objects, which allow for drastic simplification of your unittests. This also helped decouple the TG testutils from using CherryPy internals (one step closer to CherryPy3 support in TurboGears). As I mentioned on the TurboGears-trunk list, these changes will make writing unit tests a breeze:
  • 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 actionin 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.

Fedora Project

March 24, 2008 07:00 PM

Jon Roberts: Ginger Beer!


Creative Commons License 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:

  • 2 litres of water, and a two litre plastic bottle (I hear plastic is a good choice rather than glass, because if plastic explodes it’s a mess; if glass explodes it’s dangerous!)
  • 1/4 teaspoon of dried yeast
  • 1 cup of sugar
  • 1 lemon
  • 1 1/2 to 2 tablespoons of grated ginger root

The Method:

  • If you want, peel the ginger, and then grate the root until you have approx. 1 1/2 to 2 tablespoons of grated ginger - depending on taste
  • Juice the lemon
  • Mix the ginger and lemon together
  • Pour the sugar into the bottle
  • Add the yeast to the bottle
  • Add the ginger and lemon mix to the bottle
  • Add water until it is approx 3/4 full, at which point put the lid on tight and shake until all the sugar is dissolved
  • Fill with the remaining water, leaving about an inch at the top to stop it exploding while the yeast ferments!
  • Place in a warm location until the bottle is hard, should take about 24-48 hours
  • When this is done, put it in the fridge over night to stop the action of the yeast
  • Done :)

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.

Fedora Project

March 24, 2008 06:26 PM

John (J5) Palmieri: BOSSA Fun and Productive

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 ]

Fedora Project

March 24, 2008 04:23 PM

Fabian Affolter: Ambassador Poloshirts

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.

We have to pay around 25-30€ per shirt to the manufacturer - you reimburse the Fedora EMEA NPO on LinuxTag 2008 in exchange for your PoloShirt(s).

Add your name and common informations to the list on the Wiki.

Deadline 25. April 2008 08:00 PM UTC

Fedora Project

March 24, 2008 03:58 PM

John (J5) Palmieri: Welcome Matthew

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 ]

Fedora Project

March 24, 2008 02:18 PM

Karsten Wade: Student proposals for Summer of Code 24 to 31 March

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!

Fedora Project

March 24, 2008 01:38 PM

Tom Tromey: Miss Pettigrew Lives for a Day

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.

Fedora Project

March 24, 2008 11:46 AM

Murat Ugur EMINOGLU: Fedora’ da Servisler

Ç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.

devamını oku

Fedora Project

March 24, 2008 11:00 AM

Michał Klich: Święta opóźniają wersję Beta

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

Fedora Project

March 24, 2008 10:08 AM

Eric Christensen: NetworkManager... Where is the prefered WiFi list?

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?

Amanda was visiting a friend up in Cleveland a while back and connected to her friend's WAP (named linksys). Now every time she gets near a "linksys" WAP her computer will jump to it. That includes being at home a mere twenty feet from our own WAP (not named "linksys"). Not only is it very annoying to her but it also poses a security risk to her data and could possibly be illegal.

I haven't had a chance to really investigate this problem, either, as she is always using her computer for school. Maybe I can steal it away at 5 in the morning to take a closer look at the issue.

Fedora Project

March 24, 2008 09:48 AM

Eric Christensen: F9, again... No Suspend Mode?

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.

So when I close my laptop lid the system goes into suspend mode and everything is happy. When I come back to my sleeping monster and lift the lid I get a couple of strange messages. The first one says that my machine didn't actually go into suspend mode, even though I think it really did, and that I may need to visit some non-Red Hat, non-Fedora page for more information or additional software. The second problem is that I get a kernel error.

Strangely enough, Amanda is seeing the same "your system didn't go into suspend mode" message now and she is using Fedora 8.

Haven't really had time to figure out what is going on, exactly, but I will be investigating this more later this week.

Fedora Project

March 24, 2008 09:24 AM

Anthony Green: ggx: Hello World!

[Patch 19 in a series]

This is it. Today we're building and running a "Hello World" C app on the ggx simulator.

Yesterday we identified nine missing instructions required to link hello.c to newlib. They were all arithmetic and logical operators and were simple to implement in all of the tools.

Today's patch also includes a software interrupt instruction (swi). This is the instruction that ggx code will use to talk to the simulator in order to interface with the outside world. Consider, for instance, the primitive function "write"
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

Then the simulator's handling of the swi instruction includes a switch on the interrupt number:

  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;
     }

It's not a perfect implementation (all output goes to stdout, and there's no error checking), but it works for now.

Today's patch and tests really put the toolchain through it's paces, as we'll be simulating thousands of instructions just for hello.c! Our simulator runs to date have been limited to a dozen or so instructions, so this is a big jump...
$ 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

2704 instructions is a lot of code for just Hello World. Consider, however, that this includes all of the system initialization code, such as initializing the heap, allocating IO buffers with malloc(), etc. There's a lot that has to happen before we get to printing our greeting.

To be honest, I skipped a step in there. It's the one where running "hello" fails in many interesting ways and you have to debug simulator traces. There's no avoiding this step. Just think of it as a rite of passage.

In my case, I tracked it down to bad relocation generation in the assembler and was able to fix it thanks again to #gcc IRC folks. Today's patch includes this fix.

When I started this series I wrote that I would show how go from nothing to running real programs on a new architecture by posting daily patches. I think we're there, so I'm going to slow down the blogging effort. But that's not to say that I'm done with ggx. There's still plenty to do. Here are some ideas for work items:

gcc testsuite


GCC comes with a huge suite of tests to exercise code generation. The next obvious step in the development of this toolchain is to start whacking away at bugs identified by the testsuite. I've had a quick crack at it, and a couple of obvious things need fixing. For instance, there's an off-by-one error in ABI handling for vararg functions. There's also no support for trampolines, which are needed for GCC's nested functions extension. Apart from that, the results look pretty good so far.

broader language support


Exception handling is big issue here. The compiler needs to be taught how to deal with C++ and Java exceptions. libffi is also needed for Java.

gdb support


This is a tricky one for ggx. If we were working from a pre-defined ISA, then I would go straight to gdb next. Stepping through code with gdb is much more productive than reading instruction traces from the simulator. But we're not working from a pre-defined ISA with fixed instruction encodings. We're just at a first draft of the ISA and plan to make many changes.

Unfortunately, it looks like a lot of what goes into making gdb work is hard coding recognition of instruction sequences for things like like function prologues. I don't want to have to hack gdb every time I tweak the ISA, so I'll leave this 'til much later in the game.

ISA tweaking


This is where the game really begins. Check out this chart, which shows the static frequency of instruction types used in our hello application:



The most frequently used instruction type is GGX_F1_A4, which is a 16-bit instruction with one operand followed by a 32-bit value. These are all of the "load immediate" and "load absolute" instructions. What we'll want to do is understand everything about these instructions: how and why they're used, and if there's anything we can do to eliminate them or encode them more efficiently. We already know there's 6-bits of waste in the first 16-bits of GGX_F1_A4 because we're not using operands B and C. Perhaps we can use those 6-bits to hold a small constant value. That would turn some number of those 48-bit load-immediate instructions into 16-bit instructions. There will be many opportunities for improvements like this, and it should be interesting to see how dense we can make our code.

Run Linux!


Only half joking here. Truth be told, it builds, but we're a long way from booting...



It's interesting to see that the mix of instructions is completely different in the kernel. The 4th and 5th most frequently used instruction types are swapped. This demonstrates how it will be important to have a good mix of programs at hand while we're tweaking the ISA.

I hope some people have found this series interesting. I'm interested in hearing feedback if you are so inspired.

As usual, today's patch is available in the ggx patch archive.

Fedora Project

March 24, 2008 08:51 AM

Kushal Das: Fishbone and me

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.