Yesterday, I implemented the Chudnovsky algorithm in mpmath for computing π (see commit). This turns out to be about 3x faster than the old algorithm, so mpmath now only needs about 10 seconds to compute 1 million digits of π. To try it out, fetch the SVN version of mpmath, make sure gmpy 1.03 is installed, and run:
After working a few days on my GUI branch of carcode, I got some interesting results, I completed a basic set of widgets that integrates well with carcode, I did a main menu and a file dialog to open script files:
It was interesting to work on this, I wanted once to create my own toolkit, based on SDL and C, but it ended up being a bit time consuming, this time was very simple and fast, using python + pygame + OpenGL to do all.
This post will mostly be about recent mpmath development, but first a short update about my GSoC progress. Over the last week, I have improved the support for complex numbers (addition and multiplication of complex numbers works and detects cancellation in the real and imaginary parts), implemented some more functions, and added support for integrals. I still need to clean up and test the code some more. A longer update will be posted later today or tomorrow.
Besides working directly with the GSoC project, I’ve been busy playing with the results of a patch for mpmath that was submitted a few days ago by casevh. This brilliant patch allows mpmath to use GMPY mpz’s instead of Python’s built-in long integers.
This post will mostly be about recent mpmath development, but first a short update about my GSoC progress. Over the last week, I have improved the support for complex numbers (addition and multiplication of complex numbers works and detects cancellation in the real and imaginary parts), implemented some more functions, and added support for integrals. I still need to clean up and test the code some more. A longer update will be posted later today or tomorrow.
Besides working directly with the GSoC project, I’ve been busy playing with the results of a patch for mpmath that was submitted a few days ago by casevh. This brilliant patch allows mpmath to use GMPY mpz’s instead of Python’s built-in long integers.
All projects use different tools, carcode is hosted on Google Code and uses Subversion, being coded in Python it is cross-platform.
I use Linux (Madriva 2008 Spring) and Git for versioning with git-svn for carcode subversion push, as for IDE I use a plain editor, Kate, I used VIM before but found Kate a bit more productive. I also like Nedit. I tried Eclipse + Pydev but I find it too big and I don’t use most of the features it offers. I tried KDevelop but I didn’t like it, it feels like a plain editor (for python, for C++ Qt is a good IDE), I tried Wings trial which I found comfortable but is not OSS although its price is affordable.
I usually don’t use autocompletion features that offers certain IDEs, I know OpenGL well and have books at hand (OpenGL Game Programming), pygame documentation is all I need, any other thing missing may be found in the python shell by using dir() on the object, help() or internet.
Hey, another week is gone but at least this one was useful for the project.
I’ve decided to start the "final" sample, the one to demonstrate several Ttk features, and it is going well. Some time ago (like one month?) I received a suggestion to do an app that would help in Ttk styling/theming and it seemed a good idea, so that is what this sample app tries to do. There is a screenshot at http://code.google.com/p/python-ttk/wiki/Screenshots if you wanna take look, or, you could download it and try it yourself (more info at http://gpolo.ath.cx:81/projects/ttk_to_tkinter/code). If you give it a try and find any bug(s) (big chances) please report it at http://code.google.com/p/python-ttk/issues/list.
Thanks.
At the beginning of the project I wanted to use PGU library to create a nice GUI for carcode, however, after moving to OpenGL it seems that pygame refuses to blit to screen surface when OpenGL is enabled, thus I had two options, look for a workaround and use PGU or to use an library which renders with OpenGL.
A workaround may implicate disabling OpenGL support from surface after arena drawing code, looking around it seems that the problem is with SDL and thus a workaround is discarted, it may be worth but it can be too much effort and time, it will complicate distrubution too. Anyways, PGU hasn’t been updated since 2007, go figure.
Looking for an OpenGL compatible library doesn’t gives much hope, there is a couple that may do but that would be another dependency, I will keep checking if I find something useful.
Since last post I have already make good advances with carcode, collision is now working, I started using the Separating Axis Theorem (SAT) for collision, it works with boxes but it will be extended to polygons and other figures later on.
Also I have enabled car scripting, I did a small demo where you have a path and 2 sensors, the script uses sensor information to try to follow the path, it is a very simple script, it just steers the car according sensor data.
A few new entities have been added for level scripts, such as Box and Text, there is the object Console where you can write some text to the screen.
Currently I’m working on windows support, fixing things here and there and improving py2exe support which works pretty well (unless you install pyOpenGL 3.0). I have implemented game pause.
Next step will be providing packages for any brave testers :), improve collision detection, improve car scripting, create levels, improve UI.
Since last post I have already make good advances with carcode, collision is now working, I started using the Separating Axis Theorem (SAT) for collision, it works with boxes but it will be extended to polygons and other figures later on.
Also I have enabled car scripting, I did a small demo where you have a path and 2 sensors, the script uses sensor information to try to follow the path, it is a very simple script, it just steers the car according sensor data.
A few new entities have been added for level scripts, such as Box and Text, there is the object Console where you can write some text to the screen.
Currently I’m working on windows support, fixing things here and there and improving py2exe support which works pretty well (unless you install pyOpenGL 3.0). I have implemented game pause.
Next step will be providing packages for any brave testers :), improve collision detection, improve car scripting, create levels, improve UI.
Hello and sorry for writing no news for more than two weeks, and also for not doing much in this period. I hope someone is still using/testing the ttk module.
Some days ago I started adding support for tabs in IDLE, I did some progress but didn’t dare to commit the changes yet. Also, yesterday, I started doing the "final" demo to demonstrate Ttk Theming (or some part of it). Other change I’ve done is related to the project’s page, I’ve removed the "Support Classes" milestone at http://gpolo.ath.cx:81/projects/ttk_to_tkinter/roadmap and merged it into the first milestone.
Finally, you may notice that the first milestone, "Widgets wrapping", is 12 days late now, but, I’ve completed it before the stipulated date and I’ve been waiting for Fredrik’s review. So, don’t be scared, use it!