Re: Python memory use (was: [maemo-developers] Maemo 2.0 final release available)

2006-07-10 Thread Ruda Moura
Hello!

On Mon, 2006-07-10 at 16:38 +0300, ext Tommi Komulainen wrote:
> On Mon, 2006-07-10 at 09:15 -0300, ext Gustavo Sverzut Barbieri wrote:
> > On 7/10/06, Tommi Komulainen <[EMAIL PROTECTED]> wrote:
> > >  2. memory consumption
> > >  4. run-time speed?
> > 
> > These are not an issue, really. Since python does garbage collect, in
> > the long run it may show even more memory efficient than pure C, which
> > may leak.
> 
> Memory leaks in C are fixable, just takes some effort. OTOH the python
> interpreter / wrapper overhead are not.

They are fixable but requires a lot of time to find and fix it, in the
meanwhile your program is leaking. It's a trade-off.

> I've also been told that python
> never releases memory back to the system, though that ought to be
> fixable.

No, the GC of Python releases and objetos are not in use anymore.
Only in a very few situations this doesn't happens. About memory usage,
it's possible to setup GC to release memory more often than the default.

BR

--
Rudá Moura

___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


[maemo-developers] Running browser in command line

2006-02-06 Thread Ruda Moura
Hello,

I would like to control the web browser by the command line.
I found /usr/bin/browser but when I run it they don't work
as I expect. They probably will work good if I use D-BUS but I don't
want to use DBUS for this, I want to use something quite as simples as
the way /usr/bin/mozilla works, like calling

$ /usr/bin/mozilla -newpage google.com


to open a page.

Any suggestions or advices?

TIA

--
ruda

___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] first impressions and some reports

2005-07-11 Thread Ruda Moura
Gustavo Barbieri wrote:

>On 7/7/05, Gustavo Barbieri <[EMAIL PROTECTED]> wrote:
>  
>
>>Here it is: http://ltc08.ic.unicamp.br/~gustavo/pygame-maemo-test.tar.bz2
>>
>>I have 2 optimized versions of that game:
>>  - pygame-noalpha: remove alpha transparency, use colorkey instead.
>>Much faster, but still repaints the screen everytime
>>  - pygame-dirtyrectangles: the background is redrawn fewer times and
>>I use dirty rectangles to just update areas that need to be repainted.
>>If this doesn't work, hardly any scroll side game will work.
>>
>>run them like:
>>   $scriptname -f -r 800x480
>>
>>
>
>Any updates on this topic? At least one version ran at ~ 30fps?
>
>  
>
Hello,

Yes, I did some testings on two n770 devices, the first without audio
capabilities and the second with audio capabilities.

On the first...

I run your game and Indeed, it really run faster, visually it as very
pleased to play with
alpha channel disable. No, not in 30 fps, but faster than 20fps. But
still SigFault when
ships goes to 0 (possible a bug in SDL binding or your game is not
closing SDL as expected, I will check).

On the second...

I run Solar Wolf, but unsuccessful.  The game crashes after the
splashscreen (At least
I can hear de crying wolf).

That's it.
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] first impressions and some reports

2005-07-06 Thread Ruda Moura

Daniel Monteiro wrote:

Hey. I've made a small set of clases for fixed point
math (in C++) . Do you want to port it? I also
studying a assembler port of it.

eu estava estudando assembly de ARM faz um tempo,mas
agora estou meio sem tempo. final de periodo de
faculdade.

bem..preciso ir estudar =-)


Hi Daniel,

thank you but when I said "it lacks" I really mean "it lacks but emulate 
with a few instructions" :)


People who write games to small devices should concern with what
asm instructions are been running, etc. That's it!

--
Ruda Moura
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] New Python 2.4 packages for Maemo

2005-07-06 Thread Ruda Moura

FYI: the official site is synced!

--
Ruda Moura

___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] first impressions and some reports

2005-07-06 Thread Ruda Moura

Gustavo Barbieri wrote:


Hello,

Now that I have the maemo environment set up, I started to love this
thing!!! And python!

Thanks to Osvaldo and Ruda, I can run PythonCAD without any changes!

Also, my game tutorial (pt_BR) runs perfectly (just need to check the
perfomance on a real device, since it's side scroll and redraws the
screen every time):



Hello Gustavo, thank you for your feedback!


http://www.gustavobarbieri.com.br/jogos/jogo.tar.gz
   Could someone run "python2.4 jogo/a06/jogo.py -f -r 800x480" on a
real device and check if performance is an issue... if it can do at
least 30fps it's good enough. If it's ok I'll develop a game using
that engine. Also, it can be optimized a bit, I wrote it as an
educative project.


SHORT ANSWER

It run slow, about 15 ~ 20 fps and crashed with Segmentation fault at 
the end (when ships goes to zero).


LONG ANSWER

It was visible slower than what was printed on screen (15 ~ 20 fps) but...
You should think not in terms of PC, for a small device a game should 
take modification in order to run fast. First I notice some calculations 
with division ( like "something" / 16 ) and I change it to shifts ( >> 4 
). Why? Because I know 770 lacks division opcodes in CPU. well, it as 
not a good improvement at all :)


The screen size *is* big, 800x480 is much data. People in this case 
should consider resize the rolling image to a small size, put some 
static pictures around, etc.


Maybe your code is good to teach OO but it isn't the best case for game 
speed. For your information, here is what PyGame show me about my 
display in Nokia 770.






Again, thank you for your feedback and if you want to do more tests in 
"the real thing" I'm ready to help you.


--
Ruda Moura
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


[maemo-developers] New Python 2.4 packages for Maemo

2005-07-06 Thread Ruda Moura

Hello everybody,

there are new Python packages for Maemo at

* http://www.indt.org.br/maemo/repository/   -> the official repository
* http://evolutum.gotdns.com/repository/ -> mirror

NOTE: for a few days USE ONLY THE MIRROR, the official site is not 
already synced.


Apologies for the long time to release these packages and the apt 
repository. We had technical problems with our server and hope it

doesn't happen again. We expect short release time.

Changes:

* Our packages are now marked as indt release like python2.4-2.4.1-2indt4
* Python optimized modules (.pyo) are now inserted in one Zip file 
(/usr/lib/python24.lib) to squeeze size.

* Python readable modules (.py) are now in a sub package.
* PyGTK is now working with ATK.
* First release of Python bindings for Hildon.
* Small fixes in PyGTK and PyGame packages.

If you like to use our apt repository add to /etc/apt/sources.list

# Official repository
deb http://www.indt.org.br/maemo/repository/ indt main
deb-src http://www.indt.org.br/maemo/repository/ indt main

or

# Mirror
deb http://evolutum.gotdns.com/repository/ indt main
deb-src http://evolutum.gotdns.com/repository/ indt main

We had the opportunity to test PyGame in Nokia 770. I was (good) 
surprised with the speed of it. There are some pictures in


http://pythonologia.blogspot.com/2005/06/python-pygame-e-nokia-770.html

(Portuguese only)

Well, that's it. Suggestions, enhancements or bug reports please
send mail to [EMAIL PROTECTED] and/or [EMAIL PROTECTED]

Thank you people, happy hacking!

--
Ruda Moura
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers