Archive for the ‘computer science’ Category

Supporting Python 2.5 features in PyPy – GSoC 2008

Tuesday, April 22nd, 2008

As you probably know my GSoC proposal to work on PyPy interpreter, supporting the Python 2.5 features, has been accepted. This post is a short explanation of my Google Summer of Code project.

PyPy

The PyPy project aims at producing a flexible and fast Python implementation. The guiding idea is to translate a Python-level description of the Python language itself to lower level languages. Rumors have it that the secret goal is being faster-than-C which is nonsense, isn’t it?

PyPy is divided into the python interpreter and the translator framework. The interpreter is written in RPython (a subset of Python) and the main goal is to provide an easy-to-hack (for python programmers ;) ) Python interpreter.

PyPy’s interpreter currently supports only a few features introduced in Python 2.5, like __index__ (for slicing) and some part of the ‘with’ statement. Also, the 2.5 changes to the language and to the standard library have not been ported yet (although some have been, like the ctypes).

Goal

This proposal idea is to bring Python 2.5 features and changes to PyPy interpreter, this includes porting the modules and writing code for the features it self.

Here are some of the features I’ll work on:

  • PEP 308: Conditional Expressions[*]
  • 328: Absolute and Relative Imports
  • PEP 342: New Generator Features
  • PEP 343: The with statement[*]
  • PEP 352: Exceptions as New-Style Classes

[*] part of this features are already supported by PyPy

Benefits

With support to 2.5 features and changes more the PyPy interpreter will be up-to-date so people who wants to use this features can be happy using PyPy. This probably means more people using PyPy (i hope!) :-)

Why this project?

The first reason I’ve chosen the PyPy project is that I really like their ideas and goals. I was looking for collaborating to it in some way for a long time, but it took me some time to read the docs and to really understand the project.

As I like PyPy ideas and I’m starting to plan my graduation project/bachelor’s thesis, my work on PyPy interpreter will be a big part of it. Maybe I can explain my ideas in another post :-)

I would like to thank Google (and the SoC folks), Python Software Foundation, PyPy and specially to Carl Friedrich Bolz* who will be my GSoC mentor and Leonardo Santagada who helped me to understand PyPy and to write my application.

* morepypy is a blog where PyPy developers talk to the community, it’s not Carl’s personal blog.

Thanks to my friends from Python Brasil community too.

Approved in GSoC

Monday, April 21st, 2008

As mentioned before I’ve applied to GSoC to work on PyPy for the Python Software Foundation.

Today I’m very happy to say that my project got approved and I will work on PyPy interpreter the next three months. It means that a lot of PyPy posts are coming, and the first one will be a introduction to the project, what is PyPy, the interpreter and the translation framework :)

Stay tuned if you are interested in PyPy! Congratulations to everybody that have applied to GSoC this year =)

Google Summer of Code 2008

Wednesday, March 26th, 2008

Well, it’s time for students to apply for Google Summer of Code.

What is GSoC ?

You can read about GSoC in their website, but I will try to resume here what is GSoC.

Google pays you (a student) US$ 4500,00 for three months of work on a free/open source software.

First the organizations apply for GSoC as a mentoring organization. Each organization accepted by Google receive slots and distribute this slots in project ideas.

Then the student find a mentoring organization, choose a project (or propose a new one) and asks for a mentor (applying). The organization will choose the students and then monitor the student work. Note that a student can apply for 20 projects but if approved in more than one he will need to choose only one to work.

The student will receive from Google US$ 500,00 when the program starts, then US$ 2000,00 after a month of work and US$ 2000,00 when the program finishes. Obviously the mentor will check the student process/work and decide if he should receive the money or not.

When the student finishes the program, he receives a GSoC t-shirt and a Google certificate (nice! :) ).

Benefits

For students (like me):

  • Contribute do free/open source software
  • Learn and gain experience
  • Get paid to code free/open source software
  • A beautiful t-shirt :)
  • think about your new job offers … :P

For organizations (like Python Software Foundation):

  • More people involved in the development process
  • People getting paid to develop needed features

I’m applying for BlueZ, the project idea is simple, build a high-level interface/layer upon python-dbus to provide the services/interfaces offered by BlueZ by D-Bus.

I’ll probably try to apply to OLPC as well.

I’m also applying (maybe too late) for Python Software Foundation to work on PyPy. The project idea is to support CPython 2.5 features and changes missing in PyPy.

For more information in GSoC I recommend watching this screencast by Titus Brown.

That’s all.

GameJam Brasil

Monday, November 12th, 2007

Everybody

I went to GameJam Brasil at São Carlos this weekend with some friends from Senac (where i study CS). For those who don’t know what is the GameJam, i’ll try to explain, but you can read read more about it at http://wiki.laptop.org/wiki/GameJam.

The GameJam Brasil was based in the GameJam that occured in Boston. The main idea is to group developers and game designers in teams to produce games to the OLPC XO (more about the OLPC project at http://www.laptop.org). In São Carlos we had 32 hours (+/-) to develop the game.

Our team (CAS) members were me, Marcelo, Fabio and Adriano. We decided to develop some game with educational purpose, so Fabio gave us the idea of a Recycle game. You can see more about it at http://code.google.com/p/reciclapy.

After almost 40 hours of coding our game is “ready”, with a lot of bugs, of course :-D The game is written in Python and PyGame (two technologies supported by the OLPC Project and that i like a lot).

You can see some pictures taken there in my flickr (with gamejambrasil tag).

I would like to thank everybody from UFSCar (LIA), Poli/USP (NATE) and USP São Carlos (and all the collaborators). They’ve made this event to be awesome (including the full time coffee-”break” hehehe). The collaborative spirit of the GameJam was very nice too. All the teams were helping each other all the time :-)

It was very nice to participate!

[]‘s

Python @ JustJava

Monday, October 15th, 2007

Last week i went to JustJava 2007, a Java event (ohh!!) here in São Paulo (actually at Senac, where i study, and that’s why i was there), anyway, as a Python fan i was interested in one specific talk, it was about Java Scripting, or Scripting Languages that runs inside the JVM, by Paulo César Jeveaux.

I was almost sure (:)) that we would have at least a bit of Jython, and I was right :)

Jeveaux started talking about the ways to implement a scripting language that runs inside the JVM. Then he talked about the languages that exists today, starting by Groovy, a language that runs in java environment. It has a syntax between python, ruby and java (at least as far as i could see). I must admit that i liked it and i will try to study a little this language.

After Groovy he talked about JRuby and then about Jython! Well, the funniest part was “I work with Java, but i really like Python!”.

For me, a Python Enthusiastic, it was very nice to see python @ a java conference, and i thought i should share it with who reads this blog (if anyone :) )

Polynomial Interpolation

Monday, October 1st, 2007

I’m writing a paper about Polynomial Interpolation and the Newton Form for my Numerical Calculus class.

Interpolation is something i’m learning *now* but i can already say that I like it! :)

As soon as i finish it i’ll upload and post here. Oh, it is in brazilian portuguese :( .

[]‘s