From litianyou1977 at 163.com Fri Jun 3 11:40:23 2005 From: litianyou1977 at 163.com (=?gb2312?B?wO7M7NPT?=) Date: Fri, 3 Jun 2005 17:40:23 +0800 (CST) Subject: [summerofcode] Need information about py2exe Message-ID: <42A02587.000194.05055@m237.163.com> Dear thelle, I am very interesting in py2exe, and got a stable version from sf.net. But I am not very clear about what the next version of py2exe should support, and what feature should be implement during the summercode period if i apply for py2exe project. Thank! Li Tianyou -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050603/b584cc19/attachment.htm From saket at cc.iitb.ac.in Fri Jun 3 11:57:25 2005 From: saket at cc.iitb.ac.in (Saket Sathe) Date: Fri, 03 Jun 2005 15:27:25 +0530 Subject: [summerofcode] need info.. Message-ID: <42A02985.2020609@cc.iitb.ac.in> Hi, I am student of IIT Bombay, India. I am die hard Python fan. How shall I go about helping the Python community under the Google's Summer of Code initiative. Sorry if this question is being asked many times but I am not able to view the mailing list archives. -- Saket From mistobaan at gmail.com Fri Jun 3 12:34:52 2005 From: mistobaan at gmail.com (Misto .) Date: Fri, 3 Jun 2005 12:34:52 +0200 Subject: [summerofcode] SpeedUpInterpreterStartup - IDEAS Message-ID: Hi every one Thanks to the google summer of code I have noticed the proposal of speeding up the python start up. http://wiki.python.org/moin/SpeedUpInterpreterStartup I think I will start reviewing Python 2.4.1 code trying to spot something... next I will try to seek/create for a sort of profiler/benchmark to monitoring start up times I want also to give a look to Psyco (http://psyco.sourceforge.net), watching for something useful. If one (or more) of the Mentors is interested in helping can contact me [ mistobaan AT gmail DOT com ] Any good ideas or material concerning the topic is welcome. M1st0 From shitizb at yahoo.com Fri Jun 3 13:19:13 2005 From: shitizb at yahoo.com (Shitiz Bansal) Date: Fri, 3 Jun 2005 04:19:13 -0700 (PDT) Subject: [summerofcode] need info.. In-Reply-To: <42A02985.2020609@cc.iitb.ac.in> Message-ID: <20050603111913.52286.qmail@web53802.mail.yahoo.com> Hi, I am from IIT Delhi. I am looking for this info too. Shitiz Saket Sathe wrote: Hi, I am student of IIT Bombay, India. I am die hard Python fan. How shall I go about helping the Python community under the Google's Summer of Code initiative. Sorry if this question is being asked many times but I am not able to view the mailing list archives. -- Saket _______________________________________________ summerofcode mailing list summerofcode at python.org http://mail.python.org/mailman/listinfo/summerofcode __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050603/31fdc8dd/attachment.html From azurit at pobox.sk Fri Jun 3 15:23:18 2005 From: azurit at pobox.sk (azurIt) Date: Fri, 3 Jun 2005 15:23:18 +0200 Subject: [summerofcode] own project Message-ID: <200506031323.j53DNIfw016710@www4.pobox.sk> hi, can i also choose to work on my own project ? it's coded in python but i can't see a way how it can help to the PSF. i want to join the Google Code project and i need to have a sponsor to be able to subscribe on google page. azurIt ___________________________________________________________________________ Podte na navstevu k Wande - k najlepsej priatelke kazdej zeny na internete. http://www.wanda.sk/ From jelkner at divmod.com Fri Jun 3 15:28:38 2005 From: jelkner at divmod.com (jelkner@divmod.com) Date: Fri, 3 Jun 2005 13:28:38 +0000 Subject: [summerofcode] What a wonderful program! In-Reply-To: 0 Message-ID: <20050603132838.31075.597228295.divmod.quotient.405@ohm> Hi All, I was *very* excited to see this program come into being. It will be a fantastic way to provide support and encouragement to developing programmers, and to reward the hard work that they put into free software projects. I will be working with several students this summer on a competency tracking application called CanDo. I've been in active communication with Tom Hoffman from the SchoolTool project, and he has agreed to help us get up to speed so we can contribute to SchoolTool. Our goal is to make CanDo work with SchoolTool. A former student, Paul Carduner, has applied to Summer of Code listing the PSF as the sponsoring organization, me as the mentor, and CanDo as the project. I hope that is OK. Thanks! jeff elkner From codedivine at gmail.com Fri Jun 3 20:09:10 2005 From: codedivine at gmail.com (Rahul Garg) Date: Fri, 3 Jun 2005 14:09:10 -0400 Subject: [summerofcode] project ideas apart from psf Message-ID: Hi. I have submitted a project idea related to Idle thats not in the list of ideas proposed by the PSF but is highly related to development of python tools. Is it ok to propose our own ideas and not use one of the PSF ones? Also i will be very happy to work on the idea even if i am not selected for the Google program. In such a case can psf arrange for some mentor for me even if i am not selected for the program? sincerely, Rahul Garg From codedivine at gmail.com Fri Jun 3 21:07:29 2005 From: codedivine at gmail.com (Rahul Garg) Date: Fri, 3 Jun 2005 15:07:29 -0400 Subject: [summerofcode] mentor selection Message-ID: Hi. About the application process: Are we supposed to select our mentors from the list of people on the wiki listed as interested OR will PSF review our application and contact mentors itself? sincerely, Rahul From jhylton at gmail.com Fri Jun 3 21:29:44 2005 From: jhylton at gmail.com (Jeremy Hylton) Date: Fri, 3 Jun 2005 15:29:44 -0400 Subject: [summerofcode] mentor selection In-Reply-To: References: Message-ID: On 6/3/05, Rahul Garg wrote: > About the application process: > Are we supposed to select our mentors from the list of people on the > wiki listed as interested OR will PSF review our application and > contact mentors itself? I don't think the process is worked out in any detail, but I expect the PSF and mentors will work together to match accepted proposals to mentors. Jeremy From fcano at ono.com Fri Jun 3 21:35:13 2005 From: fcano at ono.com (Florencio Cano Gabarda) Date: Fri, 03 Jun 2005 21:35:13 +0200 Subject: [summerofcode] "Complete SSL support" project Message-ID: <20050603213055.D66D.FCANO@ono.com> Hello, I'm very interested in this project for doing it for Google Summer of Code. I would like to know if anyone is thinking about doing this project too. I would like to know any kind of information about this project, rationale for example, because I see that there exist ssl module for python. amk is saying in the web that one possibility is adding it to the core. Any help would be appreciate specially from Python mentors. Thanks in advance. -- Florencio Cano Gabarda From marcos.neves at gmail.com Fri Jun 3 21:42:24 2005 From: marcos.neves at gmail.com (Marcos Neves) Date: Fri, 3 Jun 2005 16:42:24 -0300 Subject: [summerofcode] wax Message-ID: <9d6cfb9050603124238558476@mail.gmail.com> I want to do my project over wax. How can I proceed? From zephyrfalcon at gmail.com Sat Jun 4 00:19:20 2005 From: zephyrfalcon at gmail.com (Hans Nowak) Date: Fri, 3 Jun 2005 18:19:20 -0400 Subject: [summerofcode] Some people want to work on my project. But... Message-ID: <48b2763e05060315194a670db7@mail.gmail.com> Hi, I've received requests from several people who want to work on Wax (http://zephyrfalcon.org/labs/wax.html). The way I understand it, these people must send their application to the PSF, which will decide who (if anybody) gets to work on the project. Is this correct? Also, do I have to be a mentor in order for people to be selected to work on Wax? Thanks, -- Hans Nowak http://zephyrfalcon.org/ From Fernando.Perez at colorado.edu Sat Jun 4 00:28:43 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 03 Jun 2005 16:28:43 -0600 Subject: [summerofcode] Mentoring question... Message-ID: <42A0D99B.4050602@colorado.edu> Hi all, I've added a project idea http://wiki.python.org/moin/NotebookInterfaceForIpython for which I've already had students contact me. I'm willing to mentor them on this project, and I'm in the process of drafting a formal project description they can attach to their google application. Do I need to register anywhere in particular with the PSF for this? I can't really offer mentorship for other projects. Thanks for any relevant info, f From bac at OCF.Berkeley.EDU Sat Jun 4 01:34:17 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Fri, 03 Jun 2005 16:34:17 -0700 Subject: [summerofcode] need info.. In-Reply-To: <20050603111913.52286.qmail@web53802.mail.yahoo.com> References: <20050603111913.52286.qmail@web53802.mail.yahoo.com> Message-ID: <42A0E8F9.6040504@ocf.berkeley.edu> Shitiz Bansal wrote: > Hi, > I am from IIT Delhi. I am looking for this info too. > Shitiz > > */Saket Sathe /* wrote: > > Hi, > I am student of IIT Bombay, India. I am die hard Python fan. > How shall I go about helping the Python community under the Google's > Summer of Code initiative. > > Sorry if this question is being asked many times but I am not able to > view the mailing list archives. > Take a look at the wiki page listing current ideas: http://wiki.python.org/moin/CodingProjectIdeas . Otherwise any idea *you* think would help Python is also possible. The wiki is not the de-facto list; all ideas are welcome. -Brett From bac at OCF.Berkeley.EDU Sat Jun 4 01:41:49 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Fri, 03 Jun 2005 16:41:49 -0700 Subject: [summerofcode] Some people want to work on my project. But... In-Reply-To: <48b2763e05060315194a670db7@mail.gmail.com> References: <48b2763e05060315194a670db7@mail.gmail.com> Message-ID: <42A0EABD.3040409@ocf.berkeley.edu> Hans Nowak wrote: > Hi, > > I've received requests from several people who want to work on Wax > (http://zephyrfalcon.org/labs/wax.html). > > The way I understand it, these people must send their application to > the PSF, which will decide who (if anybody) gets to work on the > project. Is this correct? > Not quite. They send their application to Google, who will forward it to the PSF. Then the PSF decides whether it wants to take on the responsibility of acting as mentoring organization for the project. > Also, do I have to be a mentor in order for people to be selected to > work on Wax? > Not necessarily. As long as the PSF takes on the project it will be our specific burden to help. Obviously with Wax being your project it would be good if you could act as the direct mentor for the person on the project. It would probably help its chances on being cleared if you did help out. And a quick disclaimer; I believe David Ascher is acting as the goto guy on SoC for the PSF so he has final say. -Brett From bac at OCF.Berkeley.EDU Sat Jun 4 01:44:10 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Fri, 03 Jun 2005 16:44:10 -0700 Subject: [summerofcode] wax In-Reply-To: <9d6cfb9050603124238558476@mail.gmail.com> References: <9d6cfb9050603124238558476@mail.gmail.com> Message-ID: <42A0EB4A.1040004@ocf.berkeley.edu> Marcos Neves wrote: > I want to do my project over wax. How can I proceed? Follow the procedure as laid out by Google; register with them, write up a proposal and send it to them. Also wouldn't help to talk to Hans Nowak (Wax is his baby, right?) to see exactly what kind of help he might be able to provide. -Brett From bac at OCF.Berkeley.EDU Sat Jun 4 01:47:36 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Fri, 03 Jun 2005 16:47:36 -0700 Subject: [summerofcode] "Complete SSL support" project In-Reply-To: <20050603213055.D66D.FCANO@ono.com> References: <20050603213055.D66D.FCANO@ono.com> Message-ID: <42A0EC18.5080406@ocf.berkeley.edu> Florencio Cano Gabarda wrote: > Hello, > I'm very interested in this project for doing it for Google Summer of > Code. I would like to know if anyone is thinking about doing this > project too. I would like to know any kind of information about this > project, rationale for example, because I see that there exist ssl > module for python. amk is saying in the web that one possibility is > adding it to the core. > Any help would be appreciate specially from Python mentors. > Thanks in advance. I can't talk about technical stuff about SSL, but I can talk about what AMK means about getting it accepted. One is making sure the code meets coding standards. Another is making sure it has a good API. It would also be nice to integrate it into the stdlib so that use in the urllib module (and any other modules that use HTTP as a protocol) is transparent as possible for using SSL. -Brett From trentm at ActiveState.com Sat Jun 4 01:50:08 2005 From: trentm at ActiveState.com (Trent Mick) Date: Fri, 3 Jun 2005 16:50:08 -0700 Subject: [summerofcode] wax In-Reply-To: <42A0EB4A.1040004@ocf.berkeley.edu> References: <9d6cfb9050603124238558476@mail.gmail.com> <42A0EB4A.1040004@ocf.berkeley.edu> Message-ID: <20050603235008.GA29618@ActiveState.com> [Brett C. wrote] > Marcos Neves wrote: > > I want to do my project over wax. How can I proceed? > > Also wouldn't help to talk to Hans Nowak (Wax is ^^^^ I presume you meant "wouldn't hurt", right? :) Trent -- Trent Mick TrentM at ActiveState.com From bac at OCF.Berkeley.EDU Sat Jun 4 01:54:04 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Fri, 03 Jun 2005 16:54:04 -0700 Subject: [summerofcode] project ideas apart from psf In-Reply-To: References: Message-ID: <42A0ED9C.60802@ocf.berkeley.edu> Rahul Garg wrote: > Hi. > I have submitted a project idea related to Idle thats not in the list > of ideas proposed by the PSF but is highly related to development of > python tools. Is it ok to propose our own ideas and not use one of the > PSF ones? > Definitely! The list on the wiki is in no way comprehensive. It is just some ideas some people have come up with. > Also i will be very happy to work on the idea even if i am not > selected for the Google program. In such a case can psf arrange for > some mentor for me even if i am not selected for the program? > Possibly. If it does not get picked up just post to comp.lang.python for help. You could also ask Kurt Kaiser (don't have his emails handy) directly since he is in charge of IDLE. -Brett From bac at OCF.Berkeley.EDU Sat Jun 4 02:01:07 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Fri, 03 Jun 2005 17:01:07 -0700 Subject: [summerofcode] own project In-Reply-To: <200506031323.j53DNIfw016710@www4.pobox.sk> References: <200506031323.j53DNIfw016710@www4.pobox.sk> Message-ID: <42A0EF43.4040109@ocf.berkeley.edu> azurIt wrote: > hi, > > can i also choose to work on my own project ? it's coded in python but > i can't see a way how it can help to the PSF. i want to join the > Google Code project and i need to have a sponsor to be able to > subscribe on google page. > Your project does not have to directly affect Python the language. If it is a good project that uses Python that is fine. Being useful to the Python community is the key thing in naming the PSF as the mentoring organization. -Brett From zephyrfalcon at gmail.com Sat Jun 4 02:01:54 2005 From: zephyrfalcon at gmail.com (Hans Nowak) Date: Fri, 3 Jun 2005 20:01:54 -0400 Subject: [summerofcode] Some people want to work on my project. But... In-Reply-To: <42A0EABD.3040409@ocf.berkeley.edu> References: <48b2763e05060315194a670db7@mail.gmail.com> <42A0EABD.3040409@ocf.berkeley.edu> Message-ID: <48b2763e05060317014479fbc7@mail.gmail.com> On 6/3/05, Brett C. wrote: > Hans Nowak wrote: > > Also, do I have to be a mentor in order for people to be selected to > > work on Wax? > > > > Not necessarily. As long as the PSF takes on the project it will be our > specific burden to help. Obviously with Wax being your project it would be > good if you could act as the direct mentor for the person on the project. It > would probably help its chances on being cleared if you did help out. I don't mind being a mentor, but my usefulness will probably be limited to Wax. Will that be a problem? Or is a mentor expected to be able to help out on any open source project? -- Hans Nowak http://zephyrfalcon.org/ From christian at cheimes.de Sat Jun 4 02:25:42 2005 From: christian at cheimes.de (Christian Heimes) Date: Sat, 04 Jun 2005 02:25:42 +0200 Subject: [summerofcode] own project In-Reply-To: <42A0EF43.4040109@ocf.berkeley.edu> References: <200506031323.j53DNIfw016710@www4.pobox.sk> <42A0EF43.4040109@ocf.berkeley.edu> Message-ID: <42A0F506.8070500@cheimes.de> Brett C. wrote: > azurIt wrote: > >>hi, >> >>can i also choose to work on my own project ? it's coded in python but >>i can't see a way how it can help to the PSF. i want to join the >>Google Code project and i need to have a sponsor to be able to >>subscribe on google page. >> > > > Your project does not have to directly affect Python the language. If it is a > good project that uses Python that is fine. Being useful to the Python > community is the key thing in naming the PSF as the mentoring organization. Hey that sounds great to/for us. We are some students working with and for Zope2, Zope3, Five and Plone and we are interested in starting some projects for the Summer of Code that are related to these projects and the upcoming ECMS project. Glossary: Zope2 and Zope3 http://zope.org/ are the current and upcoming new version of the Z Object Publising Environment. Zope is a highly advanced framework for web applications including a highly sophisticated database well know as ZODB and a web server. Five (Zope 2+3) is a bridge between Zope2 and Zope3 that allows developers to create applications using the power of Zope3 in Zope2. Plone http://plone.org/ is a highly advanced content management system and one of the killer applications based on Zope2. ECMS is the current work name of a project started by the leading content management systems based on Zope2 (CPS from Nuxeo, Silva from Infrae, CMF and Plone) plus Zope3 developers to create common code base for enterprise content management systems based on Zope3. Christian From bac at OCF.Berkeley.EDU Sat Jun 4 02:29:54 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Fri, 03 Jun 2005 17:29:54 -0700 Subject: [summerofcode] Mentoring question... In-Reply-To: <42A0D99B.4050602@colorado.edu> References: <42A0D99B.4050602@colorado.edu> Message-ID: <42A0F602.6030405@ocf.berkeley.edu> Fernando Perez wrote: > Hi all, > > I've added a project idea > > http://wiki.python.org/moin/NotebookInterfaceForIpython > > for which I've already had students contact me. I'm willing to mentor > them on this project, and I'm in the process of drafting a formal > project description they can attach to their google application. > > Do I need to register anywhere in particular with the PSF for this? I > can't really offer mentorship for other projects. > > Thanks for any relevant info, > I would make sure that in the proposal that the students say that you have offered to help out if the proposal is accepted. Otherwise you should add yourself to the mentor list on the wiki but with the proviso that you only have time for IPython proposals. -Brett From bac at OCF.Berkeley.EDU Sat Jun 4 02:30:43 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Fri, 03 Jun 2005 17:30:43 -0700 Subject: [summerofcode] wax In-Reply-To: <20050603235008.GA29618@ActiveState.com> References: <9d6cfb9050603124238558476@mail.gmail.com> <42A0EB4A.1040004@ocf.berkeley.edu> <20050603235008.GA29618@ActiveState.com> Message-ID: <42A0F633.6080805@ocf.berkeley.edu> Trent Mick wrote: > [Brett C. wrote] > >>Marcos Neves wrote: >> >>>I want to do my project over wax. How can I proceed? >> >>Also wouldn't help to talk to Hans Nowak (Wax is > > ^^^^ > > I presume you meant "wouldn't hurt", right? :) > Yep. =) And to think, I might mentor someone. Scary! -Brett From bac at OCF.Berkeley.EDU Sat Jun 4 02:33:56 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Fri, 03 Jun 2005 17:33:56 -0700 Subject: [summerofcode] Some people want to work on my project. But... In-Reply-To: <48b2763e05060317014479fbc7@mail.gmail.com> References: <48b2763e05060315194a670db7@mail.gmail.com> <42A0EABD.3040409@ocf.berkeley.edu> <48b2763e05060317014479fbc7@mail.gmail.com> Message-ID: <42A0F6F4.1010206@ocf.berkeley.edu> Hans Nowak wrote: > On 6/3/05, Brett C. wrote: > >>Hans Nowak wrote: >> >>>Also, do I have to be a mentor in order for people to be selected to >>>work on Wax? >>> >> >>Not necessarily. As long as the PSF takes on the project it will be our >>specific burden to help. Obviously with Wax being your project it would be >>good if you could act as the direct mentor for the person on the project. It >>would probably help its chances on being cleared if you did help out. > > > I don't mind being a mentor, but my usefulness will probably be > limited to Wax. Will that be a problem? Or is a mentor expected to be > able to help out on any open source project? > I would add yourself to the mentor list, but just specify you can probably only help with Wax projects. I am also guessing that any project that modifies or works with an existing project will lead the PSF to contact the lead developer to see if they can help out. -Brett From Fernando.Perez at colorado.edu Sat Jun 4 02:51:15 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 03 Jun 2005 18:51:15 -0600 Subject: [summerofcode] Mentoring question... In-Reply-To: <42A0F602.6030405@ocf.berkeley.edu> References: <42A0D99B.4050602@colorado.edu> <42A0F602.6030405@ocf.berkeley.edu> Message-ID: <42A0FB03.1080206@colorado.edu> Brett C. wrote: > I would make sure that in the proposal that the students say that you have > offered to help out if the proposal is accepted. I've created this page: http://ipython.scipy.org/google_soc The brief PDF linked there, which they are free to use in their application, contains such a statement, and I also added an explicit reminder in the above page. Please let me know if anything in that PDF description is not what the PSF intends/wants. Many thanks, f From thaidn at gmail.com Sat Jun 4 05:04:11 2005 From: thaidn at gmail.com (Thai Duong) Date: Sat, 4 Jun 2005 10:04:11 +0700 Subject: [summerofcode] CleanupUrlLibProject Message-ID: Hello all, I'm very interested in the CleanupUrlLibProject and really want to do it in the Google Summer of Code program. I have sent my application to Google. So what am I supposed to do next? Please advise. I'm ready to dive into this project immediately. Regards, --Thai Duong. PS: A little bit about myself: I'm from 203.162.x.x, 21 years old, currently an undergraduate student of PolyTechnique University of Ho Chi Minh City. I'm an experienced network/linux administrator just happen to fall in love with Python recently. I really want to take Google Summer of Code as a chance to practice my Python skill as well as to "pay back" to the wonderful Python community. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050604/d8956d26/attachment.htm From saluk64007 at gmail.com Sat Jun 4 07:26:26 2005 From: saluk64007 at gmail.com (Patrick Mullen) Date: Fri, 3 Jun 2005 22:26:26 -0700 Subject: [summerofcode] Project proposal: Message-ID: Hello fellow pythonistas! This seems like a great program that will hopefully infuse new life into a lot of the open source community, and it's wonderful that python is getting involved. At first I thought that I could only choose off of the idea list on the wiki, in which case the project I was going to go for would be the anygui one. While wxPython is now mostly considered the de facto standard, it seems a little big to be included as the standard gui for python. I would like to see a nice, featured, light, gui to replace tk, which is pretty shabby in my opinion. But that's quite a large undertaking. I would want to make it expandable, so that the same code can be used without installing an external toolkit, and then when you install gtk or wx it could use that. For the summer of code I think getting a reference implementation using sdl/opengl would be good. My other idea is to implement a 2d game engine layer on top of pygame. I've been working on such a thing for roughly a year, but it's not very usable at the moment. I have sprites, buggy animation, smooth scrolling, basic collision detection, verrry buggy physics, and tilemap support. My goal is to end up with a nice pythonic 2d engine that makes it easy to make any oldschool 2d game, from rpgs to platformers. You can create new classes which subclass the defaults, like characters, bullets, collision objects, to define functionality to fit the game. For instance, if you need a scripted event to occur when a player walks on a tile, you can subclass the tile class and add a def playerEnter() function which runs the event. Some of the scripting capabilities are already available, but there is a lot missing, and a lot of bugs. Many of the main systems, like collisions, pretty much need a complete rewrite. My goal for the summerofcode would be to get the engine up to a level where it can handle say, a simple mario-style platformer. I am more interested in my game engine, because I would like to see more great games written in python; but pygame is so low level the majority of things we see made with it are very simple. It shouldn't be that hard to create games that are as good as seen on the snes, especially when we have the power of python in our hands! Which one do you guys think I should work on, and do you think I have a chance of being accepted? I have a feeling that the game project might be looked down upon. If I do take on the gui, does anyone have any input on how I should go about it? The way I want to do it is to use opengl to draw the widgets, falling back on sdl if opengl isn't available. However, neither pyopengl nor sdl are included in the standard library. Is there something else I should use for drawing? Should I write the opengl widgets in c and make it a c module? Or is this all a waste of time - i.e. tk is going to stay as the default gui. Cheers! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050603/b9a020bd/attachment.htm From bac at OCF.Berkeley.EDU Sat Jun 4 07:28:09 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Fri, 03 Jun 2005 22:28:09 -0700 Subject: [summerofcode] Mentoring question... In-Reply-To: <42A0FB03.1080206@colorado.edu> References: <42A0D99B.4050602@colorado.edu> <42A0F602.6030405@ocf.berkeley.edu> <42A0FB03.1080206@colorado.edu> Message-ID: <42A13BE9.7070304@ocf.berkeley.edu> Fernando Perez wrote: > Brett C. wrote: > >> I would make sure that in the proposal that the students say that you >> have >> offered to help out if the proposal is accepted. > > > I've created this page: > > http://ipython.scipy.org/google_soc > > The brief PDF linked there, which they are free to use in their > application, contains such a statement, and I also added an explicit > reminder in the above page. > > Please let me know if anything in that PDF description is not what the > PSF intends/wants. Seems fine with me, but I am not even on the board of the PSF so I can't say officially. Be reasonable and there won't be any issue. -Brett From fuzzybr80 at gmail.com Sat Jun 4 08:32:16 2005 From: fuzzybr80 at gmail.com (ChunWei Ho) Date: Sat, 4 Jun 2005 14:32:16 +0800 Subject: [summerofcode] Application sent Message-ID: <31f07fc30506032332713be89@mail.gmail.com> Hi all, I have just sent an application to Google's summer of code, based on Python web programming (WSGI) and an old project of mine that I will make more generic. I would appreciate if anyone could eyeball it and give comments. Thanks in advance for the time. :) Some told me that publishing the idea may not be good, but I thought (a) Its not worth stealing (b) Python programmers are above this (*naivety* point) (c) The potential mentors would be reading this anyway ------------------------------------------------- Project Title: Data Serving/Collection Framework in Python/WSGI Proposed Mentor/Sponsoring Organization: Python Software Foundation Project Description: A framework based on bulk data serving/collection via the internet. Bulk data are in the form of files that could easily be several-several hundred MB (not surveys or simple POST data). The client has a file repository that it wishes to sync to the server (a WSGI application). This server should be able to facilitate transfer via a number of protocols, including HTTP file transfer, HTTP form upload, FTP, Email. This project is aimed not at yet another ad-hoc file transfer or p2p file-sharing program but as a persistent production setup for transferring data from data collection sites/areas to a server, possibly via internet through different methods to get through strict organizational firewalls and web admins. Unlike a normal straightforward file transfer application, the framework should support: + Authentication and encryption + Verification scheme for data transfer, retries, etc - MD5 hash compare? + Chunking of large files and reassemble on receipt + Partial/Resume file transfers support - may depend on nature of data Also, unlike commercial advanced file transfer programs, the framework does: + Supports multiple protocols for transfer HTTP/FTP/Email + Automatic identification of files to synchronize (comparison of server and client repositories and request automatically) + Conditional Processing (triggers - resync file if modified? logic - user specified) + Robust and considerate client - may be shared machine, means a service (I initially designed it for Windows clients - platform choice was not up to me) that must be configurable on when it runs, how long it runs + and if configured limit does not allow client to sync all data - what must be synced first (Latest file first, Earliest file first, Latest file only, etc). This form of consideration seems to be important for running on production sites or factory machines when the machine is in use in the day but idle for our use at night, or when machines have internet connectivity (possibly dialup) at only certain times of the day. Development will be based on WSGI/Paste model, although I will also investigate Zope/Cherry/Plone and other frameworks purely for comparison or design consideration purposes. WSGI is chosen for small learning curve, as well as the fact that data collection for an application can be separated from other functions. Benefits To The Community: I had attempted to do such work for data collection in an earlier project in Python. My lack of knowledge of web frameworks probably made it a messy piece of code. Also there wasn't anything like this (perhaps I was not thinking generic enough) that I could just adapt to fill my needs. Even if the project itself has a niche audience (not everyone needs a framework to collect data from behind firewalls and strict site admins), going thru the project will come up with components for general use in Python/WSGI, such as on the TODO list: + A WSGI file-serving application. This application should understand all the relevant conditionals (If-Modified-Since, etc), gzipped encoding, etc. + Scheme to translate different forms/protocols, e.g. FTP, into WSGI executable actions (HTTP GET, PUT, PROPFIND) Brief Bio: From ianb at colorstudy.com Sat Jun 4 08:47:43 2005 From: ianb at colorstudy.com (Ian Bicking) Date: Sat, 04 Jun 2005 01:47:43 -0500 Subject: [summerofcode] Project proposal: In-Reply-To: References: Message-ID: <42A14E8F.2010407@colorstudy.com> Patrick Mullen wrote: > Hello fellow pythonistas! This seems like a great program that will > hopefully infuse new life into a lot of the open source community, and > it's wonderful that python is getting involved. At first I thought that > I could only choose off of the idea list on the wiki, in which case the > project I was going to go for would be the anygui one. While wxPython > is now mostly considered the de facto standard, it seems a little big to > be included as the standard gui for python. I would like to see a nice, > featured, light, gui to replace tk, which is pretty shabby in my > opinion. But that's quite a large undertaking. I would want to make it > expandable, so that the same code can be used without installing an > external toolkit, and then when you install gtk or wx it could use > that. For the summer of code I think getting a reference implementation > using sdl/opengl would be good. FYI, PyUI is a toolkit built on pygame: http://pyui.sourceforge.net/ -- I don't think it's been developed very actively for a while though. I put up the Anygui item, because personally I think it would be really really nice to have. None of the native libraries (wxPython, pyGTK, etc) are very Pythonic. And I don't really blame them, because it's best to honestly represent the underlying library, but I feel like something is sorely lacking that there aren't better libraries on top of those. Wax is a notable exception, but there should be more competition for this sort of thing. And personally I think wxWidgets is implementing the abstraction layer in the wrong place on the stack, which is why Anygui seems appealing to me. *But*, I don't do much GUI programming, this is just my impression from a once-a-year foray into writing a GUI app. So I don't really know what I'm talking about ;) -- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org From ianb at colorstudy.com Sat Jun 4 09:10:07 2005 From: ianb at colorstudy.com (Ian Bicking) Date: Sat, 04 Jun 2005 02:10:07 -0500 Subject: [summerofcode] Application sent In-Reply-To: <31f07fc30506032332713be89@mail.gmail.com> References: <31f07fc30506032332713be89@mail.gmail.com> Message-ID: <42A153CF.3040600@colorstudy.com> ChunWei Ho wrote: > Some told me that publishing the idea may not be good, but I thought > (a) Its not worth stealing > (b) Python programmers are above this (*naivety* point) > (c) The potential mentors would be reading this anyway I think it's good -- one thing that open source has taught me is that ideas aren't very valuable when compared to implementation (code or otherwise). And transparency is good. > Project Title: Data Serving/Collection Framework in Python/WSGI > > Proposed Mentor/Sponsoring Organization: Python Software Foundation > > Project Description: > A framework based on bulk data serving/collection via the internet. > Bulk data are in the form of files that could easily be > several-several hundred MB (not surveys or simple POST data). > > The client has a file repository that it wishes to sync to the server > (a WSGI application). This server should be able to facilitate > transfer via a number of protocols, including HTTP file transfer, HTTP > form upload, FTP, Email. > > This project is aimed not at yet another ad-hoc file transfer or p2p > file-sharing program but as a persistent production setup for > transferring data from data collection sites/areas to a server, > possibly via internet through different methods to get through strict > organizational firewalls and web admins. > > Unlike a normal straightforward file transfer application, the > framework should support: > + Authentication and encryption > + Verification scheme for data transfer, retries, etc - MD5 hash compare? > + Chunking of large files and reassemble on receipt > + Partial/Resume file transfers support - may depend on nature of data This can also be part of the file transfer app, using HTTP range support. Each piece that can be implemented in a generic way will be easier to decouple, test, and implement. And HTTP has a lot of possible functionality that's worth implementing directly. For instance, etags are similar in function to hashes, and there's a standard header for giving the hash of a body (I don't think it gets much use, though, because TCP/IP is reliable enough). Even encryption can even be done in terms of SSL with client certificates (though that might be difficult, as SSL happens at a level that is sometimes hard to get access to, depending on your server). > Also, unlike commercial advanced file transfer programs, the framework does: > + Supports multiple protocols for transfer HTTP/FTP/Email > + Automatic identification of files to synchronize (comparison of > server and client repositories and request automatically) > + Conditional Processing (triggers - resync file if modified? logic - > user specified) > + Robust and considerate client - may be shared machine, means a > service (I initially designed it for Windows clients - platform choice > was not up to me) that must be configurable on when it runs, how long > it runs > + and if configured limit does not allow client to sync all data - > what must be synced first (Latest file first, Earliest file first, > Latest file only, etc). This form of consideration seems to be > important for running on production sites or factory machines when the > machine is in use in the day but idle for our use at night, or when > machines have internet connectivity (possibly dialup) at only certain > times of the day. How do you see it as different from rsync? If it's not that different, that's not so bad -- derivative perhaps, but rsync is very popular and useful, and you can do a lot worse than copy a useful piece of software. If the pieces that are used to implement it are decoupled, then that leaves yourself or other people room to recombine the pieces in novel ways, while at the same time copying something useful means you'll have a set of pieces that have proven utility. This will be especially true to the degree you utilize HTTP's potential. > Development will be based on WSGI/Paste model, although I will also > investigate Zope/Cherry/Plone and other frameworks purely for > comparison or design consideration purposes. WSGI is chosen for small > learning curve, as well as the fact that data collection for an > application can be separated from other functions. I think the benefit of WSGI here -- and I think it is considerable -- is that it is low-level enough that you don't have to work around places where the framework isn't intended for how you are using it. This is especially true of large file support and more advanced HTTP functionality (like ranges and etags and that sort of thing). Lots of frameworks are notably bad at large files in particular. -- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org From fcano at ono.com Sat Jun 4 10:46:59 2005 From: fcano at ono.com (Florencio Cano Gabarda) Date: Sat, 04 Jun 2005 10:46:59 +0200 Subject: [summerofcode] "Complete SSL support" project In-Reply-To: <42A0EC18.5080406@ocf.berkeley.edu> References: <20050603213055.D66D.FCANO@ono.com> <42A0EC18.5080406@ocf.berkeley.edu> Message-ID: <20050604103726.CD1E.FCANO@ono.com> > One is making sure the code meets coding > standards. Another is making sure it has a good API. It would also be nice to > integrate it into the stdlib so that use in the urllib module (and any other > modules that use HTTP as a protocol) is transparent as possible for using SSL. Ok. So, what do you think of me applying for this work: make a module for python called ssl.py that implements completely ssl and that has a good API. And if possible integrate it in the stdlib and any other module that use http to work trasparently with ssl. ?ok? But I have some questions: 1) All modules integrated in the stdlib are coded in C ? I ask that because I would be preferably interested in coding in python but C is ok for me too. 2) Are there any requeriments, apart of being a very good module, to add a module to the stdlib ? 3) Sorry because english is not my mother language so I don't understand exactly this sentence: "...integrate it into the stdlib so that use in the urllib module...". That means to add integrate ssl.py module to urllib too? Thanks very much for your help. It will be a great summer, summer of code. -- Florencio Cano Gabarda From azurit at pobox.sk Sat Jun 4 11:36:56 2005 From: azurit at pobox.sk (azurIt) Date: Sat, 4 Jun 2005 11:36:56 +0200 Subject: [summerofcode] own project Message-ID: <200506040936.j549au1A023108@www7.pobox.sk> > azurIt wrote: > > hi, > > > > can i also choose to work on my own project ? it's coded in python but > > i can't see a way how it can help to the PSF. i want to join the > > Google Code project and i need to have a sponsor to be able to > > subscribe on google page. > > > > Your project does not have to directly affect Python the language. If it is a > good project that uses Python that is fine. Being useful to the Python > community is the key thing in naming the PSF as the mentoring organization. > > -Brett > so i can't have PSF as a mentoring organization ? the project is a web based application (it uses mod_python) which is usefull for basic and high schools. i started it about three months ago and until now, two school in Slovakia are useing it. of course, it's not complete yet, there are many things which must be done. azurIt ___________________________________________________________________________ Podte na navstevu k Wande - k najlepsej priatelke kazdej zeny na internete. http://www.wanda.sk/ From bac at OCF.Berkeley.EDU Sat Jun 4 18:47:57 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Sat, 04 Jun 2005 09:47:57 -0700 Subject: [summerofcode] own project In-Reply-To: <200506040936.j549au1A023108@www7.pobox.sk> References: <200506040936.j549au1A023108@www7.pobox.sk> Message-ID: <42A1DB3D.2060801@ocf.berkeley.edu> azurIt wrote: > >>azurIt wrote: >> >>>hi, >>> >>>can i also choose to work on my own project ? it's coded in python but >>>i can't see a way how it can help to the PSF. i want to join the >>>Google Code project and i need to have a sponsor to be able to >>>subscribe on google page. >>> >> >>Your project does not have to directly affect Python the language. > > If it is a > >>good project that uses Python that is fine. Being useful to the Python >>community is the key thing in naming the PSF as the mentoring > > organization. > >>-Brett >> > > > > so i can't have PSF as a mentoring organization ? > As I said, as long as the project is useful to the Python community. All that says is that the application uses Python and it is useful. > the project is a web based application (it uses mod_python) which is > usefull for basic and high schools. i started it about three months > ago and until now, two school in Slovakia are useing it. of course, > it's not complete yet, there are many things which must be done. > Best I can say is to apply and find out. I obviously can't predict what the PSF will and won't approve. Sorry I can't be more specific but the PSF has not had time to work out exactly how proposals will be decided upon. At least you have a better chance with us than the Perl Foundation. =) -Brett From bac at OCF.Berkeley.EDU Sat Jun 4 19:05:51 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Sat, 04 Jun 2005 10:05:51 -0700 Subject: [summerofcode] "Complete SSL support" project In-Reply-To: <20050604103726.CD1E.FCANO@ono.com> References: <20050603213055.D66D.FCANO@ono.com> <42A0EC18.5080406@ocf.berkeley.edu> <20050604103726.CD1E.FCANO@ono.com> Message-ID: <42A1DF6F.1080006@ocf.berkeley.edu> Florencio Cano Gabarda wrote: >>One is making sure the code meets coding >>standards. Another is making sure it has a good API. It would also be nice to >>integrate it into the stdlib so that use in the urllib module (and any other >>modules that use HTTP as a protocol) is transparent as possible for using SSL. > > > Ok. So, what do you think of me applying for this work: make a module > for python called ssl.py that implements completely ssl and that has a > good API. And if possible integrate it in the stdlib and any other > module that use http to work trasparently with ssl. ?ok? Sounds fine with me, but I am not a web guy so I am probably the wrong person to ask. Hopefully someone with more need for an SSL module can comment. I would continue to hash stuff out on the wiki. Maybe consider contacting the authors of other SSL modules to see if they have any ideas. Just keep getting ideas from various people who would use the module. > But I have some questions: > > 1) All modules integrated in the stdlib are coded in C ? I ask that > because I would be preferably interested in coding in python but C is ok > for me too. > They are not all in C! If you have a a source download of Python just look in the Lib directory to see how much is coded in Python. If you can do it in Python then please do so. At this point things are written in C for the stdlib either because they have to be (interface to a C library, etc.) or there is a *huge* speed requirement. Otherwise it should be in C. > 2) Are there any requeriments, apart of being a very good module, to add > a module to the stdlib ? > Wide usage. Basically the community has to find it useful for it to go in. What that suggests is that your module needs to somehow provide something that other implementations don't have. If that is better integration into the stdlib that might do it. So I would just think about what you would want from an SSL module that you think would make it worthy to go into the stdlib and write that. > 3) Sorry because english is not my mother language so I don't understand > exactly this sentence: "...integrate it into the stdlib so that use in > the urllib module...". That means to add integrate ssl.py module to > urllib too? > Kind of. What I mean is for stuff like urllib.urlretrieve() support SSL without any special work. I don't know how SSL works so I don't know how easy or hard that would be. > Thanks very much for your help. It will be a great summer, summer of > code. > Hopefully! =) -Brett From bac at OCF.Berkeley.EDU Sat Jun 4 19:09:58 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Sat, 04 Jun 2005 10:09:58 -0700 Subject: [summerofcode] CleanupUrlLibProject In-Reply-To: References: Message-ID: <42A1E066.2050400@ocf.berkeley.edu> Thai Duong wrote: > Hello all, > > I'm very interested in the CleanupUrlLibProject and really want to do it > in the Google Summer of Code program. I have sent my application to > Google. So what am I supposed to do next? Please advise. I'm ready to > dive into this project immediately. > Sit and wait. =) At some point Google will forward to the PSF all the applications for us to look over and we then will go over them and decide which ones to accept. -Brett From bac at OCF.Berkeley.EDU Sat Jun 4 19:14:40 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Sat, 04 Jun 2005 10:14:40 -0700 Subject: [summerofcode] Project proposal: In-Reply-To: References: Message-ID: <42A1E180.1010101@ocf.berkeley.edu> Patrick Mullen wrote: > Hello fellow pythonistas! This seems like a great program that will > hopefully infuse new life into a lot of the open source community, and > it's wonderful that python is getting involved. At first I thought that > I could only choose off of the idea list on the wiki, in which case the > project I was going to go for would be the anygui one. While wxPython > is now mostly considered the de facto standard, it seems a little big to > be included as the standard gui for python. I would like to see a nice, > featured, light, gui to replace tk, which is pretty shabby in my > opinion. But that's quite a large undertaking. I would want to make it > expandable, so that the same code can be used without installing an > external toolkit, and then when you install gtk or wx it could use > that. For the summer of code I think getting a reference implementation > using sdl/opengl would be good. > This is obviously my personal opinion and not the PSF's or python-dev, but I would not count on Tkinter being replaced any time soon. Python 3000 might see a GUI change, but who knows. But don't let that discourage you! Just because something might not go into the stdlib does not make it useless! As long as the community would find it useful that is what counts. > My other idea is to implement a 2d game engine layer on top of > pygame. I've been working on such a thing for roughly a year, but it's > not very usable at the moment. I have sprites, buggy animation, smooth > scrolling, basic collision detection, verrry buggy physics, and tilemap > support. My goal is to end up with a nice pythonic 2d engine that makes > it easy to make any oldschool 2d game, from rpgs to platformers. You > can create new classes which subclass the defaults, like characters, > bullets, collision objects, to define functionality to fit the game. > For instance, if you need a scripted event to occur when a player walks > on a tile, you can subclass the tile class and add a def playerEnter() > function which runs the event. Some of the scripting capabilities are > already available, but there is a lot missing, and a lot of bugs. Many > of the main systems, like collisions, pretty much need a complete > rewrite. My goal for the summerofcode would be to get the engine up to > a level where it can handle say, a simple mario-style platformer. > That sounds like a fine idea. I doubt the PSF is going to reject an idea just because it is for games and not some module to help facilitate coding. If Google doesn't prevent you from making multiple proposals (don't they let you make multiple proposals but only have one accepted?) I would propose both. -Brett From roth at cs.utah.edu Sun Jun 5 00:14:54 2005 From: roth at cs.utah.edu (Greg Roth) Date: Sat, 04 Jun 2005 15:14:54 -0700 Subject: [summerofcode] shag: a graphics shell (summer of code project) Message-ID: <42A227DE.1000701@cs.utah.edu> I have an idea for a project that is similar to python, but has nothing to do with python per se. I'm developing a shell for graphics that allows users to issue commands that would otherwise need to be couched in a general-purpose language with whatever linking and such that would involve. The intention of this project is to create a more interesting environment for beginning programs who get more excited by spinning cubes than "hello world" and serves as a pedagogical tool for anyone interested in understanding the graphics pipeline in general, the OpenGL interface in particular, or just wants to try something quick and dirty without having to go through all the language issues such experimentation would otherwise involve. The language associated with the shell will include all typical programming language constructs such as loops, conditionals, and functions. It will also feature primitive graphics objects like colors, vectors, matrices, vertices, images, and meshes. This is nothing like any of the ideas you suggested. As I said, it really has nothing to do with python so much as it bears similar language designs and philosophy. I'd really appreciate knowing if this is something the Python Software Foundation would consider. Thanks Greg Roth From codedivine at gmail.com Sat Jun 4 23:53:49 2005 From: codedivine at gmail.com (Rahul Garg) Date: Sat, 4 Jun 2005 17:53:49 -0400 Subject: [summerofcode] my project idea for soc Message-ID: Hello People. I have submitted a project idea for SOC. Your comments about it will be helpful. I very much would like to work on this project regardless of SOC. So if you are intersted in mentoring me about this one please let me know! Some of the things and ideas required are especially complex and I would be happy to receive help. Second...i am currently doing an internship at a place where i have python 2.3.3 installed and i dont have user permissions to install python 2.4. the internship is till july 15. do you think my inability to use python 2.4 till around july 20 can be a hindrance? Rahul Modified application (Third submission...second revised submission) Title : Python visual object inspector Details : We can make better use of dynamic nature of python as well as the availability of tkinter in standard python distribution for a visual object inspector. For example during debugging it will be helpful to view an object. Intended features: 1.The view of an object must display the class , attributes and documentation. 2.In absence of a view implementation by a class , the default behaviour can be calling of view on attributes. 3.String representation can be included. 4.'Hyperlinks' to base classes should be provided. 5.String fields can be directly edited. 6.The view really enables visual programming to a certain extent.We can even have a metaclass called viewable.We can register the creation of viewable objects and can view the list of objects created so far. So we get a complete snapshot of the program in a visual way. 7.I think some features are supported by CMUCL (a common lisp compiler) as a grahical 'inspect' feature but i am not sure. 8.The feature must work correctly when being called from idle. In fact this can be thought of as a idle extension project. 9.Some views to be implemented for things like list,dicts,sets and tuples. 10.View must be capable enough to understand about the features of new style classes. I am now modifying some of my earlier proposals: 1.I think my earlier proposal that view can also be used to build some file viewers like html viewers is incorrect. It should focus only on object property views etc which are helpful for programming. 2.If a registry of viewable objects is to be maintained it should include some mechanism so that if there are no references other than the registry it should be garbage collected. 3.Having a name field of an object will also be helpful. Knowing where an object got created is helpful...but difficult task to implement without the programmer having to write much extra code. From ianb at colorstudy.com Sun Jun 5 00:25:43 2005 From: ianb at colorstudy.com (Ian Bicking) Date: Sat, 04 Jun 2005 17:25:43 -0500 Subject: [summerofcode] my project idea for soc In-Reply-To: References: Message-ID: <42A22A67.6010302@colorstudy.com> Hi Rahul. It sounds like a very useful project. Some comments: Rahul Garg wrote: > Hello People. > I have submitted a project idea for SOC. Your comments about it will be helpful. > I very much would like to work on this project regardless of SOC. So > if you are intersted in mentoring me about this one please let me > know! Some of the things and ideas required are especially complex and > I would be happy to receive help. > Second...i am currently doing an internship at a place where i have > python 2.3.3 installed and i dont have user permissions to install > python 2.4. the internship is till july 15. do you think my inability > to use python 2.4 till around july 20 can be a hindrance? > Rahul I don't think Python 2.4 changes anything very significant for this project. > Modified application (Third submission...second revised submission) > > Title : Python visual object inspector > > Details : > > We can make better use of dynamic nature of python as well as the > availability of tkinter in standard python distribution for a visual > object inspector. For example during debugging it will be helpful to > view an object. One thing you don't mention, but seems like an obvious aspect of this (and something you probably intend), is the ability to view and traverse Python frame objects. In other words, view the frames in a traceback, and view the local variables in those frames. > Intended features: > 1.The view of an object must display the class , attributes and documentation. This sounds like an ideal place to use Adapters or generic functions, so that views can be implemented separately from the objects themselves. > 2.In absence of a view implementation by a class , the default > behaviour can be calling of view on attributes. > 3.String representation can be included. > 4.'Hyperlinks' to base classes should be provided. Another kind of traversal really -- objects contain references to their classes, classes contain references to their base classes, etc. Still a lot of work to make that friendly, of course. > 5.String fields can be directly edited. Evaluating expressions in different contexts would generally be useful, and you'd get this ability for free (though without quite the same directed UI). > 6.The view really enables visual programming to a certain extent.We > can even have a metaclass called viewable.We can register the creation > of viewable objects and can view the list of objects created so far. > So we get a complete snapshot of the program in a visual way. Right now it's challenging to manage and persist objects when you allow this kind of flexibility. You can pickle objects, but you can't pickle code, so you'd have to create a whole new serialization process (maybe a hybrid of pickle and marshal). An interesting task, but it should really be a step two -- there's already a lot of work in this project, and I think it would be more important to get that work nailed down first. > 7.I think some features are supported by CMUCL (a common lisp > compiler) as a grahical 'inspect' feature but i am not sure. These basic features do exist in many languages. I'm sure there's something out there for Python, but I'm not immediately aware of anything. If that's the case, a successful way to approach the problem can often be tackling a smaller task than other projects, and trying to do it really well, and building on that. > 8.The feature must work correctly when being called from idle. In fact > this can be thought of as a idle extension project. I'm sure this would be useful elsewhere as well. For instance, py.test recently added a Tk frontend, and this could be very useful there. > 9.Some views to be implemented for things like list,dicts,sets and tuples. > 10.View must be capable enough to understand about the features of new > style classes. > > I am now modifying some of my earlier proposals: > > 1.I think my earlier proposal that view can also be used to build some > file viewers like html viewers is incorrect. It should focus only on > object property views etc which are helpful for programming. > > 2.If a registry of viewable objects is to be maintained it should > include some mechanism so that if there are no references other than > the registry it should be garbage collected. You mean a registry of instances, or classes? It seems like instances shouldn't need to be referenced -- you'd probably register views for kinds of objects, not specific objects. Classes and types aren't typically going to be garbage collected anyway, so it's not a big deal. Well, that's not true if you want to keep live views of objects as they are modified. In that case weak references are certainly necessary; the weakref module has everything you need, including callbacks so you could (for instance) remove widgets and views when objects are garbage collected. > 3.Having a name field of an object will also be helpful. Knowing where > an object got created is helpful...but difficult task to implement > without the programmer having to write much extra code. On many levels this is infeasible, though it is possible as you traverse objects to keep some record of what objects refer to what other objects, and have a kind of backreference search. I don't believe it is generally possible to scan the entire process for backreferences (or it would require some low-level work in C to do it). Of course, objects in Python don't have names, only the possibility of named bindings. I think it would be a bad idea to create conventions for trully named objects, as there's good design reasons why Python doesn't already have this. -- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org From skip at pobox.com Sun Jun 5 00:29:00 2005 From: skip at pobox.com (Skip Montanaro) Date: Sat, 4 Jun 2005 17:29:00 -0500 Subject: [summerofcode] my project idea for soc In-Reply-To: References: Message-ID: <17058.11052.609726.359494@montanaro.dyndns.org> Rahul> We can make better use of dynamic nature of python as well as the Rahul> availability of tkinter in standard python distribution for a Rahul> visual object inspector. For example during debugging it will be Rahul> helpful to view an object. Rahul> Intended features: Rahul> 1.The view of an object must display the class , attributes and Rahul> documentation. ... FYI, check out the _PyObject_Dump and _PyGC_Dump APIs, and the corresponding usage in Misc/gdbinit: # Prints a representation of the object to stderr, along with the # number of reference counts it current has and the hex address the # object is allocated at. The argument must be a PyObject* define pyo print _PyObject_Dump($arg0) end # Prints a representation of the object to stderr, along with the # number of reference counts it current has and the hex address the # object is allocated at. The argument must be a PyGC_Head* define pyg print _PyGC_Dump($arg0) end Extending them would probably be a good place to start. It would be nice if they could optionally display the attributes of an object as well. Skip From ianb at colorstudy.com Sun Jun 5 00:48:56 2005 From: ianb at colorstudy.com (Ian Bicking) Date: Sat, 04 Jun 2005 17:48:56 -0500 Subject: [summerofcode] shag: a graphics shell (summer of code project) In-Reply-To: <42A227DE.1000701@cs.utah.edu> References: <42A227DE.1000701@cs.utah.edu> Message-ID: <42A22FD8.1070705@colorstudy.com> Greg Roth wrote: > I have an idea for a project that is similar to python, but has nothing > to do with python per se. I'm developing a shell for graphics that > allows users to issue commands that would otherwise need to be couched > in a general-purpose language with whatever linking and such that would > involve. It sounds like you want to make something with the same basic intention as Logo, but with more modern graphics. > The intention of this project is to create a more interesting > environment for beginning programs who get more excited by spinning > cubes than "hello world" and serves as a pedagogical tool for anyone > interested in understanding the graphics pipeline in general, the OpenGL > interface in particular, or just wants to try something quick and dirty > without having to go through all the language issues such > experimentation would otherwise involve. I would strong recommend not creating a new language. Very strongly. Having looked at many of the open source implementations of "logo", there's a lot of them that just take Logo turtle graphics, and then create what the author things is a simpler or easier-to-implement language. I think this is a huge waste -- the languages are usually not easier to implement or program in than Logo. (And I'm afraid I'd have to include Guido van Robot in this assessment) You wouldn't necessarily have to use Logo -- though I think it is a very good language for this purpose -- but I think you should use an existing language (if not the implementation, then the basic syntax). If you are interested in Logo, I'd be willing to mentor a project using PyLogo (pylogo.org). The language is pretty much implemented -- I had thought about adding OO extensions (and the stuff in the repository may be mid-refactoring as a result), but it's not really that important. Most of the work would be in creating an interesting environment to work with (sprites and graphics and editors and all that), which might be what interests you about the project. I imagine you could probably also find a PSF mentor for Guido van Robot, if you were interested in extending that environment. -- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org From david.ascher at gmail.com Sun Jun 5 02:50:49 2005 From: david.ascher at gmail.com (David Ascher) Date: Sat, 4 Jun 2005 17:50:49 -0700 Subject: [summerofcode] Hi all. Message-ID: Hi all. 1) I just realized that I was the admin on the list, but wasn't subscribed. I've scanned the archives, and haven't seen anything important that wasn't answered. Someone correct me if I'm wrong. 1.5) If someone would be willing to co-administer the mailing list with me, the Python.org webmaster (Brad) would love to get out of it, so let me know. 2) I'm the point of contact between the google admin folks and the PSF. That doesn't mean that I have any definite answers for anything =). I encourage people with questions to read in particular the FAQs hosted by Google on the topic of the program. If a question strikes you as important and it isn't getting answered on the list, feel free to contact me directly. 3) The PSF is a mentoring organization, but we have a lot of work to do to figure out exactly how we're going to select the applicants (I get the impression we'll have to be quite selective, as there are a lot of applicants going in and only a fixed $ amount and only so many mentoring time. 4) I expect that we'll have to setup another mailing list for discussions of the applicants, restricted to PSF members and invited guests (i.e. trusted mentors). 5) If you want to be a mentor and don't want to sign up in public (e.g. on the wiki page to that effect: http://wiki.python.org/moin/CodingProjectIdeas/MentorshipCoordination), send me an email with the details (e.g. areas of expertise or willingness to serve as a general mentor). 6) Any other ideas on how we can make this process as easy, fair, and productive as possible? That's all I can think of for now. Cheers, -- David From lorentz at canterburytravel.com Sat Jun 4 22:29:39 2005 From: lorentz at canterburytravel.com (Lorentz Morrow) Date: Sat, 4 Jun 2005 15:29:39 -0500 Subject: [summerofcode] stdlib port to python Message-ID: <200506041529.39798.lorentz@canterburytravel.com> I'm interested in doing the port of stdlib to python. If I'm understanding correctly you need a port of the following functions: atof, atoi, atol, ecvt, fcvt, itoa, ltoa, strtod, strtol, strtoul, ultoa, bsearch, lfind, lsearch, qsort, swab, abs, div, labs, ldiv calloc, free, malloc, realloc, abort, atexit, exit, getenv, putenv, system, I don't see any problem with the first three lines of functions but I'm a little unsure about the last two. Maybe I'm confused but wouldn't I need to have python make calls to the kernel to request memory allocation or process control? and won't that be OS specific? Would it be sufficent to just write the port for one or two OSes? If the person who posted this could suggestion could contact me with a little more specific information I would appreciate it. Also, if I'm interpreting this SoC suggestion incorrectly would someone let me know. -Lorentz From bac at OCF.Berkeley.EDU Sun Jun 5 05:17:41 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Sat, 04 Jun 2005 20:17:41 -0700 Subject: [summerofcode] stdlib port to python In-Reply-To: <200506041529.39798.lorentz@canterburytravel.com> References: <200506041529.39798.lorentz@canterburytravel.com> Message-ID: <42A26ED5.8070407@ocf.berkeley.edu> Lorentz Morrow wrote: > I'm interested in doing the port of stdlib to python. If I'm understanding > correctly you need a port of the following functions: > atof, atoi, atol, ecvt, fcvt, itoa, ltoa, strtod, strtol, strtoul, ultoa, > bsearch, lfind, lsearch, qsort, swab, > abs, div, labs, ldiv > calloc, free, malloc, realloc, > abort, atexit, exit, getenv, putenv, system, > In what way do you mean by porting to Python? To add these ISO C functions to the stdlib so they are accessible in Python code? If that is what you mean then do realize that almost all of them are already available in the stdlib (e.g. ``int("12345")``) or they are not needed (what purpose would malloc() serve at the Python level?). And obviously these are already available at the C level since Python requires a C89 compiler. A little clarification is needed to know what you are trying to accomplish before any feedback can be given. -Brett From lorentz at canterburytravel.com Sun Jun 5 01:40:04 2005 From: lorentz at canterburytravel.com (Lorentz Morrow) Date: Sat, 4 Jun 2005 18:40:04 -0500 Subject: [summerofcode] stdlib port to python In-Reply-To: <42A26ED5.8070407@ocf.berkeley.edu> References: <200506041529.39798.lorentz@canterburytravel.com> <42A26ED5.8070407@ocf.berkeley.edu> Message-ID: <200506041840.04484.lorentz@canterburytravel.com> On Saturday 04 June 2005 10:17 pm, Brett C. wrote: > Lorentz Morrow wrote: > > I'm interested in doing the port of stdlib to python. If I'm > > understanding correctly you need a port of the following functions: > > atof, atoi, atol, ecvt, fcvt, itoa, ltoa, strtod, strtol, strtoul, > > ultoa, bsearch, lfind, lsearch, qsort, swab, > > abs, div, labs, ldiv > > calloc, free, malloc, realloc, > > abort, atexit, exit, getenv, putenv, system, > > In what way do you mean by porting to Python? To add these ISO C functions > to the stdlib so they are accessible in Python code? If that is what you > mean then do realize that almost all of them are already available in the > stdlib (e.g. ``int("12345")``) or they are not needed (what purpose would > malloc() serve at the Python level?). > > And obviously these are already available at the C level since Python > requires a C89 compiler. A little clarification is needed to know what you > are trying to accomplish before any feedback can be given. > > -Brett I was reading the page http://wiki.python.org/moin/CodingProjectIdeas it says: (" Port stdlib modules from C to Python Jython, IronPython, and PyPy all require standard library modules to be written in pure Python; porting C-based standard library modules to Python helps them.") When I read it I was under the idea that someone affiliated with PSF in some way was making it as a suggestion. Perhaps I misunderstand what it is saying. Or since it is on a wiki page it has been added by someone who didn't really understand what they were suggesting. Perhaps I should look into something else. -Lorentz From narayannewton at gmail.com Sun Jun 5 06:51:32 2005 From: narayannewton at gmail.com (Narayan Newton) Date: Sat, 4 Jun 2005 21:51:32 -0700 Subject: [summerofcode] FileSystemVirtualization - Ideas Message-ID: Hi all.... I am looking to apply for implementing the "FileSystemVirtualization" project and would like some feedback on a couple ideas. I could see this project working two ways. The first would be fairly simple. It would involve creating a 'generic' class to represent a file system. For the sake of argument, lets call it the FileSystem class. (I am known for my original names) This class would have various methods defined that you need on a FS: write, read, listdir, open..etc. Children of this class would implement various types of file systems. For example, there could be a SvnFileSystem, CvsFileSystem, MySQLFileSystem...etc. These would each implement the class in whatever way they needed to make it work. This would allow programs to use many different file systems easily. The other idea would be to build a full-scale vfs system. This would work in much the same way, except there would be a "master" class and a defined uri standard. For example, lets call our master class MasterFS (there's that naming skill again) and lets say the uri "cvs://" signifies a call to a cvs file system. When a program tries to open a file with a uri in the "cvs://" style, it would use a table to find the right FileSystem object to pass the request to. It might not even use a table...maybe just a defined rule for how to go from the uri to the right FS object. (For example, "cvs://" might translate to CvsFileSystem and "svn://" to SvnFileSystem) The advantage here is obviously that the type of file system would make no difference to the program. Anyway...any thoughts on this? The second idea would definitely be more "complete" and seems more attractive to me, but I wanted to see if anyone here had any opinions. -- Narayan Newton -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050604/cbd88a1f/attachment.htm From narayannewton at gmail.com Sun Jun 5 06:55:14 2005 From: narayannewton at gmail.com (Narayan Newton) Date: Sat, 4 Jun 2005 21:55:14 -0700 Subject: [summerofcode] stdlib port to python In-Reply-To: <200506041840.04484.lorentz@canterburytravel.com> References: <200506041529.39798.lorentz@canterburytravel.com> <42A26ED5.8070407@ocf.berkeley.edu> <200506041840.04484.lorentz@canterburytravel.com> Message-ID: On 6/4/05, Lorentz Morrow wrote: > > On Saturday 04 June 2005 10:17 pm, Brett C. wrote: > > Lorentz Morrow wrote: > > > I'm interested in doing the port of stdlib to python. If I'm > > > understanding correctly you need a port of the following functions: > > > atof, atoi, atol, ecvt, fcvt, itoa, ltoa, strtod, strtol, strtoul, > > > ultoa, bsearch, lfind, lsearch, qsort, swab, > > > abs, div, labs, ldiv > > > calloc, free, malloc, realloc, > > > abort, atexit, exit, getenv, putenv, system, > > > > In what way do you mean by porting to Python? To add these ISO C > functions > > to the stdlib so they are accessible in Python code? If that is what you > > mean then do realize that almost all of them are already available in > the > > stdlib (e.g. ``int("12345")``) or they are not needed (what purpose > would > > malloc() serve at the Python level?). > > > > And obviously these are already available at the C level since Python > > requires a C89 compiler. A little clarification is needed to know what > you > > are trying to accomplish before any feedback can be given. > > > > -Brett > > I was reading the page http://wiki.python.org/moin/CodingProjectIdeas it > says: > (" Port stdlib modules from C to Python > Jython, IronPython, and PyPy all require standard library modules to be > written in pure Python; porting C-based standard library modules to Python > helps them.") > When I read it I was under the idea that someone affiliated with PSF in > some > way was making it as a suggestion. Perhaps I misunderstand what it is > saying. Or since it is on a wiki page it has been added by someone who > didn't really understand what they were suggesting. Perhaps I should look > into something else. > > -Lorentz > > _______________________________________________ > summerofcode mailing list > summerofcode at python.org > http://mail.python.org/mailman/listinfo/summerofcode > I read that idea as porting the modules in the Python Standard Lib that are coded in C to straight python. Maybe I am wrong, but that would seem to make more sense then porting over stdlib.h. -- Narayan Newton -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050604/326949c1/attachment-0001.html From jmbrook2 at uncg.edu Sun Jun 5 08:07:32 2005 From: jmbrook2 at uncg.edu (Jonathan M Brooks JMBROOK2) Date: Sun, 5 Jun 2005 02:07:32 -0400 Subject: [summerofcode] Jython projects -- porting IDLE to Jython/Swing Message-ID: I've put in an application for this one. If there are other Jython projects that a mentor would recommend of this sort, please let me know. Jonathan M. Brooks jmbrook2 at uncg.edu From ianb at colorstudy.com Sun Jun 5 09:15:33 2005 From: ianb at colorstudy.com (Ian Bicking) Date: Sun, 05 Jun 2005 02:15:33 -0500 Subject: [summerofcode] stdlib port to python In-Reply-To: References: <200506041529.39798.lorentz@canterburytravel.com> <42A26ED5.8070407@ocf.berkeley.edu> <200506041840.04484.lorentz@canterburytravel.com> Message-ID: <42A2A695.4080609@colorstudy.com> Narayan Newton wrote: > I read that idea as porting the modules in the Python Standard Lib that > are coded in C to straight python. Maybe I am wrong, but that would seem > to make more sense then porting over stdlib.h. That's right. There's several modules, like I believe the sets module and datetime, that don't have Python versions (or those versions are not fully up to date with the C versions). Porting these to Python is a request I've frequently heard from people involved in Jython, PyPy, and IronPython, when they are asked what someone can do to help the project. I put it on the list, but I just did so because I know this is something other people have asked for. -- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org From hpk at merlinux.de Sun Jun 5 10:45:00 2005 From: hpk at merlinux.de (holger krekel) Date: Sun, 5 Jun 2005 10:45:00 +0200 Subject: [summerofcode] stdlib port to python Message-ID: <20050605084500.GO5694@solar.trillke.net> On Sun, Jun 05, 2005 at 02:15 -0500, Ian Bicking wrote: > Narayan Newton wrote: > > I read that idea as porting the modules in the Python Standard Lib that > > are coded in C to straight python. Maybe I am wrong, but that would seem > > to make more sense then porting over stdlib.h. > > That's right. There's several modules, like I believe the sets module > and datetime, that don't have Python versions (or those versions are not > fully up to date with the C versions). Porting these to Python is a > request I've frequently heard from people involved in Jython, PyPy, and > IronPython, when they are asked what someone can do to help the project. > > I put it on the list, but I just did so because I know this is something > other people have asked for. right. For PyPy (and for the other implementations, i guess), a starting point for reimplementing C-modules is import sys print sys.builtin_module_names which lists some basic important modules implemented in C and that the other python implementations need. For PyPy, probably most interesting is 're', i.e. a full python implementation of regular expressions. It would be good if such an implementation would be reasonably statically written because in PyPy we can translate such "restricted" python modules to lower level code. A second approach to identifying module-to-be-reimplemented is to look into the 'Modules' sub directory of a CPython checkout/tree. However, before anyone submits a proposal for a specific module to be reimplemented, it's good to suggest it here on the list so we can make sure that it hasn't already been done. (for example, in PyPy we have some ongoing work on '_codecs', and of course 'exceptions' and '__builtin__' are already done). cheers, holger From arigo at tunes.org Sun Jun 5 13:25:55 2005 From: arigo at tunes.org (Armin Rigo) Date: Sun, 5 Jun 2005 13:25:55 +0200 Subject: [summerofcode] stdlib port to python In-Reply-To: <20050605084500.GO5694@solar.trillke.net> References: <20050605084500.GO5694@solar.trillke.net> Message-ID: <20050605112555.GA7116@code1.codespeak.net> Hi, On Sun, Jun 05, 2005 at 10:45:00AM +0200, holger krekel wrote: > > > I read that idea as porting the modules in the Python Standard Lib that > > > are coded in C to straight python. Maybe I am wrong, but that would seem > > > to make more sense then porting over stdlib.h. > > > > That's right. There's several modules, like I believe the sets module > > and datetime, that don't have Python versions (or those versions are not > > fully up to date with the C versions). > However, before anyone submits a proposal for a specific > module to be reimplemented, it's good to suggest it here on > the list so we can make sure that it hasn't already been done. > (for example, in PyPy we have some ongoing work on '_codecs', > and of course 'exceptions' and '__builtin__' are already > done). Yes, let me add more emphasis to this paragraph: a number of modules have already been found, updated, or reimplemented by someone around the PyPy project (more than Holger's post can suggest): datetime, cmath, decimal, _codecs, itertools, marshal, md5, operator, random, sha, struct, unicodecodec, unicodedata, parser. The job here would be to pick another module and rewrite it in Python; some examples: _sre (regular expressions) zipimport array audioop binascii (partially done) collections imageop rgbimg For the very motivated, it's also possible to provide a complete re-implementation of functionality that is normally available as an external library: bz2 pyexpat readline zlib A bientot, Armin From codedivine at gmail.com Sun Jun 5 16:46:06 2005 From: codedivine at gmail.com (Rahul Garg) Date: Sun, 5 Jun 2005 10:46:06 -0400 Subject: [summerofcode] my project idea for soc In-Reply-To: References: <42A22A67.6010302@colorstudy.com> Message-ID: Hi. Thanks for your enlightening comments. On 6/4/05, Ian Bicking wrote: > Hi Rahul. It sounds like a very useful project. Some comments: > > Rahul Garg wrote: > > Hello People. > > I have submitted a project idea for SOC. Your comments about it will be helpful. > > I very much would like to work on this project regardless of SOC. So > > if you are intersted in mentoring me about this one please let me > > know! Some of the things and ideas required are especially complex and > > I would be happy to receive help. > > Second...i am currently doing an internship at a place where i have > > python 2.3.3 installed and i dont have user permissions to install > > python 2.4. the internship is till july 15. do you think my inability > > to use python 2.4 till around july 20 can be a hindrance? > > Rahul > > I don't think Python 2.4 changes anything very significant for this project. > > > Modified application (Third submission...second revised submission) > > > > Title : Python visual object inspector > > > > Details : > > > > We can make better use of dynamic nature of python as well as the > > availability of tkinter in standard python distribution for a visual > > object inspector. For example during debugging it will be helpful to > > view an object. > > One thing you don't mention, but seems like an obvious aspect of this > (and something you probably intend), is the ability to view and traverse > Python frame objects. In other words, view the frames in a traceback, > and view the local variables in those frames. I hadnt thought of that...but now it does seem obvious that it will be highly useful. > > Intended features: > > 1.The view of an object must display the class , attributes and documentation. > > This sounds like an ideal place to use Adapters or generic functions, so > that views can be implemented separately from the objects themselves. > > 2.In absence of a view implementation by a class , the default > > behaviour can be calling of view on attributes. > > 3.String representation can be included. > > 4.'Hyperlinks' to base classes should be provided. > > Another kind of traversal really -- objects contain references to their > classes, classes contain references to their base classes, etc. Still a > lot of work to make that friendly, of course. > > > 5.String fields can be directly edited. > > Evaluating expressions in different contexts would generally be useful, > and you'd get this ability for free (though without quite the same > directed UI). Yes...python really is dynamic! > > 6.The view really enables visual programming to a certain extent.We > > can even have a metaclass called viewable.We can register the creation > > of viewable objects and can view the list of objects created so far. > > So we get a complete snapshot of the program in a visual way. > > Right now it's challenging to manage and persist objects when you allow > this kind of flexibility. You can pickle objects, but you can't pickle > code, so you'd have to create a whole new serialization process (maybe a > hybrid of pickle and marshal). An interesting task, but it should > really be a step two -- there's already a lot of work in this project, > and I think it would be more important to get that work nailed down first. Hmm...you are correct. I should not be thinking about registration of instances at all (at this point anyway) , only of viewable classes since that gives us almost all of what is useful and can be done in a pythonic way. And i will search for similar projects in python. sincerely, Rahul From mistobaan at gmail.com Sun Jun 5 19:57:37 2005 From: mistobaan at gmail.com (Misto .) Date: Sun, 5 Jun 2005 19:57:37 +0200 Subject: [summerofcode] SpeedUpInterpreterStartup - IDEAS In-Reply-To: <42A0F568.6070304@ocf.berkeley.edu> References: <42A0F568.6070304@ocf.berkeley.edu> Message-ID: > Since I tossed up that idea I should probably reply to you. =) Thanks! > > Sounds like a plan. Easy way to test startup time is to execute Python under > 'time' with nothing but 'pass' to be executed; ``time python -c "pass"``. Ok that is the basic test. I am tryng to obtain a precise profile of the time that each component takes in being loaded. Seems that this guy have something usefull http://www.nickbastin.com/archives/000160.php I'll try to contact him... > That is probably a waste of time. Psyco only tweaks the eval loop, nothing > more. And because Psyco is x86-only it won't work for Python itself since it > needs to work with any C compiler with POSIX libraries. Ah ok. Time gained. > In other words any changes need to work with *all* platforms Python supports. Ack! > Martin v. L?wis and Nick Bastin worked on this at PyCon 2004. They discovered > that site.py was very costly to import (partially because of the distutils > import). After that some other modules that were imported were costly (I think > 'warnings' was expensive to import since it is pure Python and uses the 're' > module heavily). Thanks for this! > Any good ideas or material concerning the topic is welcome. I have seen the patch that nick bastin has proposed. https://sourceforge.net/tracker/?func=detail&atid=305470&aid=920509&group_id=5470 I'll try to hack a bit with this. > Don't get to heavy into this, Misto. Don't worry. I think that speeding up Python is fundamental to improve the use of this language. I think that with a faster startup many little applications "type and run" will be more usefull. > I don't want you to sent in a proposal > and get rejected after a ton of work. Unless of course you enjoy it! If so, > then go wild! =) I'll try to speed up the startup. If the google team will accept me I will dedicate a good amount of my summer time to accomplish the project. Otherwise I'll spend more time in my italian summer house. :D Misto From bogus@does.not.exist.com Sun Jun 5 20:35:33 2005 From: bogus@does.not.exist.com () Date: Sun, 5 Jun 2005 20:35:33 +0200 Subject: [summerofcode] FileSystemVirtualization - Ideas In-Reply-To: References: Message-ID: <20050605183533.GF15602@solar.trillke.net> Hi Narayan, On Sat, Jun 04, 2005 at 21:51 -0700, Narayan Newton wrote: > I am looking to apply for implementing the "FileSystemVirtualization" > project and would like some feedback on a couple ideas. I could see this > project working two ways. The first would be fairly simple. It would involve > creating a 'generic' class to represent a file system. For the sake of > argument, lets call it the FileSystem class. (I am known for my original > names) This class would have various methods defined that you need on a FS: > write, read, listdir, open..etc. Children of this class would implement > various types of file systems. For example, there could be a SvnFileSystem, > CvsFileSystem, MySQLFileSystem...etc. These would each implement the class > in whatever way they needed to make it work. This would allow programs to > use many different file systems easily. I like this idea. > The other idea would be to build a full-scale vfs system. This would work in > much the same way, except there would be a "master" class and a defined uri > standard. I wouldn't neccessarily mixin URI schemes into the vfs idea. It seems more important to have clear and documented semantics at API level and to make sure (by writing lots of tests) that the semantics work reasonably well across fileystem implementations. Adding an URL scheme on top of such an API and its implementations shouldn't be hard, though. Btw, I don't see a connection to inheritance requirements there. It's surely possible to just have a dictionary of scheme->urlhandler mappings without requiring the 'urlhandler' to even be a class. cheers, holger From salma.dagli at gmail.com Sun Jun 5 20:52:49 2005 From: salma.dagli at gmail.com (Salma Dagli) Date: Mon, 6 Jun 2005 00:22:49 +0530 Subject: [summerofcode] Info on MemoryUsageProfiler for Python Message-ID: While doing some research on previous work being done on this project idea, I stumbled across Vladimir Marangozov's Memory Allocator and also "a somewhat rough, but working memory profiler". (http://starship.python.net/crew/vlad/pymalloc/). Do the Python veterans here have any more info on this? And why was this not incorporated into Python then? Salma From narayannewton at gmail.com Sun Jun 5 21:13:37 2005 From: narayannewton at gmail.com (Narayan Newton) Date: Sun, 5 Jun 2005 12:13:37 -0700 Subject: [summerofcode] FileSystemVirtualization - Ideas In-Reply-To: <20050605183533.GF15602@solar.trillke.net> References: <20050605183533.GF15602@solar.trillke.net> Message-ID: On 6/5/05, holger krekel wrote: > > Hi Narayan, > > On Sat, Jun 04, 2005 at 21:51 -0700, Narayan Newton wrote: > > I am looking to apply for implementing the "FileSystemVirtualization" > > project and would like some feedback on a couple ideas. I could see this > > project working two ways. The first would be fairly simple. It would > involve > > creating a 'generic' class to represent a file system. For the sake of > > argument, lets call it the FileSystem class. (I am known for my original > > names) This class would have various methods defined that you need on a > FS: > > write, read, listdir, open..etc. Children of this class would implement > > various types of file systems. For example, there could be a > SvnFileSystem, > > CvsFileSystem, MySQLFileSystem...etc. These would each implement the > class > > in whatever way they needed to make it work. This would allow programs > to > > use many different file systems easily. > > I like this idea. > > > The other idea would be to build a full-scale vfs system. This would > work in > > much the same way, except there would be a "master" class and a defined > uri > > standard. > > I wouldn't neccessarily mixin URI schemes into the vfs idea. > It seems more important to have clear and documented semantics > at API level and to make sure (by writing lots of tests) that > the semantics work reasonably well across fileystem > implementations. > > Adding an URL scheme on top of such an API and its > implementations shouldn't be hard, though. Btw, I don't see a > connection to inheritance requirements there. It's surely possible > to just have a dictionary of scheme->urlhandler mappings > without requiring the 'urlhandler' to even be a class. > > cheers, > > holger > That was my concern with the second idea. While it seemed more 'complete', it also seemed like a bit too much. Defining a uri construct would probably not go over well with kde/gnome/etc and if it was left open, developers could create their own constructs that could map to the target environment. (GNOMEish one for GNOME, KDEish one for KDE). So ya...I think your right on the money there. As for the inheritance, I was thinking that there would be some methods that every FS class should have, but are more convenience methods and would pretty much just be wrappers around other class methods. It would be nice to not have to write this for every FS class, just inherit them from the parent. -- Narayan Newton -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050605/bcf77d00/attachment.html From narayannewton at gmail.com Sun Jun 5 21:18:16 2005 From: narayannewton at gmail.com (Narayan Newton) Date: Sun, 5 Jun 2005 12:18:16 -0700 Subject: [summerofcode] FileSystemVirtualization - Ideas In-Reply-To: References: <20050605183533.GF15602@solar.trillke.net> Message-ID: On 6/5/05, Narayan Newton wrote: > > > > On 6/5/05, holger krekel wrote: > > > > Hi Narayan, > > > > On Sat, Jun 04, 2005 at 21:51 -0700, Narayan Newton wrote: > > > I am looking to apply for implementing the "FileSystemVirtualization" > > > project and would like some feedback on a couple ideas. I could see > > this > > > project working two ways. The first would be fairly simple. It would > > involve > > > creating a 'generic' class to represent a file system. For the sake of > > > argument, lets call it the FileSystem class. (I am known for my > > original > > > names) This class would have various methods defined that you need on > > a FS: > > > write, read, listdir, open..etc. Children of this class would > > implement > > > various types of file systems. For example, there could be a > > SvnFileSystem, > > > CvsFileSystem, MySQLFileSystem...etc. These would each implement the > > class > > > in whatever way they needed to make it work. This would allow programs > > to > > > use many different file systems easily. > > > > I like this idea. > > > > > The other idea would be to build a full-scale vfs system. This would > > work in > > > much the same way, except there would be a "master" class and a > > defined uri > > > standard. > > > > I wouldn't neccessarily mixin URI schemes into the vfs idea. > > It seems more important to have clear and documented semantics > > at API level and to make sure (by writing lots of tests) that > > the semantics work reasonably well across fileystem > > implementations. > > > > Adding an URL scheme on top of such an API and its > > implementations shouldn't be hard, though. Btw, I don't see a > > connection to inheritance requirements there. It's surely possible > > to just have a dictionary of scheme->urlhandler mappings > > without requiring the 'urlhandler' to even be a class. > > > > cheers, > > > > holger > > > > That was my concern with the second idea. While it seemed more 'complete', > it also seemed like a bit too much. Defining a uri construct would probably > not go over well with kde/gnome/etc and if it was left open, developers > could create their own constructs that could map to the target environment. > (GNOMEish one for GNOME, KDEish one for KDE). So ya...I think your right on > the money there. > > As for the inheritance, I was thinking that there would be some methods > that every FS class should have, but are more convenience methods and would > pretty much just be wrappers around other class methods. It would be nice to > not have to write this for every FS class, just inherit them from the > parent. > > > -- > Narayan Newton Hah, scratch the last paragraph...I completely misread what you were saying there. Time for coffee.... -- Narayan Newton -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050605/3cfa1d36/attachment-0001.html From hpk at trillke.net Sun Jun 5 21:26:04 2005 From: hpk at trillke.net (holger krekel) Date: Sun, 5 Jun 2005 21:26:04 +0200 Subject: [summerofcode] FileSystemVirtualization - Ideas In-Reply-To: References: <20050605183533.GF15602@solar.trillke.net> Message-ID: <20050605192603.GH15602@solar.trillke.net> On Sun, Jun 05, 2005 at 12:13 -0700, Narayan Newton wrote: > As for the inheritance, I was thinking that there would be some methods that > every FS class should have, but are more convenience methods and would > pretty much just be wrappers around other class methods. Maybe. IMO it makes sense to keep the lowlevel filesystem class/API _very_ minimal and with no fluff so that it is easy to implement a new backend. You might be suprised how difficult it is to implement and test common semantics of just a few filesystem implementations especially when it comes to clean error conditions/uniform exception handling. > It would be nice to not have to write this for every FS > class, just inherit them from the parent. Sure enough. However, Filename and/or URI manipulations should probably go at a separated layer (call it 'frontend' if you like) that can make use of filesystem implementations without a need to subclass. cheers, holger From narayannewton at gmail.com Sun Jun 5 21:51:14 2005 From: narayannewton at gmail.com (Narayan Newton) Date: Sun, 5 Jun 2005 12:51:14 -0700 Subject: [summerofcode] FileSystemVirtualization - Ideas In-Reply-To: <20050605192603.GH15602@solar.trillke.net> References: <20050605183533.GF15602@solar.trillke.net> <20050605192603.GH15602@solar.trillke.net> Message-ID: On 6/5/05, holger krekel wrote: > > On Sun, Jun 05, 2005 at 12:13 -0700, Narayan Newton wrote: > > As for the inheritance, I was thinking that there would be some methods > that > > every FS class should have, but are more convenience methods and would > > pretty much just be wrappers around other class methods. > > Maybe. IMO it makes sense to keep the lowlevel filesystem > class/API _very_ minimal and with no fluff so that it is easy to > implement a new backend. You might be suprised how difficult it is > to implement and test common semantics of just a few filesystem > implementations especially when it comes to clean error > conditions/uniform exception handling. > > > It would be nice to not have to write this for every FS > > class, just inherit them from the parent. > > Sure enough. However, Filename and/or URI manipulations > should probably go at a separated layer (call it 'frontend' if > you like) that can make use of filesystem implementations > without a need to subclass. > > cheers, > > holger > Agreed. I had misinterpreted what you said. :) -- Narayan Newton -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050605/584e333e/attachment.htm From mwh at python.net Sun Jun 5 23:09:21 2005 From: mwh at python.net (Michael Hudson) Date: Sun, 05 Jun 2005 22:09:21 +0100 Subject: [summerofcode] stdlib port to python In-Reply-To: <42A2A695.4080609@colorstudy.com> (Ian Bicking's message of "Sun, 05 Jun 2005 02:15:33 -0500") References: <200506041529.39798.lorentz@canterburytravel.com> <42A26ED5.8070407@ocf.berkeley.edu> <200506041840.04484.lorentz@canterburytravel.com> <42A2A695.4080609@colorstudy.com> Message-ID: <2mbr6kv7cu.fsf@starship.python.net> Ian Bicking writes: > That's right. There's several modules, like I believe the sets module > and datetime, that don't have Python versions Thse two would seem to be particularly odd examples to choose, given that they were extensively prototyped in Python first (and indeed the sets module still is in Python). Cheers, mwh -- The snakes are optional, as are the electrodes, the molten lead and the ritual buggering by syphilitic warthogs. -- Tanuki the Raccoon-dog, asr From bac at OCF.Berkeley.EDU Mon Jun 6 01:13:21 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Sun, 05 Jun 2005 16:13:21 -0700 Subject: [summerofcode] FileSystemVirtualization - Ideas In-Reply-To: References: Message-ID: <42A38711.9080904@ocf.berkeley.edu> Narayan Newton wrote: > > > Hi all.... > > > I am looking to apply for implementing the "FileSystemVirtualization" > project and would like some feedback on a couple ideas. [SNIP] > > Anyway...any thoughts on this? The second idea would definitely be more > "complete" and seems more attractive to me, but I wanted to see if > anyone here had any opinions. > Just because I have not seen it mentioned (although I just added it to the wiki) is to look at Tcl's virtual file system. -Brett From tali.wang at gmail.com Mon Jun 6 02:33:19 2005 From: tali.wang at gmail.com (Linan Wang) Date: Mon, 6 Jun 2005 01:33:19 +0100 Subject: [summerofcode] idea of speedup interpreter startup Message-ID: hi, everybody, Let's go to the topic directly :) I propose to use "lazy import" strategy to handle modula import. The term lazy here means import the compiled function's code only before first using it. Sometimes we only use few functions/classes in a module, but it seems we import all the compiled code when we do importing. It's quite a waste of time and resource. By introducing a function/class table at some place of compiled code, we can import only the definition of the module. When before firing a function in a module, interpreter does the real import action. This idea maybe considered before and abandoned because of the cost of IO operation, rr, the implementation of lazy strategy for classes import is a quite complex. Does this idea make sense? Any mentors want to give me some ideas? Thanks alot! -- Wang ----------------------------------------------- Email:tali.wang at gmail.com Or: arp04lw at shef.ac.uk ----------------------------------------------- From bac at OCF.Berkeley.EDU Mon Jun 6 05:47:29 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Sun, 05 Jun 2005 20:47:29 -0700 Subject: [summerofcode] idea of speedup interpreter startup In-Reply-To: References: Message-ID: <42A3C751.6000402@ocf.berkeley.edu> Linan Wang wrote: > hi, everybody, > > Let's go to the topic directly :) > I propose to use "lazy import" strategy to handle modula import. > The term lazy here means import the compiled function's code only > before first using it. Sometimes we only use few functions/classes in > a module, but it seems we import all the compiled code when we do > importing. Right. Even if you do ``from module import *`` the module still ends up in sys.modules; you just specify what ends up in your namespace. > It's quite a waste of time and resource. Don't know if that is fair to say. Remember that the initial importation executes the module. Also remember that 'class' and 'def' are statements; Guido has stated multiple times they should be viewed as such. So executing the entire module, including 'class' and 'def' is not a waste since the semantics are straight-forward to explain. > By introducing a function/class table at some place of compiled code, > we can import only the definition of the module. When before firing a > function in a module, interpreter does the real import action. > So like a proxy in the module type that, if a lookup fails, goes out to the bytecode to load the code. A table in the bytecode could specify offsets into the bytecode, execute the code for the module attribute, and store the result into the proxy. > This idea maybe considered before and abandoned because of the cost > of IO operation, rr, the implementation of lazy strategy for classes > import is a quite complex. > > Does this idea make sense? Any mentors want to give me some ideas? > Thanks alot! > It makes sense, but I just wonder if it is worth the added complication. It might be a real boon, though. Be interesting to find out which way it goes! -Brett From narayannewton at gmail.com Mon Jun 6 06:58:03 2005 From: narayannewton at gmail.com (Narayan Newton) Date: Sun, 5 Jun 2005 21:58:03 -0700 Subject: [summerofcode] FileSystemVirtualization - Ideas In-Reply-To: <42A38711.9080904@ocf.berkeley.edu> References: <42A38711.9080904@ocf.berkeley.edu> Message-ID: On 6/5/05, Brett C. wrote: > > Narayan Newton wrote: > > > > > > Hi all.... > > > > > > I am looking to apply for implementing the "FileSystemVirtualization" > > project and would like some feedback on a couple ideas. > [SNIP] > > > > Anyway...any thoughts on this? The second idea would definitely be more > > "complete" and seems more attractive to me, but I wanted to see if > > anyone here had any opinions. > > > > Just because I have not seen it mentioned (although I just added it to the > wiki) is to look at Tcl's virtual file system. > > -Brett > Tcl's vfs seems quite interesting. I notice that you can use it to treat a compressed archive as a file system, that would be exceptionally cool. Anyway, thanks for the input guys (especially holger). I have a pretty clear picture of what I am going to propose now. -- Narayan Newton -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050605/4a666478/attachment.htm From andreasp+summerofcode at qbcon.com Mon Jun 6 14:30:05 2005 From: andreasp+summerofcode at qbcon.com (Andreas Pauley) Date: Mon, 6 Jun 2005 14:30:05 +0200 (SAST) Subject: [summerofcode] Point of Sale Project Message-ID: Hi, I would like to enter my Python-based Point of Sale into the Google Summer of Code. Is such a project suitable for the summer of code? Apart from the application form at http://code.google.com/soc_application.html there seems to be an application template as well. Should this also be completed, and where would I send it to? I am currently a part-time student at the University of South Africa, but I'm also employed at a company. I couldn't gather from Google's FAQ that part-time students weren't eligible, but please correct me if I'm wrong. Regards, Andreas Pauley http://qualitypos.qbcon.com/ From news4vovan at mail.ru Mon Jun 6 14:22:20 2005 From: news4vovan at mail.ru (Vladimir Sukhoy) Date: Mon, 06 Jun 2005 16:22:20 +0400 Subject: [summerofcode] SoC proposal: proactive I/O in python Message-ID: The proposed goal is to bring cross-platform proactive I/O capabilities to Python. Proactive I/O model is an alternative way to fix I/O bottlenecks without multithreading (real multithreading is even more complex in Python, because of Global Interpreter Lock (GIL) and should be implemented with different processes). Usual I/O is done in following way: 1. Find a moment when it is possible to do I/O operation (read(), write()) 2. Do it synchronously. Proactive I/O is another thing: 1. Asynchronous operations are started by the application on several I/O handles without a need to wait when they are completed. 2. As each operation completes, OS calls appropriate completion handler that processes the result of the operation (success or failure and the data being delivered). Proative I/O model is may be implemented with "overlapped" I/O on Windows (NT 4.0 or higher) and AIO family of functions of POSIX.4 Realtime Extension Standard, on platforms that implement it (including HP-UX, IRIX, Linux, LynxOS, and Solaris). ACE Library provides Proactor pattern implementation, which makes cross-platform proactive I/O possible (http://www.cs.wustl.edu/~schmidt/ACE.html). As far as I know, there is no well-known python library which provides proactive I/O (except pywin32, but it's too low-level, essentially a C-interfaces ported to python), so this project intends to build one that will become flexible and convenient :) Please, let me know if this project may be eligible for the summer of code contest. From tobivollebregt at gmail.com Mon Jun 6 15:29:53 2005 From: tobivollebregt at gmail.com (Tobi Vollebregt) Date: Mon, 6 Jun 2005 15:29:53 +0200 Subject: [summerofcode] Memory usage tool Message-ID: <49245929050606062957633855@mail.gmail.com> Hi all, I read on your summer of code ideas webpage that there's some need for a tool in python to keep track of the memory used by the interpreted programs. I wonder if I understand it correctly: The goal of the project would be to change the python interpreter (written in C?) to keep track of all objects created via the interpreted code as well as memory allocated by C modules used by this code. Is this correct? And what about the way this information is passed to the user? Would the goal be a tool which just prints out warnings on console or in a log file about circular references and memory leaks? Or would it be something were a diagram could be drawn at any moment during program flow of all allocated objects and the references between them? And does it matter if I don't know python yet? I'll try to learn it very soon if I apply of course. thanks in advance, Tobi Vollebregt From mark.dufour at gmail.com Mon Jun 6 15:32:40 2005 From: mark.dufour at gmail.com (Mark Dufour) Date: Mon, 6 Jun 2005 15:32:40 +0200 Subject: [summerofcode] proposal for developing a python-to-c++ compiler Message-ID: <8180ef690506060632a6c6401@mail.gmail.com> Hi all! I wasn't sure at first how to go about applying for the summer of code (what a great idea!), so I sent the following proposal via the application page. I would have preferred to only come out with my project at a point where I'd have it working well for 'largish' programs, but I guess I'm a sucker for money like the next guy. I would be interested to hear your opinions on the idea, and on whether you think it would be appropriate for the summer of code. I am fully aware that it is a more experimental (academic if you will) exercise than most, if not all, of the other Python proposals. I also know about the other approaches that are under development, with the aim of running Python code more efficiently (Parrot, Starkiller.) Finally, I also agree that the best long term solution is probably a good JIT-compiler, as it has the potential of supporting the full Python language. Here is the text I sent to Google. I would be happy to explain or discuss any part of it. === As part of my Master's Thesis, I am working on a Python-to-C++ compilation system. Apart from the basics, the following analyses more or less work well: - Static type inference, using the Cartesian Product Algorithm as well as single-level class duplication in order to get good precision. - Conversion to virtual calls in case of class hierarchies; polymorphic inline caching for really polymorphic types. - Converting heap allocation into stack- or static pre-allocation, by using a simple escape analysis and looking at the static call graph enabled by type inference. - Working out bounds on strings, so that the precision damage of reflection on type inference is better contained. - Support for many Python constructs, such as List Comprehensions, first-class class and function objects, dictionaries, Sets, varargs, etc. - Analyzing internal types of short tuples (useful for syntactically intermediate tuples, which are used often in Python.) - Unboxing of integer and floating-point types, as well as using 0-pointers for None, if there is no confusion. - Considering run-time type checks such as 'isinstance' during type inference. Being short on cash, extra money would enable me to spend the summer working full-time on implementing new features, and continue to work full-time on the project for at least some months after I graduate. As for the summer, it would enable me to at least implement the following modifications: - Extend the Cartesian Product Algorithm to become data-adaptive, in other words, to not separately analyze the same functions over and over again for essentially the same argument types. - Extend single-level class duplication to also consider duplicated allocation sites, to an arbitrary depth. This requires a data-adaptive approach as described, to keep it efficient. - Make it possible to detect parameterizable types, and based on this, automatically convert them to C++ generics of any complexity. - Integrate with an existing C++ garbage collector, to clean up objects that could not be stack- or statically preallocated. These modifications are all necessary for efficiently bootstrapping the compiler. I would also like to work on the many small details that are additionally required for this to be possible (e.g. hashing and deep copying of objects, handling library calls, lots of debugging.) However, because of the huge effort involved, bootstrapping will probably not be possible before the end of summer. Before I started hacking a few months ago, I wrote a survey called 'Efficient implementation of modern imperative languages; application to Python'. It describes most of the terms I have used here, and contains about 70 references. It is located at http://kascade.org/optimizing_python.pdf. Thanks! === Mark Dufour. -- if vars: self.output('; '.join([self.nodetype(var)+' '+name for (name,var) in vars.items()])+';') From cpp at vip.163.com Mon Jun 6 16:53:01 2005 From: cpp at vip.163.com (Liu Jin) Date: Mon, 06 Jun 2005 22:53:01 +0800 Subject: [summerofcode] logging in standard library Message-ID: Hi, I'm quite interested in PEP 337: Logging Usage in the Standard Library, and here is my question: The PEP prosopals 'print' and 'sys.stdout.write' to be replaced with '_log.{debug|info}', but 1 shouldn't it be {warning|error|critical}? 2 and in addition to logging errors, should we always log important data (such as http header in urllib2)? As I understand it, if it's logged as DEBUG or INFO, it won't hurt performance unless logging level is explicitly set to DEBUG/INFO. When using urllib2 I had to inspect its internal with debugger if something goes wrong. With logging things would be much easier. Regards, Liu Jin From email2roy at gmail.com Mon Jun 6 18:48:18 2005 From: email2roy at gmail.com (Roy Chan) Date: Mon, 6 Jun 2005 12:48:18 -0400 Subject: [summerofcode] Summer of Code Application - Java Swing IDEL for Jython Message-ID: <9717f0770506060948594e432@mail.gmail.com> To whom it may concern. My name is Roy Chan and I have applied to the Google Summer of Code. I am interested in the project about the IDLE for Jython. Below is my proposal about the tool. Swing Based IDLE for Jython =========================== IDLE is a nice environment for Python, Jython should have something like that too. There are already a number of exiting environments for Jython (e.g. wsadmin from IBM for Websphere administation.), but it is Tcl/Tk based. There is 2 ways to make a IDLE for Jython. Either use Java swing to communicate to existing IDLE(Tcl/Tk) or use Java swing to communicate to the interpreter. The later one definitely is a better solution, for it is less over head and it is in pure Java. To implement such a environment will make Jython a much easier language to develop and debug. Initial idea of the design is to allow user to do the same thing on the swing GUI as in the IDEL. Command will be fired whenever user hit enter. Event Linstener will send Jython line to the background and execute with the Jython class(es). Most the IDEL features should be reserved in the swing GUI, such as, syntax colour, save files. All these can be done easily in Swing. Debugger would be a challenge, since you have to have to windows communicate between each others and you need to gather all system information and display it on the debugger. A easier swing way is to have the debugger in the same windows and display is side by side with the command input area. Other bonus features can be: 1. Save clean jython code into file (i.e. only save all command that executed successfully) 2. Taking advantage of existing OpneSource IDE(e.g. Netbeans, Eclipse), write the plugin only instead of the whole GUI 3. Config file of the Swing IDEL is portable (e.g. in xml format), make it easier for user to program anytime anywhere. Installation Feature In order to help beginner, the installation should be user friendly. Ideal installer should detect java installation directoy, provide clear instructions. Command line one is a must, a swing one is nice to have (we are using swing anyway). Wizard type of installer like BEA Weblogic Configuration wizard is a nice and clear one. If time allows the installer should provide both command line and swing GUI. (e.g. execute install_jython_idel.sh [-console|-swing]) If a swing installer exist, it can be called from Java Web Start, which makes everything even simpler and easier for non-programmer/new developer Please also refer to the link http://wiki.python.org/moin/JythonProjects My Background ============= I have just graduated this term and I am still taking courses in University of Toronto to upgrade my degree to H.BSc. I have been worked at Sun Microsystems of Canada Inc. as a Web Developer(Intern) then Sr. Web Developer(Intern) in 2003 to 2004. It gives me not only the technical skill but also experience in working as a team and communicate with other team member clearly over the world. I have extensive experience in Java and Shell scripting. I started learning Python/Jython last year and I really like it for it is simple and easy to use. Please consider my application and feel free to contact me at ( email2roy at gmail.com) to discuss about my application. Thanks!! Yours Sincerely, Roy Chan (This project description has been submitted to the Google Summer of Code) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050606/cb3c8c28/attachment.html From Fernando.Perez at colorado.edu Mon Jun 6 20:56:48 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Mon, 06 Jun 2005 12:56:48 -0600 Subject: [summerofcode] Python notebook project updated Message-ID: <42A49C70.40807@colorado.edu> Hi all, in case anyone had looked at this before: http://wiki.python.org/moin/NotebookInterfaceForIpython or if applications have already been sent for it, please note that I've changed the description a fair bit, targetting it a bit differently. The PDF linked to at http://ipython.scipy.org/google_soc contains expanded details. Cheers, f From McGrews3 at pacbell.net Tue Jun 7 02:08:59 2005 From: McGrews3 at pacbell.net (Justin McGrew) Date: Mon, 06 Jun 2005 17:08:59 -0700 Subject: [summerofcode] Interest in one of the suggested projects Message-ID: <42A4E59B.4030708@pacbell.net> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050606/d99d43c2/attachment.html From Fernando.Perez at colorado.edu Tue Jun 7 02:14:33 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Mon, 06 Jun 2005 18:14:33 -0600 Subject: [summerofcode] Multiple applicants? Message-ID: <42A4E6E9.6030809@colorado.edu> Hi all, I've already had several students contact me expressing interest in the IPython-related project. So far I've told them to just apply, hoping that more competition will mean the best is selected (if any). Is this the right thing to do? Or should I be doing some kind of vetting myself? best, f From david.ascher at gmail.com Tue Jun 7 02:16:27 2005 From: david.ascher at gmail.com (David Ascher) Date: Mon, 6 Jun 2005 17:16:27 -0700 Subject: [summerofcode] Multiple applicants? In-Reply-To: <42A4E6E9.6030809@colorado.edu> References: <42A4E6E9.6030809@colorado.edu> Message-ID: > I've already had several students contact me expressing interest in the > IPython-related project. So far I've told them to just apply, hoping > that more competition will mean the best is selected (if any). Is this > the right thing to do? Yup > Or should I be doing some kind of vetting myself? I wouldn't. Note that it's possible that several people would be accepted for similar projects. Duplication isn't necessarily a disqualifier. --david From tali.wang at gmail.com Tue Jun 7 03:38:51 2005 From: tali.wang at gmail.com (Linan Wang) Date: Tue, 7 Jun 2005 02:38:51 +0100 Subject: [summerofcode] idea of speedup interpreter startup In-Reply-To: <42A3C751.6000402@ocf.berkeley.edu> References: <42A3C751.6000402@ocf.berkeley.edu> Message-ID: Thanks. I'm looking into the source code, try to figure out things like frame, code, node :) Just like what you said, a proxy with a pool seems to be a plan. >From python code to frame, each convert creat a gap. Is it possible to create a pool for all gaps? I think the lazy importation may cause one problem that not all the code will be compiled after a script executed. For a module, if not all the codes compiled, how to generate .pyc file? On 6/6/05, Brett C. wrote: > Linan Wang wrote: > > hi, everybody, > > > > Let's go to the topic directly :) > > I propose to use "lazy import" strategy to handle modula import. > > The term lazy here means import the compiled function's code only > > before first using it. Sometimes we only use few functions/classes in > > a module, but it seems we import all the compiled code when we do > > importing. > > Right. Even if you do ``from module import *`` the module still ends up in > sys.modules; you just specify what ends up in your namespace. > > > It's quite a waste of time and resource. > > Don't know if that is fair to say. Remember that the initial importation > executes the module. Also remember that 'class' and 'def' are statements; > Guido has stated multiple times they should be viewed as such. So executing > the entire module, including 'class' and 'def' is not a waste since the > semantics are straight-forward to explain. > > > By introducing a function/class table at some place of compiled code, > > we can import only the definition of the module. When before firing a > > function in a module, interpreter does the real import action. > > > > So like a proxy in the module type that, if a lookup fails, goes out to the > bytecode to load the code. A table in the bytecode could specify offsets into > the bytecode, execute the code for the module attribute, and store the result > into the proxy. > > > This idea maybe considered before and abandoned because of the cost > > of IO operation, rr, the implementation of lazy strategy for classes > > import is a quite complex. > > > > Does this idea make sense? Any mentors want to give me some ideas? > > Thanks alot! > > > > It makes sense, but I just wonder if it is worth the added complication. It > might be a real boon, though. Be interesting to find out which way it goes! > > -Brett > -- Wang ----------------------------------------------- Email:tali.wang at gmail.com Or: arp04lw at shef.ac.uk Mobile:+44-7760-338-932 ----------------------------------------------- From bac at OCF.Berkeley.EDU Tue Jun 7 04:56:10 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Mon, 06 Jun 2005 19:56:10 -0700 Subject: [summerofcode] idea of speedup interpreter startup In-Reply-To: References: <42A3C751.6000402@ocf.berkeley.edu> Message-ID: <42A50CCA.7070702@ocf.berkeley.edu> Linan Wang wrote: > Thanks. > I'm looking into the source code, try to figure out things like frame, > code, node :) > Just like what you said, a proxy with a pool seems to be a plan. >>From python code to frame, each convert creat a gap. Is it possible to > create a pool for all gaps? > Don't know what you mean by "gap". > I think the lazy importation may cause one problem that not all the > code will be compiled after a script executed. For a module, if not > all the codes compiled, how to generate .pyc file? > If you are asking how the interpreter does it, it is automatic after importation. If you are asking how you can do it specificaly, use py_compile (especially with ``-m`` on the command-line). -Brett From bac at OCF.Berkeley.EDU Tue Jun 7 04:57:53 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Mon, 06 Jun 2005 19:57:53 -0700 Subject: [summerofcode] Point of Sale Project In-Reply-To: References: Message-ID: <42A50D31.1070302@ocf.berkeley.edu> Andreas Pauley wrote: > Hi, > > I would like to enter my Python-based Point of Sale into the Google Summer > of Code. > > Is such a project suitable for the summer of code? > The SoC is open to any open source project. > Apart from the application form at > http://code.google.com/soc_application.html there seems to be an > application template as well. > Should this also be completed, and where would I send it to? > > I am currently a part-time student at the University of South Africa, but > I'm also employed at a company. I couldn't gather from Google's FAQ that > part-time students weren't eligible, but please correct me if I'm wrong. > These are all technical application issues best answered by Google. If you can't figure out the best way to answer it then post to the summer-discuss newsgroup linked from Google's SoC page to get answers. -Brett From bac at OCF.Berkeley.EDU Tue Jun 7 04:59:44 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Mon, 06 Jun 2005 19:59:44 -0700 Subject: [summerofcode] SoC proposal: proactive I/O in python In-Reply-To: References: Message-ID: <42A50DA0.8010707@ocf.berkeley.edu> Vladimir Sukhoy wrote: > The proposed goal is to bring cross-platform proactive I/O capabilities to Python. > > Proactive I/O model is an alternative way to fix I/O bottlenecks without > multithreading (real multithreading is even more complex in Python, because of Global > Interpreter Lock (GIL) and should be implemented with different processes). > > Usual I/O is done in following way: > 1. Find a moment when it is possible to do I/O operation (read(), write()) > 2. Do it synchronously. > > Proactive I/O is another thing: > 1. Asynchronous operations are started by the application on several I/O handles > without a need to wait when they are completed. > 2. As each operation completes, OS calls appropriate completion handler that > processes the result of the operation (success or failure and the data being delivered). > > Proative I/O model is may be implemented with "overlapped" I/O on Windows (NT 4.0 or higher) > and AIO family of functions of POSIX.4 Realtime Extension Standard, on platforms that > implement it (including HP-UX, IRIX, Linux, LynxOS, and Solaris). > > ACE Library provides Proactor pattern implementation, which makes cross-platform proactive I/O > possible (http://www.cs.wustl.edu/~schmidt/ACE.html). > > As far as I know, there is no well-known python library which provides proactive I/O (except pywin32, > but it's too low-level, essentially a C-interfaces ported to python), so this > project intends to build one that will become flexible and convenient :) > > Please, let me know if this project may be eligible for the summer of code contest. > All open source projects are eligible. Specifically in regards to having the PSF as your mentoring organization, as long as it would be helpful to the Python community then it is fine to write a proposal. -Brett From bac at OCF.Berkeley.EDU Tue Jun 7 05:02:26 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Mon, 06 Jun 2005 20:02:26 -0700 Subject: [summerofcode] Memory usage tool In-Reply-To: <49245929050606062957633855@mail.gmail.com> References: <49245929050606062957633855@mail.gmail.com> Message-ID: <42A50E42.5020904@ocf.berkeley.edu> Tobi Vollebregt wrote: > Hi all, > > I read on your summer of code ideas webpage that there's some need for > a tool in python to keep track of the memory used by the interpreted > programs. > > I wonder if I understand it correctly: > > The goal of the project would be to change the python interpreter > (written in C?) to keep track of all objects created via the > interpreted code as well as memory allocated by C modules used by this > code. > > Is this correct? > > And what about the way this information is passed to the user? Would > the goal be a tool which just prints out warnings on console or in a > log file about circular references and memory leaks? Or would it be > something were a diagram could be drawn at any moment during program > flow of all allocated objects and the references between them? > > And does it matter if I don't know python yet? I'll try to learn it > very soon if I apply of course. > I can't answer the technical questions since I didn't propose the idea, but I can try to answer your last question. Technically, you do not need to know Python. But obviously knowing it ahead of time would be a great benefit so that you have proper exposure to the language to understand its intricacies and proper usage. -Brett From bac at OCF.Berkeley.EDU Tue Jun 7 05:11:24 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Mon, 06 Jun 2005 20:11:24 -0700 Subject: [summerofcode] What is appropriate for the SoC Message-ID: <42A5105C.5050401@ocf.berkeley.edu> To hopefully quell any more emails asking if a proposal is appropriate for the SoC (Summer of Code is the acronym is not obvious to you), I am going to try to answer that question here. This is my own opinion and not an official one from the PSF, so don't take it as written in stone. Technically any open source project qualifies to be sent in as a proposal. The SoC has no specific requirement that a project be a certain type, just that you be able to get a mentoring organization to take you on. >From the perspective of the PSF, any project that would benefit the Python community is reason to list the PSF as the requested mentoring organization. What this means is that your application needs to be written to work with Python (pure C libraries are fine as long as they are geared toward Python). But the proposed project does not need to be specifically for the language. Any application that is useful and written in Python or usable from Python is fine. -Brett From email2roy at gmail.com Mon Jun 6 18:38:46 2005 From: email2roy at gmail.com (Roy Chan) Date: Mon, 6 Jun 2005 12:38:46 -0400 Subject: [summerofcode] Summer of Code Application - Java Swing IDEL for Jython Message-ID: <9717f07705060609383d10298e@mail.gmail.com> To whom it may concern. My name is Roy Chan and I have applied to the Google Summer of Code. I am interested in the project about the IDLE for Jython. Below is my proposal about the tool. Swing Based IDLE for Jython =========================== IDLE is a nice environment for Python, Jython should have something like that too. There are already a number of exiting environments for Jython (e.g. wsadmin from IBM for Websphere administation.), but it is Tcl/Tk based. There is 2 ways to make a IDLE for Jython. Either use Java swing to communicate to existing IDLE(Tcl/Tk) or use Java swing to communicate to the interpreter. The later one definitely is a better solution, for it is less over head and it is in pure Java. To implement such a environment will make Jython a much easier language to develop and debug. Initial idea of the design is to allow user to do the same thing on the swing GUI as in the IDEL. Command will be fired whenever user hit enter. Event Linstener will send Jython line to the background and execute with the Jython class(es). Most the IDEL features should be reserved in the swing GUI, such as, syntax colour, save files. All these can be done easily in Swing. Debugger would be a challenge, since you have to have to windows communicate between each others and you need to gather all system information and display it on the debugger. A easier swing way is to have the debugger in the same windows and display is side by side with the command input area. Other bonus features can be: 1. Save clean jython code into file (i.e. only save all command that executed successfully) 2. Taking advantage of existing OpneSource IDE(e.g. Netbeans, Eclipse), write the plugin only instead of the whole GUI 3. Config file of the Swing IDEL is portable (e.g. in xml format), make it easier for user to program anytime anywhere. Installation Feature In order to help beginner, the installation should be user friendly. Ideal installer should detect java installation directoy, provide clear instructions. Command line one is a must, a swing one is nice to have (we are using swing anyway). Wizard type of installer like BEA Weblogic Configuration wizard is a nice and clear one. If time allows the installer should provide both command line and swing GUI. (e.g. execute install_jython_idel.sh [-console|-swing]) If a swing installer exist, it can be called from Java Web Start, which makes everything even simpler and easier for non-programmer/new developer Please also refer to the link http://wiki.python.org/moin/JythonProjects My Background ============= I have just graduated this term and I am still taking courses in University of Toronto to upgrade my degree to H.BSc. I have been worked at Sun Microsystems of Canada Inc. as a Web Developer(Intern) then Sr. Web Developer(Intern) in 2003 to 2004. It gives me not only the technical skill but also experience in working as a team and communicate with other team member clearly over the world. I have extensive experience in Java and Shell scripting. I started learning Python/Jython last year and I really like it for it is simple and easy to use. Please consider my application and feel free to contact me at ( email2roy at gmail.com) to discuss about my application. Thanks!! Yours Sincerely, Roy Chan (This project description has been submitted to the Google Summer of Code) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050606/1829984c/attachment.htm From fuzzybr80 at gmail.com Tue Jun 7 06:13:39 2005 From: fuzzybr80 at gmail.com (ChunWei Ho) Date: Tue, 7 Jun 2005 12:13:39 +0800 Subject: [summerofcode] Application sent In-Reply-To: <42A153CF.3040600@colorstudy.com> References: <31f07fc30506032332713be89@mail.gmail.com> <42A153CF.3040600@colorstudy.com> Message-ID: <31f07fc3050606211373195399@mail.gmail.com> On 6/4/05, Ian Bicking wrote: > I think it's good -- one thing that open source has taught me is that > ideas aren't very valuable when compared to implementation (code or > otherwise). And transparency is good. That is certainly true, in retrospect. I've learnt something already :) > > > Project Title: Data Serving/Collection Framework in Python/WSGI > > > > Proposed Mentor/Sponsoring Organization: Python Software Foundation > > > > Project Description: > > A framework based on bulk data serving/collection via the internet. > > Bulk data are in the form of files that could easily be > > several-several hundred MB (not surveys or simple POST data). > > > > The client has a file repository that it wishes to sync to the server > > (a WSGI application). This server should be able to facilitate > > transfer via a number of protocols, including HTTP file transfer, HTTP > > form upload, FTP, Email. > > > > This project is aimed not at yet another ad-hoc file transfer or p2p > > file-sharing program but as a persistent production setup for > > transferring data from data collection sites/areas to a server, > > possibly via internet through different methods to get through strict > > organizational firewalls and web admins. > > > > Unlike a normal straightforward file transfer application, the > > framework should support: > > + Authentication and encryption > > + Verification scheme for data transfer, retries, etc - MD5 hash compare? > > + Chunking of large files and reassemble on receipt > > + Partial/Resume file transfers support - may depend on nature of data > > This can also be part of the file transfer app, using HTTP range support. > > Each piece that can be implemented in a generic way will be easier to > decouple, test, and implement. And HTTP has a lot of possible > functionality that's worth implementing directly. For instance, etags > are similar in function to hashes, and there's a standard header for > giving the hash of a body (I don't think it gets much use, though, > because TCP/IP is reliable enough). Even encryption can even be done in > terms of SSL with client certificates (though that might be difficult, > as SSL happens at a level that is sometimes hard to get access to, > depending on your server). Good idea :) Some portions of the support functions, like chunking of large files, may need additional support outside of the carrying protocol too, so the application layer will keep track of these apart from the actual transfer of individual chunks by the session (HTTP/SSL) > > Also, unlike commercial advanced file transfer programs, the framework does: > > + Supports multiple protocols for transfer HTTP/FTP/Email > > + Automatic identification of files to synchronize (comparison of > > server and client repositories and request automatically) > > + Conditional Processing (triggers - resync file if modified? logic - > > user specified) > > + Robust and considerate client - may be shared machine, means a > > service (I initially designed it for Windows clients - platform choice > > was not up to me) that must be configurable on when it runs, how long > > it runs > > + and if configured limit does not allow client to sync all data - > > what must be synced first (Latest file first, Earliest file first, > > Latest file only, etc). This form of consideration seems to be > > important for running on production sites or factory machines when the > > machine is in use in the day but idle for our use at night, or when > > machines have internet connectivity (possibly dialup) at only certain > > times of the day. > > How do you see it as different from rsync? If it's not that different, > that's not so bad -- derivative perhaps, but rsync is very popular and > useful, and you can do a lot worse than copy a useful piece of software. > If the pieces that are used to implement it are decoupled, then that > leaves yourself or other people room to recombine the pieces in novel > ways, while at the same time copying something useful means you'll have > a set of pieces that have proven utility. > > This will be especially true to the degree you utilize HTTP's potential. rsync is a great idea! I guess the idea of submitting only diffs for existing files escaped me since my original idea had primarily dealt with new files. Most of the support functions like timing, conditional may not be fully supported by rsync, but they could certainly be set up in combination with other *nix server tools. In that sense this project is derivative. The main impetus for this is to transfer data in a secure/safe manner over HTTP/FTP/Email - going over the usual site firewalls/proxies as allowed traffic, instead of direct connections through them. And many of the other support functions, on the server or client side - can be used elsewhere as well. > > Development will be based on WSGI/Paste model, although I will also > > investigate Zope/Cherry/Plone and other frameworks purely for > > comparison or design consideration purposes. WSGI is chosen for small > > learning curve, as well as the fact that data collection for an > > application can be separated from other functions. > > I think the benefit of WSGI here -- and I think it is considerable -- is > that it is low-level enough that you don't have to work around places > where the framework isn't intended for how you are using it. This is > especially true of large file support and more advanced HTTP > functionality (like ranges and etags and that sort of thing). Lots of > frameworks are notably bad at large files in particular. One additional query here... It seems that some of the advantages provided by WSGI/Paste comes from the richness of HTTP support. Maybe, i'm shooting myself in the foot here :) but which approach do you think it is better in this case for the file serving application (for example if I am thinking of using FTP): FTP translated to HTTP: The remote client sends in FTP, which is translated by the app into HTTP actions for WSGI. It takes the response and does the necessary to reply in FTP. The client is only aware that the remote server is an FTP server. It means that encryption and verification support has to be managed outside of the file transfer protocol. FTP encapsulated by HTTP: The remote client/server sends FTP data encapsulated in HTTP - which allows it to bring in support functions like hash headers, ranges, etags (I think SSL can work over direct FTP). But of course the client has to be capable of reading and stripping the HTTP layer. In this case will FTP seem to become redundant (HTTP data transfer encapsulating FTP data transfer)? I appreciate your insights. :) Chun Wei From ahmadhosseinzadeh at yahoo.ca Tue Jun 7 09:35:26 2005 From: ahmadhosseinzadeh at yahoo.ca (Ahmad Hosseinzadeh) Date: Tue, 7 Jun 2005 03:35:26 -0400 (EDT) Subject: [summerofcode] sys.stdout Message-ID: <20050607073527.73350.qmail@web52201.mail.yahoo.com> Hello, I?m a Python programmer. I?ve set the sys.stdout and sys.stderr to two objects. Now I need to redirect the error and output into command prompt. Would you please help me? Perhaps I have to re-assign the sys.stdout and stderr to command prompt. Regards, Ahmad Hosseinzadeh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From t-meyer at ihug.co.nz Tue Jun 7 09:44:48 2005 From: t-meyer at ihug.co.nz (Tony Meyer) Date: Tue, 7 Jun 2005 19:44:48 +1200 Subject: [summerofcode] sys.stdout In-Reply-To: Message-ID: > I'm a Python programmer. I've set the sys.stdout and > sys.stderr to two objects. Now I need to redirect the > error and output into command prompt. Would you please > help me? > Perhaps I have to re-assign the sys.stdout and stderr > to command prompt. Questions like this (I presume) would be better directed to comp.languages.python (or python-list at python.org, which is the mailing list that it's gateway'd to). If you do something like: old_out = sys.stdout sys.stdot = my_out You can then write to the regular stdout (e.g. console) with: old_out.write("text to write). Is that what you meant? =Tony.Meyer From summerofcode at adamgundry.co.uk Tue Jun 7 11:30:22 2005 From: summerofcode at adamgundry.co.uk (Adam Gundry) Date: Tue, 07 Jun 2005 10:30:22 +0100 Subject: [summerofcode] Resurrecting rexec? Message-ID: <42A5692E.3090604@adamgundry.co.uk> Hi everyone, I notice with interest that one of the project ideas on the Wiki involves developing some form of restricted execution system[1] (presumably updating rexec would be the best plan, but I'm not certain how deeply broken it is in the new-style object model, so it might involve a major rewrite). I'm quite interested in applying for this project, but it's certainly not an easy task. AFAIK nothing has been done since Guido decided to sabotage both rexec and Bastion because of security concerns. Do you think there would be much interest in this, both from prospective mentors and the Python community as a whole? Reading the discussions on python-dev[2] it looks as if an all-or-nothing solution is desired, but I don't think that's ever likely to happen. Is it worth working on a project that asymptotically approaches that security? Perhaps more significantly, do I have any chance at getting a mentor if I propose to do so? Cheers, Adam [1] http://wiki.python.org/moin/RestrictedExecution [2] See threads linked from http://www.amk.ca/python/howto/rexec/rexec.html From ianb at colorstudy.com Tue Jun 7 17:48:33 2005 From: ianb at colorstudy.com (Ian Bicking) Date: Tue, 07 Jun 2005 10:48:33 -0500 Subject: [summerofcode] Resurrecting rexec? In-Reply-To: <42A5692E.3090604@adamgundry.co.uk> References: <42A5692E.3090604@adamgundry.co.uk> Message-ID: <42A5C1D1.3000904@colorstudy.com> Adam Gundry wrote: > Hi everyone, > > I notice with interest that one of the project ideas on the Wiki > involves developing some form of restricted execution system[1] > (presumably updating rexec would be the best plan, but I'm not certain > how deeply broken it is in the new-style object model, so it might > involve a major rewrite). > > I'm quite interested in applying for this project, but it's certainly > not an easy task. AFAIK nothing has been done since Guido decided to > sabotage both rexec and Bastion because of security concerns. > > Do you think there would be much interest in this, both from prospective > mentors and the Python community as a whole? There's clearly a lot of people who are interested in this, so I think so. Not me so much, because I know nothing about the details, but I'd be awfully suprised if no one was interested in mentoring. And I think if everyone agrees it's important, but no one specifically had it in mind when the volunteered to mentor, that someone will step up. And as a mentor you wouldn't even really need to know the details of this specific problem, since there's many other aspects to mentoring. Maybe it's even better if, as a mentor, you aren't currently directly involved in the project you are mentoring -- otherwise it may be hard to step back. > Reading the discussions on > python-dev[2] it looks as if an all-or-nothing solution is desired, but > I don't think that's ever likely to happen. Is it worth working on a > project that asymptotically approaches that security? Perhaps more > significantly, do I have any chance at getting a mentor if I propose to > do so? Well, there does exist a reasonably (?) effective restricted execution environment inside of Zope. Extracting that, even if the result isn't really what people want, would be useful -- as it is, I don't think people outside of the Zope world (or maybe even inside it) really understand the good or bad of that system. But anyway, it clearly is a hard problem, and you shouldn't give a goal of "making rexec work", because there's a good chance you won't get there. Instead, I would make experimentation and documentation a big part of the goal. Start with summarizing the problems with rexec and Bastian -- you can get all that from mailing lists, but I don't know if it is fully summarized in any one place. Write tests -- this is all very conducive to testing, and the summary you wrote should give you lots of failing tests to work on. Try to fix one or two. Analyze what you changed, repeat, refactor, rewrite, etc. Document all your dead ends, not just your successes. The benefit to the community will be largely in the artifacts you leave behind (assuming you don't actually resolve the problem), so being transparent and explicit about what you are doing is important. -- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org From amk at amk.ca Tue Jun 7 18:27:20 2005 From: amk at amk.ca (A.M. Kuchling) Date: Tue, 7 Jun 2005 12:27:20 -0400 Subject: [summerofcode] Resurrecting rexec? In-Reply-To: <42A5C1D1.3000904@colorstudy.com> References: <42A5692E.3090604@adamgundry.co.uk> <42A5C1D1.3000904@colorstudy.com> Message-ID: <20050607162720.GA4375@rogue.amk.ca> On Tue, Jun 07, 2005 at 10:48:33AM -0500, Ian Bicking wrote: > Document all your dead ends, not just your successes. Keeping a weblog would be very helpful to this end. It's been suggested that the recipients of PSF grants should be encouraged to write a weblog of their progress; it's too late for the three PSF grants, but we could certainly Another note on rexec: people are always trying to build a secure environment inside a full unrestricted Python executable. I can't recall anyone adding a SAFE_PYTHON compile-time switch that left out a set of dangerous capabilities; perhaps a small set of such switches could be added that controlled different dangerous tasks. It depends on use cases: do people want to embed a safe Python inside an application, or do they mostly want to run from inside some application written in full Python? --amk From fcano at ono.com Tue Jun 7 23:42:31 2005 From: fcano at ono.com (Florencio Cano Gabarda) Date: Tue, 07 Jun 2005 23:42:31 +0200 Subject: [summerofcode] Not finnishing the project in the final date Message-ID: <20050607233858.5B53.FCANO@ono.com> Hello, I have a question about SoC. If the project is very long and a person can't finnish it before the final date will gain the award? I'm supposing the person has been working hard all the summer and it is no possible to finnish it before final date. Thanks. -- Florencio Cano Gabarda From fcano at ono.com Wed Jun 8 00:35:29 2005 From: fcano at ono.com (Florencio Cano Gabarda) Date: Wed, 08 Jun 2005 00:35:29 +0200 Subject: [summerofcode] Not finnishing the project in the final date Message-ID: <20050608003458.10D2.FCANO@ono.com> > I don't know the rules, but I would strongly advise that the > scope of the proposal be trimmed back to what can be done, > with suggestions of "follow-on" work that could be done once > the statement of work was accomplished... Then GET 'ER DONE > (the SOW - statement of work). So, my application is about implementing complete SSL support for Python with a module...I'm still studying the project plannification but for example...if I decide that it is not possible to me to almost finnish it (clear coded, efficiency, easy interface, etc, etc...) before the final time, Should I reduce the objectives of the application to code only a partial implementation? -- Florencio Cano Gabarda From emcohen3 at berkeley.edu Wed Jun 8 00:45:47 2005 From: emcohen3 at berkeley.edu (Elliot Miles Asher Cohen) Date: Tue, 07 Jun 2005 15:45:47 -0700 Subject: [summerofcode] Bayesian Framework in Python Message-ID: Hello, I am interested in designing a Python framework that would allow for easy development of Bayesian Networks, both static and dynamic. While such packages exist in a variety of languages already, there are none that are implemented in Python. I believe that Python is uniquely designed to handle such a task extremely well. Is there anyone on this list that feels they could be mentor for such a project and would be willing to discuss this idea further? Thanks Elliot Cohen UC Berkeley Student From tali.wang at gmail.com Wed Jun 8 00:46:04 2005 From: tali.wang at gmail.com (Linan Wang) Date: Tue, 7 Jun 2005 23:46:04 +0100 Subject: [summerofcode] Not finnishing the project in the final date In-Reply-To: <20050608003458.10D2.FCANO@ono.com> References: <20050608003458.10D2.FCANO@ono.com> Message-ID: I think: 1, Give a "big picture" of your project as well as objective of SoC. 2, Clear description of both objective and methodology for mentors to judge wether accept your proposal. 3, A schedule will be helpful. 4, If it's just a part of big project, leave enough space or give detail document for following developpers. above 4 points are only my ideas. Who knows what google thinks! :) On 6/7/05, Florencio Cano Gabarda wrote: > > I don't know the rules, but I would strongly advise that the > > scope of the proposal be trimmed back to what can be done, > > with suggestions of "follow-on" work that could be done once > > the statement of work was accomplished... Then GET 'ER DONE > > (the SOW - statement of work). > > So, my application is about implementing complete SSL support for Python > with a module...I'm still studying the project plannification but for > example...if I decide that it is not possible to me to almost finnish it > (clear coded, efficiency, easy interface, etc, etc...) before the final > time, Should I reduce the objectives of the application to code only a > partial implementation? > -- > Florencio Cano Gabarda > > > _______________________________________________ > summerofcode mailing list > summerofcode at python.org > http://mail.python.org/mailman/listinfo/summerofcode > -- Wang ----------------------------------------------- Email:tali.wang at gmail.com Or: arp04lw at shef.ac.uk Mobile:+44-7760-338-932 ----------------------------------------------- From jtauber at jtauber.com Wed Jun 8 03:37:09 2005 From: jtauber at jtauber.com (James Tauber) Date: Wed, 08 Jun 2005 09:37:09 +0800 Subject: [summerofcode] Bayesian Framework in Python In-Reply-To: References: Message-ID: <1118194629.16531.235878961@webmail.messagingengine.com> I recently started down the path of implementing a package for bayesian networks myself (including Pearl's belief propagation algorithm). I would certainly love to see a package like this and would be willing to be a mentor. James On Tue, 07 Jun 2005 15:45:47 -0700, "Elliot Miles Asher Cohen" said: > Hello, > > I am interested in designing a Python framework that would allow for easy > development of Bayesian > Networks, both static and dynamic. While such packages exist in a variety > of languages already, > there are none that are implemented in Python. I believe that Python is > uniquely designed to > handle such a task extremely well. Is there anyone on this list that > feels they could be mentor > for such a project and would be willing to discuss this idea further? -- James Tauber http://jtauber.com/ journeyman of some http://jtauber.com/blog/ From tah9m9 at mizzou.edu Wed Jun 8 04:56:29 2005 From: tah9m9 at mizzou.edu (Heseman, Travis A (UMC-Student)) Date: Tue, 7 Jun 2005 21:56:29 -0500 Subject: [summerofcode] SoC Python-SSL Message-ID: Is the Python Foundation favoring one module over any other in terms of which should be rewritten into this generally robust SSL support module? From jhylton at gmail.com Wed Jun 8 05:54:14 2005 From: jhylton at gmail.com (Jeremy Hylton) Date: Tue, 7 Jun 2005 23:54:14 -0400 Subject: [summerofcode] Not finnishing the project in the final date In-Reply-To: <20050608003458.10D2.FCANO@ono.com> References: <20050608003458.10D2.FCANO@ono.com> Message-ID: On 6/7/05, Florencio Cano Gabarda wrote: > > I don't know the rules, but I would strongly advise that the > > scope of the proposal be trimmed back to what can be done, > > with suggestions of "follow-on" work that could be done once > > the statement of work was accomplished... Then GET 'ER DONE > > (the SOW - statement of work). > > So, my application is about implementing complete SSL support for Python > with a module...I'm still studying the project plannification but for > example...if I decide that it is not possible to me to almost finnish it > (clear coded, efficiency, easy interface, etc, etc...) before the final > time, Should I reduce the objectives of the application to code only a > partial implementation? I think you should propose realistic goals for the project. If you have some larger objective -- like robust SSL support in standard Python -- and don't think it's achievable in the summer project, then propose something realistic that advances your objective. It's good to be slightly ambitious with the proposal, but it's also good to convince the sponsors that you will actually be able to accomplish what you propose. Jeremy From david.ascher at gmail.com Wed Jun 8 08:52:03 2005 From: david.ascher at gmail.com (David Ascher) Date: Tue, 7 Jun 2005 23:52:03 -0700 Subject: [summerofcode] SoC Python-SSL In-Reply-To: References: Message-ID: On 6/7/05, Heseman, Travis A (UMC-Student) wrote: > Is the Python Foundation favoring one module over any other in terms of which should be rewritten into this generally robust SSL support module? No. Use your best judgment, learn what you can, ask technical questions. Don't try to "psych out" the judges, since the judges don't know what they want. --david From warange_rajesh at myway.com Wed Jun 8 12:50:16 2005 From: warange_rajesh at myway.com (Warange Rajesh) Date: Wed, 8 Jun 2005 06:50:16 -0400 (EDT) Subject: [summerofcode] PySSL Message-ID: <20050608105016.87F643A02@mprdmxin.myway.com> Hi All, I 've been using OpenSource projects and products for the last 2 years now, especially the Gofer project by Mark Jones and modified by RPM. But this contest has definately changed the way "students" should look at the OpenSource Movement. Well the integration of money + opensource is a nice one. A student is normally a non-working class and an incentive really boosts up the morale. And what else can one expect that to have atleast 200 energetic young open source developers at the end of the contest. I would love to be a full-time developer with the Python community. I would like to contribute to the SSL support for Python. Any pointers in that direction are most welcome. Thanks -- warange_rajesh _______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.com From stante at gmail.com Wed Jun 8 12:56:59 2005 From: stante at gmail.com (Alexander Stante) Date: Wed, 8 Jun 2005 12:56:59 +0200 Subject: [summerofcode] Project Idea: elf binary library Message-ID: <11392470050608035626bf1d03@mail.gmail.com> Hello, as an project idea i would have an elf (executable and linking format) binary library which allows the user to inspect and manipulate elf binaries. Although there is already a in C written library out there: http://www.mr511.de/software/english.html I think it would be a benifit that such a library were written in python. I came to this idea after spending a lot of time reverse engineering some, in that case even non elf, binaries. I was using IDA Pro and it was lacking some features that would really speed up my work so I start making some thought about something like an open source equivalent. An IDA Pro equivalent is not possible to finish in just some month for the SoC and would be obvoiusly rejected by PSF because it would be just an application written in python. But an elflib, which could be expanded in future to some kind of generic executable binary library that supports other formats like for example mach-o and so on, could be something like PIL for executables in the future. I wonder if the PSF can be a mentoring organization and if someone would would agree to be a mentor for such a project. Maybe there are other ideas for an project which would get roughly in that direction? Alex From jonbones at gmail.com Wed Jun 8 16:05:45 2005 From: jonbones at gmail.com (Jonathan Hudson) Date: Wed, 8 Jun 2005 10:05:45 -0400 Subject: [summerofcode] rexec project Message-ID: I've been playing around with an idea to make a secure rexec, and I think I would like to do that for the summer of code project. Essentially, all objects are wrapped by a container restriction object. When a module gets imported, any objects that are allowed to be accessed would have to be specified outside of the restricted execution code. The restricted object would go something like this: # restricted object class RObject: def __call__(self .... # check if function call is ok and call it if ok def __getattr__(self .... # check if ok to read attribute and return it if ok .... RObject would not store have any data members itself. Instead it would access a global dictionary that isn't accessable to the restriction execution code. I'm working on some demo code to see if the idea might work. Does this sound viable or I am missing something important? I've debated myself on how to write up the proposal. I just looked at Zope today and decided if my idea doesn't work, I could try using their method. -- Jonathan From saket at cc.iitb.ac.in Wed Jun 8 16:57:04 2005 From: saket at cc.iitb.ac.in (Saket Sathe) Date: Wed, 08 Jun 2005 20:27:04 +0530 Subject: [summerofcode] Bayesian Framework in Python In-Reply-To: <1118194629.16531.235878961@webmail.messagingengine.com> References: <1118194629.16531.235878961@webmail.messagingengine.com> Message-ID: <42A70740.1050206@cc.iitb.ac.in> I would as well like to work on this project. Bayesian belief networks in python is really an interesting idea. James Tauber wrote: >I recently started down the path of implementing a package for bayesian >networks myself (including Pearl's belief propagation algorithm). > >I would certainly love to see a package like this and would be willing >to be a mentor. > >James > >On Tue, 07 Jun 2005 15:45:47 -0700, "Elliot Miles Asher Cohen" > said: > > >>Hello, >> >>I am interested in designing a Python framework that would allow for easy >>development of Bayesian >>Networks, both static and dynamic. While such packages exist in a variety >>of languages already, >>there are none that are implemented in Python. I believe that Python is >>uniquely designed to >>handle such a task extremely well. Is there anyone on this list that >>feels they could be mentor >>for such a project and would be willing to discuss this idea further? >> >> -- Saket ... If you had everything, where would you keep it? From physics at list.ru Wed Jun 8 17:08:19 2005 From: physics at list.ru (Vova) Date: Wed, 8 Jun 2005 19:08:19 +0400 Subject: [summerofcode] High-level python optimizer. Message-ID: <200506081908.20046.physics@list.ru> Hello ! This is my project proposal: High-level python optimizer. 1. Pre-history. Python optimization is difficult task because python's dynamic nature. Applying many of optimization techniques used in other (static typed) languages to python is almost impossible. There was an attempt to create python optimizer that works on the byte-code (http://www.foretec.com/python/workshops/1998-11/proceedings/papers/montanaro/montanaro.html), but it speeds-up execution only by a few percent. Different approach is taken in the psyco project. It implements JIT compilation using run-time specialization. The results is very impressive. But psyco does only simple local run-time optimizations, it can't look at the whole program. 2. Project proposal. My proposal is to create high-level optimizer, that will work on the source tree of the whole program. It will transform the source tree to data-flow graph that represents the flow of the data from program input (in general sence) to output. The goal is elimination of all unnecessarily dynamics i.e. making assumptions about actual types (and may be values) of variables and their life-times. Of course this can't be done for any variable in the program, but (usually) for most of them (just try to open any python program and traverse it from the very beginning visiting any called function). Once we have got this information we can apply a lot of traditional well-known optimization techniques as well as python-specific ones. Then we can compile and run optimized tree, or transform it back to python program. We can still use psyco for JIT, and maybe we can even provide psyco with gathered information about variable types. 3. Implementation notes. This approach for optimization will be the most efficient if applied to complete python program (not the stand-alone library) and if the sources of all used modules will be available to optimizer. The former is needed to extract the maximum information from input data, stand-alone modules can be optimized too if it's acceptable input types are somehow specified. The source of used modules is needed to extract information from used functions such as possible return types, exceptions and side-effects and to make partial evaluated version of module's functions. To work better with C modules one can specify needed information about module's function to the optimizer. So the actual implementation of such optimizer is divided into three parts: (a) creating general framework that will handle building data-flow graph, gathering information and then applying (pluggable) optimizer (b) Writing optimizers (c) describing information about standard modules written in C. Part (a) is the most important and interesting part of the project, parts (b) and (c) can be always simply extended later (of course simplicity depends on good design of (a)). If someone from PSF agreed to be my mentor, please contact me. -- Best regards, Vladimir From shlomme at gmx.net Wed Jun 8 17:28:26 2005 From: shlomme at gmx.net (Torsten Marek) Date: Wed, 08 Jun 2005 17:28:26 +0200 Subject: [summerofcode] Python on Parrot Message-ID: <42A70E9A.8060207@gmx.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello mentors, does it make sense to write a Python "compiler" targeted at Parrot right now? I had a look at the code (in Parrot 0.2.0), but the comments said that pie-thon has failed and bytecode transformation is not a good idea. So what would it be? A Python-implemented compiler that walks the AST and puts out Parrot asm? And what should the project be? With only very little googling, I found three different (mini-) projects dealing with Python on Parrot, where pirate seems to be the way to go. Should this project be revived and put into a better shape? And create full support for 2.2? 2.3? 2.4? Does Python for Parrot still make sense or should we all wait for PyPy, since there hasn't been anything in the news since OSCON last year. And even if I chose to do such work, would there be anybody to mentor me? Maybe it'll be more helpful to port some included batteries to Python (like bz2, that'll be fun...) greetings Torsten - -- Torsten Marek ID: A244C858 -- FP: 1902 0002 5DFC 856B F146 894C 7CC5 451E A244 C858 Keyserver: subkeys.pgp.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCpw6afMVFHqJEyFgRAsmeAKCXftKdT2bQXvroTifKHBT5rkbIkgCeJYkR 6toqATC5NsH5M67VS73V8jI= =wloC -----END PGP SIGNATURE----- From ianb at colorstudy.com Wed Jun 8 17:49:44 2005 From: ianb at colorstudy.com (Ian Bicking) Date: Wed, 08 Jun 2005 10:49:44 -0500 Subject: [summerofcode] Python on Parrot In-Reply-To: <42A70E9A.8060207@gmx.net> References: <42A70E9A.8060207@gmx.net> Message-ID: <42A71398.8010001@colorstudy.com> Torsten Marek wrote: > does it make sense to write a Python "compiler" targeted at Parrot right now? I > had a look at the code (in Parrot 0.2.0), but the comments said that pie-thon > has failed and bytecode transformation is not a good idea. So what would it be? > A Python-implemented compiler that walks the AST and puts out Parrot asm? > > And what should the project be? With only very little googling, I found three > different (mini-) projects dealing with Python on Parrot, where pirate seems to > be the way to go. Should this project be revived and put into a better shape? > And create full support for 2.2? 2.3? 2.4? > > Does Python for Parrot still make sense or should we all wait for PyPy, since > there hasn't been anything in the news since OSCON last year. > And even if I chose to do such work, would there be anybody to mentor me? There was some bad news for Parrot recently: http://www.sidhe.org/~dan/blog/archives/000400.html Well, I guess bad news, or maybe just a bad sign. But then, this is open source, a project is only as viable as its contributors, and if you think you can make a good contribution then it's a good project; I don't know if that's circular or just a self-reinforcing system. Still, it's a shame Parrot has been so... challenging. Whether it is that way for technical reasons, politics, or some weird mixture, I don't know. The PyPy people seem much better socialized, though. My impression is that work done recently on the AST branch might make it easier to implement a Python compiler targetting Parrot, so despite these problems the project becomes more viable over time. I think it's okay to submit multiple proposals. I think it would be quite reasonable to say in your proposal that you believe you need some Parrot-specific mentoring, and if that's not available then please remove the proposal from consideration, as you feel you'd be more successful on another project, like porting modules to Python. -- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org From david.ascher at gmail.com Wed Jun 8 18:23:20 2005 From: david.ascher at gmail.com (David Ascher) Date: Wed, 8 Jun 2005 09:23:20 -0700 Subject: [summerofcode] Python on Parrot In-Reply-To: <42A71398.8010001@colorstudy.com> References: <42A70E9A.8060207@gmx.net> <42A71398.8010001@colorstudy.com> Message-ID: On 6/8/05, Ian Bicking wrote: > There was some bad news for Parrot recently: > http://www.sidhe.org/~dan/blog/archives/000400.html > > Well, I guess bad news, or maybe just a bad sign. But then, this is That's just one person stopping work on the project. My (distant) understanding is that others are currently working on Parrot, and that Parrot is actually being used heavily by the PUGS project. See http://www.parrotcode.org/ and http://www.pugscode.org/ --david From amk at amk.ca Wed Jun 8 18:22:09 2005 From: amk at amk.ca (A.M. Kuchling) Date: Wed, 8 Jun 2005 12:22:09 -0400 Subject: [summerofcode] Python on Parrot In-Reply-To: <42A70E9A.8060207@gmx.net> References: <42A70E9A.8060207@gmx.net> Message-ID: <20050608162209.GB11444@rogue.amk.ca> On Wed, Jun 08, 2005 at 05:28:26PM +0200, Torsten Marek wrote: > Does Python for Parrot still make sense or should we all wait for PyPy, since > there hasn't been anything in the news since OSCON last year. No one's running the community from the top down; really, it's up to you. If *you* want to work on Parrot, work on Parrot. If you don't think the task would be useful/fun/educational, don't work on it. One dedicated developer can accomplish a lot. I do think Parrot's prospects are dwindling; someone began implementing Perl6 in Haskell and began making very swift progress, which I take as a demonstration that the VM was getting in the way, not helping. But what do I know? > And even if I chose to do such work, would there be anybody to mentor me? You'd need help from both the Python and Parrot sides, but perhaps only one formal mentor would be needed, from one side or the other; the rest of the help could come informally. --amk From ianb at colorstudy.com Wed Jun 8 18:32:13 2005 From: ianb at colorstudy.com (Ian Bicking) Date: Wed, 08 Jun 2005 11:32:13 -0500 Subject: [summerofcode] Python on Parrot In-Reply-To: References: <42A70E9A.8060207@gmx.net> <42A71398.8010001@colorstudy.com> Message-ID: <42A71D8D.7080308@colorstudy.com> David Ascher wrote: > On 6/8/05, Ian Bicking wrote: >>There was some bad news for Parrot recently: >> http://www.sidhe.org/~dan/blog/archives/000400.html >> >>Well, I guess bad news, or maybe just a bad sign. But then, this is > > > That's just one person stopping work on the project. My (distant) > understanding is that others are currently working on Parrot, and that > Parrot is actually being used heavily by the PUGS project. See > http://www.parrotcode.org/ and http://www.pugscode.org/ Yeah, looking into it a bit more, it seems more like it's just a change of leadership (or a recognition that the leadership has changed), and without knowing the details (and there aren't many details out there) it's hard to say if it's good or bad. Good insofar as there don't seem to be any political wrangling coming out of it. And probably good in that the people who are doing the work right now are also being given the leadership, despite technical disagreements; that's one of the hardest transitions for a project to make. So I think I'd probably retract my negative opinions. And it sure would be nice to have a good open source, cross-language VM that prioritized dynamically typed languages. -- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org From ianb at colorstudy.com Wed Jun 8 18:41:09 2005 From: ianb at colorstudy.com (Ian Bicking) Date: Wed, 08 Jun 2005 11:41:09 -0500 Subject: [summerofcode] Python on Parrot In-Reply-To: References: <42A70E9A.8060207@gmx.net> <42A71398.8010001@colorstudy.com> Message-ID: <42A71FA5.1060500@colorstudy.com> David Ascher wrote: > That's just one person stopping work on the project. My (distant) > understanding is that others are currently working on Parrot, and that > Parrot is actually being used heavily by the PUGS project. See > http://www.parrotcode.org/ and http://www.pugscode.org/ Incidentally, it seems that Pugs isn't currently using Parrot -- it's actually interpreted, and compiler support is just planned, with Parrot as one possible backend. At least that's what I understand from this: http://svn.perl.org/perl6/pugs/trunk/docs/01Overview.html ("Is Pugs a compiler or an interpreter?"). -- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org From mark.dufour at gmail.com Wed Jun 8 19:40:56 2005 From: mark.dufour at gmail.com (Mark Dufour) Date: Wed, 8 Jun 2005 19:40:56 +0200 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <200506081908.20046.physics@list.ru> References: <200506081908.20046.physics@list.ru> Message-ID: <8180ef6905060810404e047e78@mail.gmail.com> Hey there, Just so you know, there are already two projects that seem to do the exact thing you describe: I myself have been working full-time for the last 5 months implementing a Python-to-C++ compiler, and Michael Salib has been working a lot longer I think on Starkiller, which does roughly the same thing. I don't know where his project stands at the moment, though. If you'd like to read about my proposal, here it is. I think you can google for information about Starkiller. Of course diversity is great, and you might do a better job than we -^ Greetings, Mark Dufour. === As part of my Master's Thesis, I am working on a Python-to-C++ compilation system. Apart from the basics, the following analyses more or less work well: - Static type inference, using the Cartesian Product Algorithm as well as single-level class duplication in order to get good precision. - Conversion to virtual calls in case of class hierarchies; polymorphic inline caching for really polymorphic types. - Converting heap allocation into stack- or static pre-allocation, by using a simple escape analysis and looking at the static call graph enabled by type inference. - Working out bounds on strings, so that the precision damage of reflection on type inference is better contained. - Support for many Python constructs, such as List Comprehensions, first-class class and function objects, dictionaries, Sets, varargs, etc. - Analyzing internal types of short tuples (useful for syntactically intermediate tuples, which are used often in Python.) - Unboxing of integer and floating-point types, as well as using 0-pointers for None, if there is no confusion. - Considering run-time type checks such as 'isinstance' during type inference. Being short on cash, extra money would enable me to spend the summer working full-time on implementing new features, and continue to work full-time on the project for at least some months after I graduate. As for the summer, it would enable me to at least implement the following modifications: - Extend the Cartesian Product Algorithm to become data-adaptive, in other words, to not separately analyze the same functions over and over again for essentially the same argument types. - Extend single-level class duplication to also consider duplicated allocation sites, to an arbitrary depth. This requires a data-adaptive approach as described, to keep it efficient. - Make it possible to detect parameterizable types, and based on this, automatically convert them to C++ generics of any complexity. - Integrate with an existing C++ garbage collector, to clean up objects that could not be stack- or statically preallocated. These modifications are all necessary for efficiently bootstrapping the compiler. I would also like to work on the many small details that are additionally required for this to be possible (e.g. hashing and deep copying of objects, handling library calls, lots of debugging.) However, because of the huge effort involved, bootstrapping will probably not be possible before the end of summer. Before I started hacking a few months ago, I wrote a survey called 'Efficient implementation of modern imperative languages; application to Python'. It describes most of the terms I have used here, and contains about 70 references. It is located at http://kascade.org/optimizing_python.pdf. Thanks! On 6/8/05, Vova wrote: > Hello ! > This is my project proposal: High-level python optimizer. > > 1. Pre-history. > Python optimization is difficult task because python's dynamic nature. > Applying many of optimization techniques used in other (static typed) > languages to python is almost impossible. There was an attempt to create > python optimizer that works on the byte-code > (http://www.foretec.com/python/workshops/1998-11/proceedings/papers/montanaro/montanaro.html), > > but it speeds-up execution only by a few percent. > Different approach is taken in the psyco project. It implements JIT > compilation using run-time specialization. The results is very impressive. > But psyco does only simple local run-time optimizations, it can't look at > the > whole program. > > 2. Project proposal. > My proposal is to create high-level optimizer, that will work on the source > > tree of the whole program. It will transform the source tree to data-flow > graph that represents the flow of the data from program input (in general > sence) to output. The goal is elimination of all unnecessarily dynamics i.e. > > making assumptions about actual types (and may be values) of variables and > their life-times. Of course this can't be done for any variable in the > program, but (usually) for most of them (just try to open any python program > > and traverse it from the very beginning visiting any called function). Once > > we have got this information we can apply a lot of traditional well-known > optimization techniques as well as python-specific ones. Then we can compile > > and run optimized tree, or transform it back to python program. We can still > > use psyco for JIT, and maybe we can even provide psyco with gathered > information about variable types. > > 3. Implementation notes. > This approach for optimization will be the most efficient if applied to > complete python program (not the stand-alone library) and if the sources of > > all used modules will be available to optimizer. The former is needed to > extract the maximum information from input data, stand-alone modules can be > > optimized too if it's acceptable input types are somehow specified. The > source of used modules is needed to extract information from used functions > > such as possible return types, exceptions and side-effects and to make > partial evaluated version of module's functions. To work better with C > modules one can specify needed information about module's function to the > optimizer. > > So the actual implementation of such optimizer is divided into three parts: > (a) creating general framework that will handle building data-flow graph, > gathering information and then applying (pluggable) optimizer > (b) Writing optimizers > (c) describing information about standard modules written in C. > Part (a) is the most important and interesting part of the project, parts > (b) > and (c) can be always simply extended later (of course simplicity depends on > > good design of (a)). > > If someone from PSF agreed to be my mentor, please contact me. > > -- > Best regards, > Vladimir > _______________________________________________ > summerofcode mailing list > summerofcode at python.org > http://mail.python.org/mailman/listinfo/summerofcode > -- if vars: self.output('; '.join([self.nodetype(var)+' '+name for (name,var) in vars.items()])+';') From saket at cc.iitb.ac.in Wed Jun 8 20:32:41 2005 From: saket at cc.iitb.ac.in (Saket Sathe) Date: Thu, 09 Jun 2005 00:02:41 +0530 Subject: [summerofcode] Python framework for TC Message-ID: <42A739C9.7030304@cc.iitb.ac.in> Hello, I am interested in designing a Python framework for Linux Network Traffic Control (tc). To the best of my knowledge such a framework does not exist. I believe that the Python community will be benefited by such an endeavor. Can I find a mentor, on this list or otherwise, who is willing to take this idea further ? -- Saket Sathe Student, IIT Bombay. From bac at OCF.Berkeley.EDU Wed Jun 8 21:43:44 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Wed, 08 Jun 2005 12:43:44 -0700 Subject: [summerofcode] Project Idea: elf binary library In-Reply-To: <11392470050608035626bf1d03@mail.gmail.com> References: <11392470050608035626bf1d03@mail.gmail.com> Message-ID: <42A74A70.1010907@ocf.berkeley.edu> Alexander Stante wrote: > Hello, > > as an project idea i would have an elf (executable and linking format) > binary library which allows the user to inspect and manipulate elf > binaries. Although there is already a in C written library out there: > http://www.mr511.de/software/english.html I think it would be a > benifit that such a library were written in python. > > I came to this idea after spending a lot of time reverse engineering > some, in that case even non elf, binaries. I was using IDA Pro and it > was lacking some features that would really speed up my work so I > start making some thought about something like an open source > equivalent. > > An IDA Pro equivalent is not possible to finish in just some month for > the SoC and would be obvoiusly rejected by PSF because it would be > just an application written in python. > Don't assume that. If the app would be useful to Python users then the PSF might accept the project. > But an elflib, which could be expanded in future to some kind of > generic executable binary library that supports other formats like for > example mach-o and so on, could be something like PIL for executables > in the future. > > I wonder if the PSF can be a mentoring organization and if someone > would would agree to be a mentor for such a project. > You can list the PSF as the mentoring project since it this app would benefit the Python community. You might also want to consider approaching Ubuntu and GNOME since they are Linux-centric and thus might be much more interested in this and thus up your chances of it being accepted. -Brett From bac at OCF.Berkeley.EDU Wed Jun 8 21:46:45 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Wed, 08 Jun 2005 12:46:45 -0700 Subject: [summerofcode] rexec project In-Reply-To: References: Message-ID: <42A74B25.2080202@ocf.berkeley.edu> Jonathan Hudson wrote: > I've been playing around with an idea to make a secure rexec, > and I think I would like to do that for the summer of code project. > Essentially, all objects are wrapped by a container restriction object. > When a module gets imported, any objects that are allowed to be > accessed would have to be specified outside of the restricted execution > code. > > The restricted object would go something like this: > > # restricted object > class RObject: > def __call__(self .... > # check if function call is ok and call it if ok > > def __getattr__(self .... > # check if ok to read attribute and return it if ok > > .... > > RObject would not store have any data members itself. > Instead it would access a global dictionary that isn't > accessable to the restriction execution code. > I'm working on some demo code to see if the idea > might work. Does this sound viable or I am missing something > important? I've debated myself on how to write up the proposal. > I just looked at Zope today and decided if my idea doesn't work, > I could try using their method. > Well, Zope uses proxies so the idea has been done and thus is viable. The real trick with this will be to prevent users from stepping around your protections. What is preventing me from introspectively looking in your __call__() method to see what you are going to call, taking that method, and then replacing the bode in __call__() with the method you are protecting? And if you make specification of what modules can be imported you will need to make it fool-proof and simple. -Brett From bac at OCF.Berkeley.EDU Wed Jun 8 21:59:20 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Wed, 08 Jun 2005 12:59:20 -0700 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <200506081908.20046.physics@list.ru> References: <200506081908.20046.physics@list.ru> Message-ID: <42A74E18.30303@ocf.berkeley.edu> Vova wrote: > Hello ! > This is my project proposal: High-level python optimizer. > > 1. Pre-history. > Python optimization is difficult task because python's dynamic nature. > Applying many of optimization techniques used in other (static typed) > languages to python is almost impossible. There was an attempt to create > python optimizer that works on the byte-code > (http://www.foretec.com/python/workshops/1998-11/proceedings/papers/montanaro/montanaro.html), > but it speeds-up execution only by a few percent. > Different approach is taken in the psyco project. It implements JIT > compilation using run-time specialization. The results is very impressive. > But psyco does only simple local run-time optimizations, it can't look at the > whole program. > The other issue with Psyco is it only works with x86. Don't forget Python does run on other platforms so getting optimizations for other architectures is a very nice thing. > 2. Project proposal. > My proposal is to create high-level optimizer, that will work on the source > tree of the whole program. It will transform the source tree to data-flow > graph that represents the flow of the data from program input (in general > sence) to output. The goal is elimination of all unnecessarily dynamics i.e. > making assumptions about actual types (and may be values) of variables and > their life-times. Of course this can't be done for any variable in the > program, but (usually) for most of them (just try to open any python program > and traverse it from the very beginning visiting any called function). Once > we have got this information we can apply a lot of traditional well-known > optimization techniques as well as python-specific ones. Then we can compile > and run optimized tree, or transform it back to python program. We can still > use psyco for JIT, and maybe we can even provide psyco with gathered > information about variable types. > How are you planning to actually implement performance enhancements? It is one thing to get complete control flow information in a CFG and do the data analysis, but Python's bytecode is in no way going to help you in terms of performance improvement from this information with its lack of type-specific bytecodes short of generating built-in types and LIST_APPEND. Are you going to add new bytecodes? Are you going to do post-compile transformations like Raymond Hettinger's decorator to make built-ins act as constants? And I hope you do realize it sounds like you are breaking semantics of the language by assuming the code you analyze is the code that gets executed. You can read my thesis (http://www.drifty.org/thesis.pdf ; chapter 3) to get the details. It's fine if you are, but you should make sure you make that clear in your proposal. To answer Mark Dufour's response here as well, Starkiller is not under active development anymore by Mike (at least to my knowledge). And Starkiller in no way optimized Python but just performed a type inference for an entire Python application. -Brett From gosselit at gmail.com Thu Jun 9 16:11:48 2005 From: gosselit at gmail.com (tim gosselin) Date: Thu, 9 Jun 2005 10:11:48 -0400 Subject: [summerofcode] Project proposal: Message-ID: >I put up the Anygui item, because personally I think it would be really >really nice to have. I also think that anygui would be a fine project for soc. After having discussions with a few diehard java enthusiasts lately, it seems that a major cause of uncertainty with using python is that it has no guaranteed-working GUI on all supported platforms. If done in a pythonic, easy to use way; and its maintained!, anygui would be a good step forward for python. Although I'm quite busy with other projects right now, I would be happy to create a few backends if someone else would lead up the main design. From gosselit at gmail.com Thu Jun 9 16:42:46 2005 From: gosselit at gmail.com (tim gosselin) Date: Thu, 9 Jun 2005 10:42:46 -0400 Subject: [summerofcode] SOC networking project idea. Message-ID: Hi, this is tim. Im a long time (4yr) python enthusiast and would like to work on one of my projects through google's SOC. This may be a little much to post to this group as it probably doubles the total digest size, hah! but the sf project I just set up hasn't gone through yet. Anyway, below is a quick description of one of the two ideas that I submitted. I started working on this program a few months ago and drafted up all basic functionality (around 4000 lines) but had to abandon it in interest of studying for finals. I am quite enthusiastic about completing a beta of this because I created it to fulfill a need that I had at school. I had several problems: 1) There is a very low per/interface limit on our ethernet network at school yet I have three network ports in my room! 2) There is a very very low per connection limit at my friends school on ssh. Want to scp over some pictures? Forget it. 3) The school's network is very unreliable. I have a couple free dial-up accounts in the area, so it would be great if I could use both at once for redundancy. After some research, I found that (1) can be readily solved, but it requires support from the switch, which is not possible for me. For (2) I could find no generic solution, not to mention most every filesharing program is banned on the school network. On (3) there is definitely no solution to bond different connections through totally different isps. Maybe some of the twisted guys have experience with these problems? Any suggestions or comments would be great! Yesterday I put more graphs into graphviz format which I'll put onto the sf site soon, but if any of the mentors want to know what I'm really all about, feel free to contact me. ===================== Project Title -------------- A generic TCP stream multiplexer. Synopsis --------- This project will create a special network tunnel that accepts an incoming connection, splits it's data across a number network tunnels (ssh/whatever), and reassembles the data from these tunnels on the other side. This allows bandwidth aggregation, reliability, redundancy, and increasing cost effectiveness of network utilization. Benefits to the Python/OSS Community --------------------------------- Time and again, in many modern languages, a great networking program is written but it is not practical due to the nature of threaded networking. Writing programs in an asynchronous fashion solves this problem, but many programmers have trouble embracing this technique. I plan to explore solutions based on poll(), generators, and the twisted framework. I will then document my design decisions and the challenging refactoring from limited threading approaches to a variety of async ones. The OSS community in general benefits because this project fills in a missing gap in the networking toolset. I expect this to fit right in with other generic tools like ssh, socat, and netcat. This is a very useful idea in networking and the emerging distributed networking (p2p) networks in particular, but to my knowledge, has never been generically implemented as a library or stand-alone program. The variety of features of this program will be very beneficial: * Bandwidth aggregation across a number of physical links at the local computer such as across multiple interfaces or modems. In researching bandwidth aggregation methods, I found that most solutions involve a low level driver for bonding Ethernet or serial lines, forget bonding a T1 and backup DSL going through different ISPs unless you want to do a lot of work. Furthermore these are not user space, on the fly configurable methods, so many of the possible advantages are ruled out. This program is much more flexible. * Overcome bottlenecks further out on the network. For example, to saturate discrete network paths, or even increase bandwidth to a host that has arbitrary per connection bandwidth limits (strange firewall stuff). * Failover and redundancy due to automatic reconnecting of intermediate tunnels. * To cut the cost of networking. For example if a person gets: ** A cheap/unreliable/slow connection and a reliable/fast/expensive connection. The program can be made to favor the cheaper connection, but if unavailable it uses the other. ** Two cheaper lines aggregated instead of one expensive one. ** Also, say someone has some network connections. This program allows someone to add more connections as needed instead of scrapping everything and upgrading each time. Deliverables ------------- 1) A stand-alone program that can easily be used to add redundancy and increase throughput for any networking task. 2) An API that can be used by other programs that implements a very common networking problem and provides fine-grained control over it. Future: Other stuff listed in the description below. Project Details ---------------- The basic idea is really simple. The program/library will consist of at least one client and server part. An incoming connection will be accepted by the client, the data from this socket will be split among a number of intermediate sockets and recombined by the server at the other end: tunnels /-------------\ initiating socket -> client ---------------- server -> remote server app \-------------/ example: port 5555 multiple ports/interfaces port 4444 This is like a regular unencrypted ssh tunnel, except the data is divided among many tunnels. It would not be much more difficult to allow "reverse" connections as well. Now, the more challenging features, in a rough order that I plan to implement them are: 1) The program is almost useless if it makes one-shot tunnels like netcat. There will have to be socket ids to track multiple sockets from one port that are going through the tunnel (like socat or ssh). 2) For the ultimate in scalability, it would be nice to have only ONE instance of the program running per machine. This program will run as a daemon and take requests from the local machine to set up new clients and servers on given ports, along with more advanced commands. 3) Tying in with #2, I think the best interface for the program would be with a simple command set over tcp (ala edonkey, mysql), this will be the backend for basic command line tools which communicate with this server (msaddtunnel, mssetbandwidthlimit..). Further down the road, a web front end could be added to manage the tunnels too. 4) A variety of schedulers could be made. These schedulers would be the heart of the program that decide how much data to send across which pipe when. Different ones could be optimized for: low latency, high throughput, tunnel priority (QOS), low memory usage, low cpu usage, etc. This is where the real fun comes in, and I'm sure that with a good framework, there will be many people that suggest schedulers with other properties. 5) The program should be able to communicate with multiple remote servers and especially not trash everything when someone accidentally adds a tunnel to a different server than all of the other tunnels. This will necessitate the use of server ids. 6) There should be a fixed number of sockets through each tunnel (default 1). Using socket ids and channel ids, multiple ports and socket connections will be combined together. This will add the benefit of decreased latency in starting a bunch of short-lived connections due to the slow ramp-up of TCP. For example, x11 and http. This what ssh does too. 7) Allow for tunnel grouping for easier admin, see examples below. 8) Bandwidth limiting for tunnels and whole channels. Unfortunately it seems that the most graceful way to do this is for each side to limit their upload. This must be coordinated. 9) Maybe, rewrite the critical path in c. This should be a short task but may not happen for a while because when do you really run out of fun features to add? 10) Maybe, rewrite it all in c!? 11) All all of the other stuff that I forgot to write here. So, the topology of the final project should look like this: command line admin programs: manager daemon: ----------- ------------------ |addtunnel|---->-P| <-admin port | ----------- / | | |deltunnel|-/ | | tunnels ----------- | --------------- server socks /-------: | | Multiplexing|P--<-------------------: to remote machine client socks--->-P|--| API | / \-------: | | |P-->----/ server output--<-P|--| | client socks | --------------| ------------------ ^ | The API implements the client and server. Notes: The arrows indicate the direction in which the connections are initiated, but data flows in both directions on all sockets. There is one admin port, and zero or more ports of all other types of connections. Possible command line examples: Here is the rough idea. I can provide more refined examples once I dig out my notes. # msaddtunnels --names=joe,frank,bob --tunnels=joe.com:3456,frank.ru:789,bob:6 # mslimittunnel joe 50 # mspriotunnel frank 1 # mspriotunnel joe 15 # mscreategroup -n dsl_users -t joe,frank # mssetdownloadlimit -g dsl_users 100 Project Schedule ----------------- One person will be able to bring this project to a usable state within about one month. There is plenty of room for additional features and modifications in the remaining time. My summer plans are set so I will be able to begin work immediately and continue for the entire summer. Bio ---- I am a student majoring in EE at Norwich University. This Fall I will go into my junior year. My prior programming experience ranges from medium comfort in: Saturn assembly on my HP48, c, and pushing the limits in: bash, java, and python. I am also interested in crypto, functional programming, error correction algorithms, light graph theory, and am a regular reader of LTE. I began using linux with Red Hat around 1998, distro hopped, and finally settled on gentoo in 2001. My primary desktop runs on an opteron 240 which I got shortly after their release. I still have fond memories of hacking numerous programs to get them working in 64 bit. From gosselit at gmail.com Thu Jun 9 16:52:19 2005 From: gosselit at gmail.com (tim gosselin) Date: Thu, 9 Jun 2005 10:52:19 -0400 Subject: [summerofcode] Bayesian Framework in Python Message-ID: How do your ideas compair to http://www.divmod.org/projects/reverend ? I have played with that module and it seems useful. -tim James Tauber wrote: >I recently started down the path of implementing a package for bayesian >networks myself (including Pearl's belief propagation algorithm). > >I would certainly love to see a package like this and would be willing >to be a mentor. > >James From jtauber at jtauber.com Thu Jun 9 17:14:04 2005 From: jtauber at jtauber.com (James Tauber) Date: Thu, 09 Jun 2005 23:14:04 +0800 Subject: [summerofcode] Bayesian Framework in Python In-Reply-To: References: Message-ID: <1118330044.25945.236012932@webmail.messagingengine.com> Bayesian classification is not the same thing as Bayesian belief networks. While you can view the former as a (very) simple case of the latter, a dedicated Bayesian classifier is not usable for general BBNs. James On Thu, 9 Jun 2005 10:52:19 -0400, "tim gosselin" said: > How do your ideas compair to http://www.divmod.org/projects/reverend ? > I have played with that module and it seems useful. > > -tim > > James Tauber wrote: > >I recently started down the path of implementing a package for bayesian > >networks myself (including Pearl's belief propagation algorithm). > > > >I would certainly love to see a package like this and would be willing > >to be a mentor. > > > >James -- James Tauber http://jtauber.com/ journeyman of some http://jtauber.com/blog/ From ndimiduk at gmail.com Thu Jun 9 17:32:04 2005 From: ndimiduk at gmail.com (Nick Dimiduk) Date: Thu, 9 Jun 2005 11:32:04 -0400 Subject: [summerofcode] Question: sdtlib module motring project Message-ID: <86e557c05060908326ef4c024@mail.gmail.com> I am interested in applying for the stdlib translation project mentioned on the CodingProjectIdeas page; I find the topic relavent to my recent programming language theory course. I am concerned, however, about the scope of the project. I would appriciate more information regarding a realistic view of the size of this project: number of modules, module sizes, implementation concerns and pitfalls, etc. Please contact me via list or directly. Thank you in advance, Nick Dimiduk From trshash84 at gmail.com Thu Jun 9 17:50:15 2005 From: trshash84 at gmail.com (Shashwath) Date: Thu, 9 Jun 2005 21:20:15 +0530 Subject: [summerofcode] Project proposal: Python based mathematical modelling system similar to Matlab Message-ID: <200506092120.15732.trshash84@gmail.com> Hello everyone, My name is Shashwath, and I'm studying in S.R.M. Engineering College in Chennai, India, doing a course in Electronics and Communication Engineering. After being exposed to Matlab in college, and using GNU Octave at home to follow the Matlab coursework, I've been toying with the idea of using Python to replace those software, by implementing a set of modules in Python that will act as a mathematical and scientific modelling system. The reason for this is that while both of these tools allow reasonably fast and usable mathematical systems using matrices, the language structure of both Matlab and Octave are arbitrary, difficult to adjust to and, well, inelegant. Not to mention, the lack of a true type system in both languages means that very often, functions are called with character strings in place of floating point numbers, which can cause some very strange behaviour. My idea was to work with the existing math module, by using a multi-dimentional sequences (sequences of sequences) to represent a matrix, and then write wrappers around existing functions to use those matrix objects. Also, the existance of libraries like gd-module and tools like GNUPlot will allow for visualization on par with anything that Matlab or Octave have to offer. The drawback that I can think of with Python is probably going to be speed. I don't know yet, because I've not really done any benchmarks, but I have a feeling that Python itself might be a lot slower than Matlab or even Octave. Maybe some work will be required in optimizing the execution of code, but I think that can wait until I have a solid backbone. I think the code I have to implement will probably come in this order (keeping in mind only language features, and the more well-known libraries - I don't know if there exist any libraries that do some of these things): 1) A full matrix algebra system. This should include the matrix as a datatype, and all operations possible on a matrix, and failure conditions if the matrices are not compatible for the operation (different size matrices being added, for example) that exit gracefully. 2) Modifying or encapsulating the existing math functions to work on the above matrix system. That is, sin(A) where A is a matrix should perform the operation on all values in the matrix. If the matrix is not compatible with the operation, the program should again exit gracefully. 3) Creating a subsystem for input/output, either to files or display, which would ideally be transparent between files, display, or whatever else is used. 4) Implement as many of the toolkits provided in Octave and Matlab as possible as modules for this system. 5) Try to optimize the execution of the code in the system, probably by writing the slow parts in C. I hope that by implementing this system, it will be possible to provide a more flexible alternative to Matlab and other similar systems that can be readily integrated with existing Python or C programs, and will open up a much larger audience to scientific and mathematical computing. For example, it would be possible to use this system to provide more realistic physics in a game, or for more powerful use of external data gathering sensor devices. The purpose of the project would not be to replace Octave or Matlab, but to simply provide a alternative for those who want to use it. Thank you for looking into my ideas, Shashwath From arigo at tunes.org Thu Jun 9 18:03:40 2005 From: arigo at tunes.org (Armin Rigo) Date: Thu, 9 Jun 2005 18:03:40 +0200 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <42A74E18.30303@ocf.berkeley.edu> References: <200506081908.20046.physics@list.ru> <42A74E18.30303@ocf.berkeley.edu> Message-ID: <20050609160340.GA3936@code1.codespeak.net> Hi Brett, On Wed, Jun 08, 2005 at 12:59:20PM -0700, Brett C. wrote: > How are you planning to actually implement performance enhancements? It is one > thing to get complete control flow information in a CFG and do the data > analysis, (...) In addition to these remarks, I should point you -- if you are not already aware of it -- to the PyPy project, which does control flow graphs and type inference. My honest opinion on the matter is that it's both already in-development, and not at all a two-month project (at least it took us a lot more time). > To answer Mark Dufour's response here as well, Starkiller is not under active > development anymore by Mike (at least to my knowledge). And Starkiller in no > way optimized Python but just performed a type inference for an entire Python > application. No, Starkiller does more than "just" type inference. It generates C++ code that uses the inferred information, which can potentially give great performance boosts. I think that Mark's Ph.D. thesis is similar, but goes quite farther in many respect by doing a number of more advanced analysis. Both Starkiller and, I believe, Mark's work don't actually handle the complete Python language, but a static dialect or subset of Python. PyPy doesn't do type inference on the full Python language either, but on a differently static subset (the difference being that it doesn't look at the source but at the in-memory pre-imported function- code- and class objects, so you can still use full Python as a kind of macro-language to do any kind of dynamic initializations at import time). A bientot, Armin From arigo at tunes.org Thu Jun 9 18:09:39 2005 From: arigo at tunes.org (Armin Rigo) Date: Thu, 9 Jun 2005 18:09:39 +0200 Subject: [summerofcode] Question: sdtlib module motring project In-Reply-To: <86e557c05060908326ef4c024@mail.gmail.com> References: <86e557c05060908326ef4c024@mail.gmail.com> Message-ID: <20050609160939.GB3936@code1.codespeak.net> Hi Nick, On Thu, Jun 09, 2005 at 11:32:04AM -0400, Nick Dimiduk wrote: > I am interested in applying for the stdlib translation project > mentioned on the CodingProjectIdeas page; I find the topic relavent to > my recent programming language theory course. I assume that you are talking about "Port standard library modules implemented in C to Python". Here is a back-pointer to examples of such modules: http://mail.python.org/pipermail/summerofcode/2005-June/000052.html You would be expected to pick a module or modules that you already know and use, which should give you an idea about the involved effort and the direction to go. A bientot, Armin. From arigo at tunes.org Thu Jun 9 18:12:59 2005 From: arigo at tunes.org (Armin Rigo) Date: Thu, 9 Jun 2005 18:12:59 +0200 Subject: [summerofcode] stdlib port to python In-Reply-To: <20050605112555.GA7116@code1.codespeak.net> References: <20050605084500.GO5694@solar.trillke.net> <20050605112555.GA7116@code1.codespeak.net> Message-ID: <20050609161259.GA4255@code1.codespeak.net> Hi all, On Sun, Jun 05, 2005 at 01:25:55PM +0200, Armin Rigo wrote: > collections Correction: this module is already in the Python sandbox (http://cvs.sourceforge.net/viewcvs.py/python/python/nondist/sandbox/collections/). In general it's a good idea to check here, in addition to Googling a bit, to make sure no one else has a Python implementation already. A bientot, Armin. From cmoad at indiana.edu Thu Jun 9 18:42:31 2005 From: cmoad at indiana.edu (Charles Moad) Date: Thu, 9 Jun 2005 11:42:31 -0500 Subject: [summerofcode] Project proposal: Python based mathematical modelling system similar to Matlab In-Reply-To: <200506092120.15732.trshash84@gmail.com> References: <200506092120.15732.trshash84@gmail.com> Message-ID: <0e68c8386789cd0822cfe228f5424d01@indiana.edu> http://matplotlib.sf.net On Jun 9, 2005, at 10:50 AM, Shashwath wrote: > > Hello everyone, > > My name is Shashwath, and I'm studying in S.R.M. Engineering College in > Chennai, India, doing a course in Electronics and Communication > Engineering. > > After being exposed to Matlab in college, and using GNU Octave at home > to > follow the Matlab coursework, I've been toying with the idea of using > Python > to replace those software, by implementing a set of modules in Python > that > will act as a mathematical and scientific modelling system. > > The reason for this is that while both of these tools allow reasonably > fast > and usable mathematical systems using matrices, the language structure > of > both Matlab and Octave are arbitrary, difficult to adjust to and, well, > inelegant. Not to mention, the lack of a true type system in both > languages > means that very often, functions are called with character strings in > place > of floating point numbers, which can cause some very strange behaviour. > > My idea was to work with the existing math module, by using a > multi-dimentional sequences (sequences of sequences) to represent a > matrix, > and then write wrappers around existing functions to use those matrix > objects. Also, the existance of libraries like gd-module and tools like > GNUPlot will allow for visualization on par with anything that Matlab > or > Octave have to offer. > > The drawback that I can think of with Python is probably going to be > speed. I > don't know yet, because I've not really done any benchmarks, but I > have a > feeling that Python itself might be a lot slower than Matlab or even > Octave. > Maybe some work will be required in optimizing the execution of code, > but I > think that can wait until I have a solid backbone. > > I think the code I have to implement will probably come in this order > (keeping > in mind only language features, and the more well-known libraries - I > don't > know if there exist any libraries that do some of these things): > > 1) A full matrix algebra system. This should include the matrix as a > datatype, > and all operations possible on a matrix, and failure conditions if the > matrices are not compatible for the operation (different size matrices > being > added, for example) that exit gracefully. > > 2) Modifying or encapsulating the existing math functions to work on > the above > matrix system. That is, sin(A) where A is a matrix should perform the > operation on all values in the matrix. If the matrix is not compatible > with > the operation, the program should again exit gracefully. > > 3) Creating a subsystem for input/output, either to files or display, > which > would ideally be transparent between files, display, or whatever else > is > used. > > 4) Implement as many of the toolkits provided in Octave and Matlab as > possible > as modules for this system. > > 5) Try to optimize the execution of the code in the system, probably by > writing the slow parts in C. > > I hope that by implementing this system, it will be possible to > provide a more > flexible alternative to Matlab and other similar systems that can be > readily > integrated with existing Python or C programs, and will open up a much > larger > audience to scientific and mathematical computing. For example, it > would be > possible to use this system to provide more realistic physics in a > game, or > for more powerful use of external data gathering sensor devices. > > The purpose of the project would not be to replace Octave or Matlab, > but to > simply provide a alternative for those who want to use it. > > Thank you for looking into my ideas, > > Shashwath > _______________________________________________ > summerofcode mailing list > summerofcode at python.org > http://mail.python.org/mailman/listinfo/summerofcode From Fernando.Perez at colorado.edu Thu Jun 9 18:51:27 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Thu, 09 Jun 2005 10:51:27 -0600 Subject: [summerofcode] Project proposal: Python based mathematical modelling system similar to Matlab In-Reply-To: <0e68c8386789cd0822cfe228f5424d01@indiana.edu> References: <200506092120.15732.trshash84@gmail.com> <0e68c8386789cd0822cfe228f5424d01@indiana.edu> Message-ID: <42A8738F.5040702@colorado.edu> Charles Moad wrote: > http://matplotlib.sf.net And in addition, http://scipy.org, which contains the underlying numerical foundation and a large set of libraries. Just to let you (the OP) know, there is a LOT to be done in scientific computing and Python. Both matplotlib and the broader scipy can use all the helping hands we can get, and IPython, the interactive shell written with that in mind, has its own SoC project with a scientific computing bent. Details here: http://ipython.scipy.org/google_soc. But at least familiarize yourself first with what's already been done in the field: there is a yearly scipy conference held since 2001, and a vast amount of work in multiple locations for using python for scientific computing. Try google :) Best, f From trshash84 at gmail.com Thu Jun 9 19:00:01 2005 From: trshash84 at gmail.com (Shashwath) Date: Thu, 9 Jun 2005 22:30:01 +0530 Subject: [summerofcode] Project proposal: Python based mathematical modelling system similar to Matlab In-Reply-To: <0e68c8386789cd0822cfe228f5424d01@indiana.edu> References: <200506092120.15732.trshash84@gmail.com> <0e68c8386789cd0822cfe228f5424d01@indiana.edu> Message-ID: <200506092230.02793.trshash84@gmail.com> On Thursday 09 Jun 2005 10:12 pm, Charles Moad wrote: > http://matplotlib.sf.net > Thanks for that! :) That's a simple plotting utility. I can use matplotlib as a base for the plotter, but the scope of what I'm suggesting will be much bigger than just plotting. It will be a backend framework that will create the data to plot, more than being the frontend that actually does the plotting. Regards, Shashwath From sdeibel at wingware.com Thu Jun 9 23:13:44 2005 From: sdeibel at wingware.com (Stephan Deibel) Date: Thu, 9 Jun 2005 17:13:44 -0400 (EDT) Subject: [summerofcode] Free Wing IDE Licenses for SoC Projects Message-ID: Hi, Wingware would like to offer free licenses for Wing IDE, a commercial IDE for Python, to all that start a SoC project for Python after the initial selection process. These would be permanent commercial licenses for all OSes (Windows, Linux, and OS X). Our goal in doing this is to help the applicants complete their projects and add a bit of extra reward for attempting a project. Wing can increase productivity quite a bit during coding and debugging Python code (or so I'm told by our users ;-). I'm assuming we will somehow or another be able to get this offer to the list of people whose proposals are accepted. Obviously, successful candidates can also contact me directly. Thanks, Stephan Deibel -- Wingware Wing IDE for Python Advancing Software Development www.wingware.com From physics at list.ru Thu Jun 9 23:47:16 2005 From: physics at list.ru (Vova) Date: Fri, 10 Jun 2005 01:47:16 +0400 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <42A74E18.30303@ocf.berkeley.edu> References: <200506081908.20046.physics@list.ru> <42A74E18.30303@ocf.berkeley.edu> Message-ID: <200506100147.16962.physics@list.ru> On Wednesday 08 June 2005 23:59, Brett C. wrote: > Vova wrote: > > Hello ! > > This is my project proposal: High-level python optimizer. > > > > 1. Pre-history. > > Python optimization is difficult task because python's dynamic nature. > > Applying many of optimization techniques used in other (static typed) > > languages to python is almost impossible. There was an attempt to create > > python optimizer that works on the byte-code > > (http://www.foretec.com/python/workshops/1998-11/proceedings/papers/monta > >naro/montanaro.html), but it speeds-up execution only by a few percent. > > Different approach is taken in the psyco project. It implements JIT > > compilation using run-time specialization. The results is very > > impressive. But psyco does only simple local run-time optimizations, it > > can't look at the whole program. > > The other issue with Psyco is it only works with x86. Don't forget Python > does run on other platforms so getting optimizations for other > architectures is a very nice thing. > > > 2. Project proposal. > > My proposal is to create high-level optimizer, that will work on the > > source tree of the whole program. It will transform the source tree to > > data-flow graph that represents the flow of the data from program input > > (in general sence) to output. The goal is elimination of all > > unnecessarily dynamics i.e. making assumptions about actual types (and > > may be values) of variables and their life-times. Of course this can't be > > done for any variable in the program, but (usually) for most of them > > (just try to open any python program and traverse it from the very > > beginning visiting any called function). Once we have got this > > information we can apply a lot of traditional well-known optimization > > techniques as well as python-specific ones. Then we can compile and run > > optimized tree, or transform it back to python program. We can still use > > psyco for JIT, and maybe we can even provide psyco with gathered > > information about variable types. > > How are you planning to actually implement performance enhancements? It is > one thing to get complete control flow information in a CFG and do the data > analysis, but Python's bytecode is in no way going to help you in terms of > performance improvement from this information with its lack of > type-specific bytecodes short of generating built-in types and LIST_APPEND. > > Are you going to add new bytecodes? No. My project will use type information to do high-level code optimization (see below). Type inference is the only one part of analysis. The aim of the analysis is to gain the following information (when it possible): 1. Variable types. 2. Variable values. 3. Function side-effects. Item 3 depends on 1. Example: def sum(a,b): return a+b sum(a,b) has side-effects iff a.__add__ has side-effects. Another example: a.some_method(5) here we must guess the type of a, then check a.__getitem__ for side-effects, and then check a.some_method(5) for side_effects. Let's look, how can we use this information to optimize program: 1. Constant-folding and math simplification can be done for built-in types. If some variables have definite values we can use it directly. 2. Function inlining (which can be significant in python) can be done if we know what function is being called. For method inlining we must know the type of the object and check __getitem__ for side-effects. 3. Partial evaluation can be done if some variables have known types and/or values. This can be done for user function if we have proven that it has no side-effects (for example replacing calls to factorial(10) or sin(10) with their results at compile-type), and for python specific operations, for example replacing "%some_pattern" % (some_list) by more efficient code. 4. Dead code elimination can be done as part of parial evaluation. Unused variable elimination (i.e. elimination of function calls if their result is unused) can be done too using information about side-effects. If variable is used only in one branch of execution it assignment can be moved into that branch. 5. Common subexpression elimination (as well as moving common code outside loops) can be done if subexpression has no side-effects. This is even more actual in python than in static-typed languages because the code the.some.method(x) the.some.method(y) or for x in some_big_list: the.some.method(x) is very common. the.__getitem__("some").__getitem__("method") is the common code. 6. There are also some python-specific optimization, for example replacing range with xrange when possible, replacing the code (a,b)=(b,a) with the code t=a; a=b; b=t and so on. All of this is high-level optimization, it should be used on top of the low-level optimizations. Of course all of this can be done by hands if programmer is clever enough, but sometimes the price for it is decreasing the code readability, abusing incapsulation, and so on, the result is increased maintenance cost. The result of the optimizer could be either optimized python source or compiled program. In the former case it can be then compiled by Jython, IronPython or PyPy. As I said before, this optimizations will give the best results it applied to the whole program with all of it's modules. The problem with compile-time to run-time integrity can be partly solved by checking used modules just before running the program and recompiling the program if needed. Maybe we can save taken assumptions about module's functions and check if that assumptions had changed, so full recompilation will be needed only rarely. In real-world applications only the small amount of modules actually changes often. The results of optimization of stand-alone modules can be improved by adding type annotations for module's functions. This project is different from python-to-C++ compilation (of course some correlations present). C++ can't represent a lot of python features, but optimized python program preserves all of them. Optimizer touches only the code that can be improved. Of course full implementation of all mentioned optimizations (and maybe even more) will take more than two month. But two month is sufficient to implement general framework and some (the most promising) optimization and test it. Of course the work done by others in the field of type inference algorithms can be very helpful if it is open. -- Best regards, Vladimir > Are you going to do post-compile > transformations like Raymond Hettinger's decorator to make built-ins act as > constants? > > And I hope you do realize it sounds like you are breaking semantics of the > language by assuming the code you analyze is the code that gets executed. > You can read my thesis (http://www.drifty.org/thesis.pdf ; chapter 3) to > get the details. It's fine if you are, but you should make sure you make > that clear in your proposal. > > To answer Mark Dufour's response here as well, Starkiller is not under > active development anymore by Mike (at least to my knowledge). And > Starkiller in no way optimized Python but just performed a type inference > for an entire Python application. > > -Brett From gvanrossum at gmail.com Fri Jun 10 01:04:55 2005 From: gvanrossum at gmail.com (Guido van Rossum) Date: Thu, 9 Jun 2005 16:04:55 -0700 Subject: [summerofcode] SSL mentoring Message-ID: Elemental Security has a use for superior SSL support in Python. If a proposal to do something about that is accepted, we can help out by providing mentoring capability (not me though -- I don't know the first thing about SSL :-( ). -- --Guido van Rossum (home page: http://www.python.org/~guido/) From skip at pobox.com Fri Jun 10 01:19:50 2005 From: skip at pobox.com (Skip Montanaro) Date: Thu, 9 Jun 2005 18:19:50 -0500 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <200506100147.16962.physics@list.ru> References: <200506081908.20046.physics@list.ru> <42A74E18.30303@ocf.berkeley.edu> <200506100147.16962.physics@list.ru> Message-ID: <17064.52886.800712.859560@montanaro.dyndns.org> Vladimir> 2. Function inlining (which can be significant in python) can be Vladimir> done if we know what function is being called. For method Vladimir> inlining we must know the type of the object and check Vladimir> __getitem__ for side-effects. It's not that easy. attribute names (including method names) can be rebound on-the-fly, and you may not be able to detect it ahead of time. In addition, the rebinding can happen from action at a distance (one module messing with the elements of another). Vladimir> 4. Dead code elimination can be done as part of parial Vladimir> evaluation.... But does speed anything up. At best, it might help you identify other blocks of code that be coalesced. Vladimir> 5. Common subexpression elimination (as well as moving common code Vladimir> outside loops) can be done if subexpression has no Vladimir> side-effects. This is even more actual in python than in Vladimir> static-typed languages because the code Vladimir> the.some.method(x) Vladimir> the.some.method(y) Vladimir> or Vladimir> for x in some_big_list: the.some.method(x) Vladimir> is very common. the.__getitem__("some").__getitem__("method") is Vladimir> the common code. You mean getattr(the, "some") here I think. Vladimir> 6. There are also some python-specific optimization, for example Vladimir> replacing range with xrange when possible, replacing the code Vladimir> (a,b)=(b,a) Vladimir> with the code Vladimir> t=a; a=b; b=t Vladimir> and so on. Been there. Done that. Only modest improvements result. Vladimir> All of this is high-level optimization, it should be used on top Vladimir> of the low-level optimizations. If tuple unpacking elimination is high-level, what do you mean by low-level? Skip From bac at OCF.Berkeley.EDU Fri Jun 10 04:32:47 2005 From: bac at OCF.Berkeley.EDU (Brett C.) Date: Thu, 09 Jun 2005 19:32:47 -0700 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <200506100147.16962.physics@list.ru> References: <200506081908.20046.physics@list.ru> <42A74E18.30303@ocf.berkeley.edu> <200506100147.16962.physics@list.ru> Message-ID: <42A8FBCF.8030702@ocf.berkeley.edu> Vova wrote: [SNIP] > > My project will use type information to do high-level code optimization (see > below). Type inference is the only one part of analysis. The aim of the > analysis is to gain the following information (when it possible): > 1. Variable types. > 2. Variable values. > 3. Function side-effects. > > Item 3 depends on 1. Example: > def sum(a,b): return a+b > sum(a,b) has side-effects iff a.__add__ has side-effects. > Another example: > a.some_method(5) > here we must guess the type of a, then check a.__getitem__ for side-effects, > and then check a.some_method(5) for side_effects. > > Let's look, how can we use this information to optimize program: > > 1. Constant-folding and math simplification can be done for built-in types. If > some variables have definite values we can use it directly. > This is already done for constants by the peepholer. > 2. Function inlining (which can be significant in python) can be done if we > know what function is being called. For method inlining we must know the type > of the object and check __getitem__ for side-effects. > This is a lot harder than it might seem on the surface. Functions can be replaced. What about default arguments that are changed between executions? > 3. Partial evaluation can be done if some variables have known types and/or > values. This can be done for user function if we have proven that it has no > side-effects (for example replacing calls to factorial(10) or sin(10) with > their results at compile-type), and for python specific operations, for > example replacing "%some_pattern" % (some_list) by more efficient code. > function call replacement might be possible, although detecting side-effects is rather difficult thanks to descriptors allowing even attribute access to execute a function. > 4. Dead code elimination can be done as part of parial evaluation. Unused > variable elimination (i.e. elimination of function calls if their result is > unused) can be done too using information about side-effects. If variable is > used only in one branch of execution it assignment can be moved into that > branch. > That might buy you something, but I doubt much. > 5. Common subexpression elimination (as well as moving common code outside > loops) can be done if subexpression has no side-effects. This is even more > actual in python than in static-typed languages because the code > the.some.method(x) > the.some.method(y) > or > for x in some_big_list: the.some.method(x) > is very common. the.__getitem__("some").__getitem__("method") is the common > code. > > 6. There are also some python-specific optimization, for example replacing > range with xrange when possible, replacing the code > (a,b)=(b,a) > with the code > t=a; a=b; b=t > and so on. > I think the peepholer does this as well, but a quick check didn't make it obvious. You might get something out of this, but once again it will probably be tough. > All of this is high-level optimization, it should be used on top of the > low-level optimizations. Of course all of this can be done by hands if > programmer is clever enough, but sometimes the price for it is decreasing the > code readability, abusing incapsulation, and so on, the result is increased > maintenance cost. > Right, which is why people tend not to publish major performance hacks one can do in Python to gain a slight performance boost. > The result of the optimizer could be either optimized python source or > compiled program. In the former case it can be then compiled by Jython, > IronPython or PyPy. > > As I said before, this optimizations will give the best results it applied to > the whole program with all of it's modules. The problem with compile-time to > run-time integrity can be partly solved by checking used modules just before > running the program and recompiling the program if needed. Maybe we can save > taken assumptions about module's functions and check if that assumptions had > changed, so full recompilation will be needed only rarely. In real-world > applications only the small amount of modules actually changes often. > The results of optimization of stand-alone modules can be improved by adding > type annotations for module's functions. > How would you work in the checks? Added code by your optimizer? > This project is different from python-to-C++ compilation (of course some > correlations present). C++ can't represent a lot of python features, but > optimized python program preserves all of them. Optimizer touches only the > code that can be improved. > > Of course full implementation of all mentioned optimizations (and maybe even > more) will take more than two month. But two month is sufficient to implement > general framework and some (the most promising) optimization and test it. Of > course the work done by others in the field of type inference algorithms can > be very helpful if it is open. > I personally don't know of any type inference implementations that are as thorough as you want and that are publicly available. I realize I sound overly negative towards this proposal, but I just want you to realize that this is a difficult problem. If you can pull it off, wonderful! Optimized Python code would be a great thing. And you should still send in your proposal. I just think that the situation is more complex than you think. -Brett From trshash84 at gmail.com Fri Jun 10 09:57:33 2005 From: trshash84 at gmail.com (Shashwath) Date: Fri, 10 Jun 2005 13:27:33 +0530 Subject: [summerofcode] =?iso-8859-1?q?Project_proposal=3A_Python_based_ma?= =?iso-8859-1?q?thematical=09modelling_system_similar_to_Matlab?= In-Reply-To: <42A8738F.5040702@colorado.edu> References: <200506092120.15732.trshash84@gmail.com> <0e68c8386789cd0822cfe228f5424d01@indiana.edu> <42A8738F.5040702@colorado.edu> Message-ID: <200506101327.36021.trshash84@gmail.com> On Thursday 09 Jun 2005 10:21 pm, Fernando Perez wrote: > Charles Moad wrote: > > http://matplotlib.sf.net > > And in addition, http://scipy.org, which contains the underlying numerical > foundation and a large set of libraries. > > Just to let you (the OP) know, there is a LOT to be done in scientific > computing and Python. Both matplotlib and the broader scipy can use all > the helping hands we can get, and Thanks! I was getting at something quite similar, actually. Since I'm generally interested in scientific computing, I will gladly sign on and help in whatever way I can in both projects. > > IPython, the interactive shell written with that in mind, has its own SoC > project with a scientific computing bent. Details here: > http://ipython.scipy.org/google_soc. > I like the idea, and looking at your mock-ups, I've got more ideas. I'll put them down and run them by you if that's OK.. :) > But at least familiarize yourself first with what's already been done in > the field: there is a yearly scipy conference held since 2001, and a vast > amount of work in multiple locations for using python for scientific > computing. Try google :) Of course... I basically had this idea in my head, and I just put it down without really researching. My fault, I guess, but I just wanted to get it down before I forgot any of it... I spent the morning reading through the archives of scipy and ipython, and I find a lot of things I like. I'll come on board ASAP :) Regards, Shash -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050610/d58d7b3e/attachment.html From mark.dufour at gmail.com Fri Jun 10 11:44:58 2005 From: mark.dufour at gmail.com (Mark Dufour) Date: Fri, 10 Jun 2005 11:44:58 +0200 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <200506100147.16962.physics@list.ru> References: <200506081908.20046.physics@list.ru> <42A74E18.30303@ocf.berkeley.edu> <200506100147.16962.physics@list.ru> Message-ID: <8180ef69050610024436614a04@mail.gmail.com> Hi Vova, It's very hard to prove anything about a program without a precise type analysis. As Armin mentioned, implementing this alone, for Python, represents quite an effort. But it is the most important thing for optimizing pure Python: you can't specify types in Python (without messing up your source code, or using Pyrex), but you can optimize other things by hand. In my case, it's even more important, because conversion to C++ essentially gives you most of the optimizations you mention for free. A really high-level optimization that remains in this case is for example trying to allocate things on the stack, or even statically preallocate them (because you do this manually in C++). Other examples of high-level optimizations imo are for example optimization of bounds checking, optimizing memory layout in many ways, and removing 'intermediate lists' as in functional language compilers. But, I don't think a global approach can work well for even moderately dynamic programs, as it's very hard to determine precisely what is going on. (Consider just the use of reflection - it's formally undecidable what kind of attribute names are involved, even without user input.) A global approach then, can imo best consider a subset of Python, and translate code into a language such as C++ (as it operates at the same abstraction level as Python, and you get many optimizations for free.) I really like the elegance of such a solution: you can reuse lots of work done in for example GCC, and you get the ultimate in speed for relatively 'static' programs - which many people, or at least myself, mostly write. I love the syntax of Python, but I don't really use for example dynamic typing for most of the time (it's just convenient to be able to leave out type declarations :D) On the other hand, a non-global approach I think cannot do many high-level optimizations, as it doesn't have enough information or (when done during run-time) does not have the time to calculate the right information. A non-global, run-time approach does seem like the best long-term solution. With Moore's law and all, it can optimize most code to an acceptable level, and still be able to work with the full Python semantics. So, I am left wondering a bit about the approach you would like to take. If you take the global route, then why not convert to C++. But that would be sort of the same thing as Starkiller and Shedskin (my compiler) aim to do. If you take the non-global route, then real high-level optimizations seem out of the question, or at least very complicated? Maybe it would be best to look into the things Armin Rigo and the others are doing with PyPy, perhaps find something you can contribute there? Finally, I have no idea whether the source code for Starkiller is available, or if so, if it's readable. The website seems gone, and I don't know what happened. Well, I know my source code is available, but not very readable -^ (just mail me, and I'll send you this 6000 line can of worms) - I'll be probably still modifying it heavily for the foreseeable future.. Mark. On 6/9/05, Vova wrote: > On Wednesday 08 June 2005 23:59, Brett C. wrote: > > Vova wrote: > > > Hello ! > > > This is my project proposal: High-level python optimizer. > > > > > > 1. Pre-history. > > > Python optimization is difficult task because python's dynamic nature. > > > Applying many of optimization techniques used in other (static typed) > > > languages to python is almost impossible. There was an attempt to create > > > python optimizer that works on the byte-code > > > (http://www.foretec.com/python/workshops/1998-11/proceedings/papers/monta > > >naro/montanaro.html), but it speeds-up execution only by a few percent. > > > Different approach is taken in the psyco project. It implements JIT > > > compilation using run-time specialization. The results is very > > > impressive. But psyco does only simple local run-time optimizations, it > > > can't look at the whole program. > > > > The other issue with Psyco is it only works with x86. Don't forget Python > > does run on other platforms so getting optimizations for other > > architectures is a very nice thing. > > > > > 2. Project proposal. > > > My proposal is to create high-level optimizer, that will work on the > > > source tree of the whole program. It will transform the source tree to > > > data-flow graph that represents the flow of the data from program input > > > (in general sence) to output. The goal is elimination of all > > > unnecessarily dynamics i.e. making assumptions about actual types (and > > > may be values) of variables and their life-times. Of course this can't be > > > done for any variable in the program, but (usually) for most of them > > > (just try to open any python program and traverse it from the very > > > beginning visiting any called function). Once we have got this > > > information we can apply a lot of traditional well-known optimization > > > techniques as well as python-specific ones. Then we can compile and run > > > optimized tree, or transform it back to python program. We can still use > > > psyco for JIT, and maybe we can even provide psyco with gathered > > > information about variable types. > > > > How are you planning to actually implement performance enhancements? It is > > one thing to get complete control flow information in a CFG and do the data > > analysis, but Python's bytecode is in no way going to help you in terms of > > performance improvement from this information with its lack of > > type-specific bytecodes short of generating built-in types and LIST_APPEND. > > > > Are you going to add new bytecodes? > No. > > My project will use type information to do high-level code optimization (see > below). Type inference is the only one part of analysis. The aim of the > analysis is to gain the following information (when it possible): > 1. Variable types. > 2. Variable values. > 3. Function side-effects. > > Item 3 depends on 1. Example: > def sum(a,b): return a+b > sum(a,b) has side-effects iff a.__add__ has side-effects. > Another example: > a.some_method(5) > here we must guess the type of a, then check a.__getitem__ for side-effects, > and then check a.some_method(5) for side_effects. > > Let's look, how can we use this information to optimize program: > > 1. Constant-folding and math simplification can be done for built-in types. If > some variables have definite values we can use it directly. > > 2. Function inlining (which can be significant in python) can be done if we > know what function is being called. For method inlining we must know the type > of the object and check __getitem__ for side-effects. > > 3. Partial evaluation can be done if some variables have known types and/or > values. This can be done for user function if we have proven that it has no > side-effects (for example replacing calls to factorial(10) or sin(10) with > their results at compile-type), and for python specific operations, for > example replacing "%some_pattern" % (some_list) by more efficient code. > > 4. Dead code elimination can be done as part of parial evaluation. Unused > variable elimination (i.e. elimination of function calls if their result is > unused) can be done too using information about side-effects. If variable is > used only in one branch of execution it assignment can be moved into that > branch. > > 5. Common subexpression elimination (as well as moving common code outside > loops) can be done if subexpression has no side-effects. This is even more > actual in python than in static-typed languages because the code > the.some.method(x) > the.some.method(y) > or > for x in some_big_list: the.some.method(x) > is very common. the.__getitem__("some").__getitem__("method") is the common > code. > > 6. There are also some python-specific optimization, for example replacing > range with xrange when possible, replacing the code > (a,b)=(b,a) > with the code > t=a; a=b; b=t > and so on. > > All of this is high-level optimization, it should be used on top of the > low-level optimizations. Of course all of this can be done by hands if > programmer is clever enough, but sometimes the price for it is decreasing the > code readability, abusing incapsulation, and so on, the result is increased > maintenance cost. > > The result of the optimizer could be either optimized python source or > compiled program. In the former case it can be then compiled by Jython, > IronPython or PyPy. > > As I said before, this optimizations will give the best results it applied to > the whole program with all of it's modules. The problem with compile-time to > run-time integrity can be partly solved by checking used modules just before > running the program and recompiling the program if needed. Maybe we can save > taken assumptions about module's functions and check if that assumptions had > changed, so full recompilation will be needed only rarely. In real-world > applications only the small amount of modules actually changes often. > The results of optimization of stand-alone modules can be improved by adding > type annotations for module's functions. > > This project is different from python-to-C++ compilation (of course some > correlations present). C++ can't represent a lot of python features, but > optimized python program preserves all of them. Optimizer touches only the > code that can be improved. > > Of course full implementation of all mentioned optimizations (and maybe even > more) will take more than two month. But two month is sufficient to implement > general framework and some (the most promising) optimization and test it. Of > course the work done by others in the field of type inference algorithms can > be very helpful if it is open. > > > -- > Best regards, > Vladimir > > > Are you going to do post-compile > > transformations like Raymond Hettinger's decorator to make built-ins act as > > constants? > > > > And I hope you do realize it sounds like you are breaking semantics of the > > language by assuming the code you analyze is the code that gets executed. > > You can read my thesis (http://www.drifty.org/thesis.pdf ; chapter 3) to > > get the details. It's fine if you are, but you should make sure you make > > that clear in your proposal. > > > > To answer Mark Dufour's response here as well, Starkiller is not under > > active development anymore by Mike (at least to my knowledge). And > > Starkiller in no way optimized Python but just performed a type inference > > for an entire Python application. > > > > -Brett > _______________________________________________ > summerofcode mailing list > summerofcode at python.org > http://mail.python.org/mailman/listinfo/summerofcode > -- if vars: self.output('; '.join([self.nodetype(var)+' '+name for (name,var) in vars.items()])+';') From physics at list.ru Fri Jun 10 14:48:01 2005 From: physics at list.ru (Vova) Date: Fri, 10 Jun 2005 16:48:01 +0400 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <42A8FBCF.8030702@ocf.berkeley.edu> References: <200506081908.20046.physics@list.ru> <200506100147.16962.physics@list.ru> <42A8FBCF.8030702@ocf.berkeley.edu> Message-ID: <200506101648.01991.physics@list.ru> On Friday 10 June 2005 06:32, Brett C. wrote: > Vova wrote: > [SNIP] > > > My project will use type information to do high-level code optimization > > (see below). Type inference is the only one part of analysis. The aim of > > the analysis is to gain the following information (when it possible): 1. > > Variable types. > > 2. Variable values. > > 3. Function side-effects. > > > > Item 3 depends on 1. Example: > > def sum(a,b): return a+b > > sum(a,b) has side-effects iff a.__add__ has side-effects. > > Another example: > > a.some_method(5) > > here we must guess the type of a, then check a.__getitem__ for > > side-effects, and then check a.some_method(5) for side_effects. > > > > Let's look, how can we use this information to optimize program: > > > > 1. Constant-folding and math simplification can be done for built-in > > types. If some variables have definite values we can use it directly. > > This is already done for constants by the peepholer. Ok, but I don't know does it ever possible to do math (string, list,...) expression simplification for non-constants taking peepholer approach. > > 2. Function inlining (which can be significant in python) can be done if > > we know what function is being called. For method inlining we must know > > the type of the object and check __getitem__ for side-effects. > > This is a lot harder than it might seem on the surface. Functions can be > replaced. Yes. But this is handled by general algorithm. Function objects is tracked like any other variables, and if at the time of call it has definite value then function can be inlined. > What about default arguments that are changed between > executions? Again, if optimizer can't prove that default arguments have definite values then it won't do anything that may be illegal. Maybe in some cases default arguments can be evaluated in caller context. Anyway inlining is actual only for small functions. > > 3. Partial evaluation can be done if some variables have known types > > and/or values. This can be done for user function if we have proven that > > it has no side-effects (for example replacing calls to factorial(10) or > > sin(10) with their results at compile-type), and for python specific > > operations, for example replacing "%some_pattern" % (some_list) by more > > efficient code. > > function call replacement might be possible, although detecting > side-effects is rather difficult thanks to descriptors allowing even > attribute access to execute a function. This only means that function side-effects depends on it's argument types. If we know the types of the arguments than we can expand any operator overloading. So (as I mentioned before) side-effects checking can't be done without type inference. Also this can't be done without value inference because we must know what functions are being called by current function. > > 4. Dead code elimination can be done as part of parial evaluation. Unused > > variable elimination (i.e. elimination of function calls if their result > > is unused) can be done too using information about side-effects. If > > variable is used only in one branch of execution it assignment can be > > moved into that branch. > > That might buy you something, but I doubt much. > > > 5. Common subexpression elimination (as well as moving common code > > outside loops) can be done if subexpression has no side-effects. This is > > even more actual in python than in static-typed languages because the > > code the.some.method(x) > > the.some.method(y) > > or > > for x in some_big_list: the.some.method(x) > > is very common. the.__getitem__("some").__getitem__("method") is the > > common code. > > > > 6. There are also some python-specific optimization, for example > > replacing range with xrange when possible, replacing the code > > (a,b)=(b,a) > > with the code > > t=a; a=b; b=t > > and so on. > > I think the peepholer does this as well, but a quick check didn't make it > obvious. This is only some examples that comes into my mind. There are others: converting lists to generators when possible, temporary lists elimination, memory-allocation related optimizations etc. > You might get something out of this, but once again it will probably be > tough. > > > All of this is high-level optimization, it should be used on top of the > > low-level optimizations. Of course all of this can be done by hands if > > programmer is clever enough, but sometimes the price for it is decreasing > > the code readability, abusing incapsulation, and so on, the result is > > increased maintenance cost. > > Right, which is why people tend not to publish major performance hacks one > can do in Python to gain a slight performance boost. > > > The result of the optimizer could be either optimized python source or > > compiled program. In the former case it can be then compiled by Jython, > > IronPython or PyPy. > > > > As I said before, this optimizations will give the best results it > > applied to the whole program with all of it's modules. The problem with > > compile-time to run-time integrity can be partly solved by checking used > > modules just before running the program and recompiling the program if > > needed. Maybe we can save taken assumptions about module's functions and > > check if that assumptions had changed, so full recompilation will be > > needed only rarely. In real-world applications only the small amount of > > modules actually changes often. The results of optimization of > > stand-alone modules can be improved by adding type annotations for > > module's functions. > > How would you work in the checks? Added code by your optimizer? Probably adding code by optimizer is the simplest solution. It won't hurt performance much in the case were no recompilation is needed. > > This project is different from python-to-C++ compilation (of course some > > correlations present). C++ can't represent a lot of python features, but > > optimized python program preserves all of them. Optimizer touches only > > the code that can be improved. > > > > Of course full implementation of all mentioned optimizations (and maybe > > even more) will take more than two month. But two month is sufficient to > > implement general framework and some (the most promising) optimization > > and test it. Of course the work done by others in the field of type > > inference algorithms can be very helpful if it is open. > > I personally don't know of any type inference implementations that are as > thorough as you want and that are publicly available. Yes, may be there is no ready-to-use code, but there are some theoretical work. > I realize I sound overly negative towards this proposal, but I just want > you to realize that this is a difficult problem. I like critique especially when it is constructive :-) It helps to find where I was wrong and what I forget. > If you can pull it off, > wonderful! Optimized Python code would be a great thing. And you should > still send in your proposal. I just think that the situation is more > complex than you think. I like difficult problems. Thanks a lot for your replies ! -- Best regards, Vladimir From physics at list.ru Fri Jun 10 14:51:53 2005 From: physics at list.ru (Vova) Date: Fri, 10 Jun 2005 16:51:53 +0400 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <8180ef69050610024436614a04@mail.gmail.com> References: <200506081908.20046.physics@list.ru> <200506100147.16962.physics@list.ru> <8180ef69050610024436614a04@mail.gmail.com> Message-ID: <200506101651.53540.physics@list.ru> Hello ! Again, just to clarify. My program will do global analysis of the source building data-flow graph. This graph makes possible to predict types and values of some variables and check functions for side-effects (depending on argument types). Using this information optimizer can make some good optimizations. Being well implemented it gives the following guarantees: 1. This will work for ANY python program. 2. Optimized program will always work the same as the original program. Optimizer will touch only parts that it can optimize. By supplying optimizer with some user-created information results can be improved, but this information is not required. The aims of this optimizer is to: 1. Allow programmers not to sacrifice readability and architecture of the code in favor of performance. 2. Allow programmers to use some nice language features (functional programming, for example) not thinking that this features are inefficient. 3. Allow improving old programs using new language features (for example using generators instead of lists). 4. Discover more about program-transformation algorithms. Compiling code to C++ does not give the same guarantees. It will work only for static programs, only for subset of python. How many real-world programs are in this subset ? But of course seep-up of such compilation will be greater. I think the aim of such compiler is to allow using static subset of python syntax to write fast programs (am I wrong?). Our projects is just different ones, however some correlations of course present. May be we can even help each other in overlapping areas. -- Best regards, Vladimir On Friday 10 June 2005 13:44, Mark Dufour wrote: > Hi Vova, > > It's very hard to prove anything about a program without a precise > type analysis. As Armin mentioned, implementing this alone, for > Python, represents quite an effort. But it is the most important thing > for optimizing pure Python: you can't specify types in Python (without > messing up your source code, or using Pyrex), but you can optimize > other things by hand. In my case, it's even more important, because > conversion to C++ essentially gives you most of the optimizations you > mention for free. A really high-level optimization that remains in > this case is for example trying to allocate things on the stack, or > even statically preallocate them (because you do this manually in > C++). Other examples of high-level optimizations imo are for example > optimization of bounds checking, optimizing memory layout in many > ways, and removing 'intermediate lists' as in functional language > compilers. > > But, I don't think a global approach can work well for even moderately > dynamic programs, as it's very hard to determine precisely what is > going on. (Consider just the use of reflection - it's formally > undecidable what kind of attribute names are involved, even without > user input.) A global approach then, can imo best consider a subset of > Python, and translate code into a language such as C++ (as it operates > at the same abstraction level as Python, and you get many > optimizations for free.) I really like the elegance of such a > solution: you can reuse lots of work done in for example GCC, and you > get the ultimate in speed for relatively 'static' programs - which > many people, or at least myself, mostly write. I love the syntax of > Python, but I don't really use for example dynamic typing for most of > the time (it's just convenient to be able to leave out type > declarations :D) > > On the other hand, a non-global approach I think cannot do many > high-level optimizations, as it doesn't have enough information or > (when done during run-time) does not have the time to calculate the > right information. A non-global, run-time approach does seem like the > best long-term solution. With Moore's law and all, it can optimize > most code to an acceptable level, and still be able to work with the > full Python semantics. > > So, I am left wondering a bit about the approach you would like to > take. If you take the global route, then why not convert to C++. But > that would be sort of the same thing as Starkiller and Shedskin (my > compiler) aim to do. If you take the non-global route, then real > high-level optimizations seem out of the question, or at least very > complicated? Maybe it would be best to look into the things Armin Rigo > and the others are doing with PyPy, perhaps find something you can > contribute there? > > Finally, I have no idea whether the source code for Starkiller is > available, or if so, if it's readable. The website seems gone, and I > don't know what happened. Well, I know my source code is available, > but not very readable -^ (just mail me, and I'll send you this 6000 > line can of worms) - I'll be probably still modifying it heavily for > the foreseeable future.. > > > Mark. > From mark.dufour at gmail.com Fri Jun 10 15:39:44 2005 From: mark.dufour at gmail.com (Mark Dufour) Date: Fri, 10 Jun 2005 15:39:44 +0200 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <200506101651.53540.physics@list.ru> References: <200506081908.20046.physics@list.ru> <200506100147.16962.physics@list.ru> <8180ef69050610024436614a04@mail.gmail.com> <200506101651.53540.physics@list.ru> Message-ID: <8180ef690506100639771b5526@mail.gmail.com> Hi Vova, You're right, conversion to C++ cannot work for many Python programs. But how many programs are written in C++, as opposed to Python? -^ My aim is to be able to use Python as a 'high-level C++', so that you both get a nice syntax, as well as very efficient code (of course programmers need to realize what kind of compiler they are dealing with, as always..) I am just worried that if you plan on doing a _global_ dataflow analysis, it will be difficult to remain precise, when all sort of dynamic things happen in the code. I'm not sure, but I think the people of PyPy are already working heavily on the kinds of optimizations as you are talking about, but applying it during run-time, so they can be somewhat precise for dynamic code - ie work for any Python program (Armin? :)) I guess it would be cool if you could join their efforts, maybe by submitting a proposal for implementing a certain feature? As for my type inference code, it will probably not be very stable for at least a few more months. Of course, instead of generating C++ code, it could be used for other purposes. Hm, if you would like to get a 'good' overview of the theoretical work done on type inference for dynamic languages, you might check out my survey at http://kascade.org/optimizing_python.pdf. I spent a lot of time going through the literature.. Mark. On 6/10/05, Vova wrote: > Hello ! > Again, just to clarify. My program will do global analysis of the source > building data-flow graph. This graph makes possible to predict types and > values of some variables and check functions for side-effects (depending on > argument types). Using this information optimizer can make some good > optimizations. Being well implemented it gives the following guarantees: > 1. This will work for ANY python program. > 2. Optimized program will always work the same as the original program. > Optimizer will touch only parts that it can optimize. By supplying optimizer > with some user-created information results can be improved, but this > information is not required. > > The aims of this optimizer is to: > 1. Allow programmers not to sacrifice readability and architecture of the code > in favor of performance. > 2. Allow programmers to use some nice language features (functional > programming, for example) not thinking that this features are inefficient. > 3. Allow improving old programs using new language features (for example using > generators instead of lists). > 4. Discover more about program-transformation algorithms. > > Compiling code to C++ does not give the same guarantees. It will work only for > static programs, only for subset of python. How many real-world programs are > in this subset ? But of course seep-up of such compilation will be greater. I > think the aim of such compiler is to allow using static subset of python > syntax to write fast programs (am I wrong?). > > Our projects is just different ones, however some correlations of course > present. May be we can even help each other in overlapping areas. > > -- > Best regards, > Vladimir > > On Friday 10 June 2005 13:44, Mark Dufour wrote: > > Hi Vova, > > > > It's very hard to prove anything about a program without a precise > > type analysis. As Armin mentioned, implementing this alone, for > > Python, represents quite an effort. But it is the most important thing > > for optimizing pure Python: you can't specify types in Python (without > > messing up your source code, or using Pyrex), but you can optimize > > other things by hand. In my case, it's even more important, because > > conversion to C++ essentially gives you most of the optimizations you > > mention for free. A really high-level optimization that remains in > > this case is for example trying to allocate things on the stack, or > > even statically preallocate them (because you do this manually in > > C++). Other examples of high-level optimizations imo are for example > > optimization of bounds checking, optimizing memory layout in many > > ways, and removing 'intermediate lists' as in functional language > > compilers. > > > > But, I don't think a global approach can work well for even moderately > > dynamic programs, as it's very hard to determine precisely what is > > going on. (Consider just the use of reflection - it's formally > > undecidable what kind of attribute names are involved, even without > > user input.) A global approach then, can imo best consider a subset of > > Python, and translate code into a language such as C++ (as it operates > > at the same abstraction level as Python, and you get many > > optimizations for free.) I really like the elegance of such a > > solution: you can reuse lots of work done in for example GCC, and you > > get the ultimate in speed for relatively 'static' programs - which > > many people, or at least myself, mostly write. I love the syntax of > > Python, but I don't really use for example dynamic typing for most of > > the time (it's just convenient to be able to leave out type > > declarations :D) > > > > On the other hand, a non-global approach I think cannot do many > > high-level optimizations, as it doesn't have enough information or > > (when done during run-time) does not have the time to calculate the > > right information. A non-global, run-time approach does seem like the > > best long-term solution. With Moore's law and all, it can optimize > > most code to an acceptable level, and still be able to work with the > > full Python semantics. > > > > So, I am left wondering a bit about the approach you would like to > > take. If you take the global route, then why not convert to C++. But > > that would be sort of the same thing as Starkiller and Shedskin (my > > compiler) aim to do. If you take the non-global route, then real > > high-level optimizations seem out of the question, or at least very > > complicated? Maybe it would be best to look into the things Armin Rigo > > and the others are doing with PyPy, perhaps find something you can > > contribute there? > > > > Finally, I have no idea whether the source code for Starkiller is > > available, or if so, if it's readable. The website seems gone, and I > > don't know what happened. Well, I know my source code is available, > > but not very readable -^ (just mail me, and I'll send you this 6000 > > line can of worms) - I'll be probably still modifying it heavily for > > the foreseeable future.. > > > > > > Mark. > > > -- if vars: self.output('; '.join([self.nodetype(var)+' '+name for (name,var) in vars.items()])+';') From physics at list.ru Fri Jun 10 16:29:56 2005 From: physics at list.ru (Vova) Date: Fri, 10 Jun 2005 18:29:56 +0400 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <8180ef690506100639771b5526@mail.gmail.com> References: <200506081908.20046.physics@list.ru> <200506101651.53540.physics@list.ru> <8180ef690506100639771b5526@mail.gmail.com> Message-ID: <200506101829.56573.physics@list.ru> On Friday 10 June 2005 17:39, Mark Dufour wrote: > Hi Vova, > > You're right, conversion to C++ cannot work for many Python programs. > But how many programs are written in C++, as opposed to Python? But how many C++ programmers do not like syntax of C++ and wants something different ? Python and C++ are different. Using python-to-c++ compiler one is allowed only to use the intersection of python and c++ features. > -^ My > aim is to be able to use Python as a 'high-level C++', so that you > both get a nice syntax, as well as very efficient code (of course > programmers need to realize what kind of compiler they are dealing > with, as always..) > > I am just worried that if you plan on doing a _global_ dataflow > analysis, it will be difficult to remain precise, when all sort of > dynamic things happen in the code. What do you mean by "precise" ? Of course, maybe it will not guess all possible information about program, but it will never make incorrect assumptions by design. It will never use proof-by-contradiction when full information is unavailable. > I'm not sure, but I think the > people of PyPy are already working heavily on the kinds of > optimizations as you are talking about, but applying it during > run-time Some kinds of this optimization simply can't be make at run-time. Moreover making optimization at runtime takes execution time too. My approach is different. > , so they can be somewhat precise for dynamic code - ie work > for any Python program (Armin? :)) I guess it would be cool if you > could join their efforts, maybe by submitting a proposal for > implementing a certain feature? Cooperation is good. Implementing my project I want to learn more about the subject and test some of my assumptions. Of course I will be glad if some of my results will be used in PyPy or some other projects. Anyway thanks for link. > As for my type inference code, it will probably not be very stable for > at least a few more months. Of course, instead of generating C++ code, > it could be used for other purposes. I think discussion is more important than code exchange at least for now while I just have no ready code to share. > Hm, if you would like to get a > 'good' overview of the theoretical work done on type inference for > dynamic languages, you might check out my survey at > http://kascade.org/optimizing_python.pdf. Thanks. It is quite informal. > I spent a lot of time going > through the literature.. -- Best regards, Vladimir > > Mark. > > On 6/10/05, Vova wrote: > > Hello ! > > Again, just to clarify. My program will do global analysis of the source > > building data-flow graph. This graph makes possible to predict types and > > values of some variables and check functions for side-effects (depending > > on argument types). Using this information optimizer can make some good > > optimizations. Being well implemented it gives the following guarantees: > > 1. This will work for ANY python program. > > 2. Optimized program will always work the same as the original program. > > Optimizer will touch only parts that it can optimize. By supplying > > optimizer with some user-created information results can be improved, but > > this information is not required. > > > > The aims of this optimizer is to: > > 1. Allow programmers not to sacrifice readability and architecture of the > > code in favor of performance. > > 2. Allow programmers to use some nice language features (functional > > programming, for example) not thinking that this features are > > inefficient.. 3. Allow improving old programs using new language features > > (for example using generators instead of lists). > > 4. Discover more about program-transformation algorithms. > > > > Compiling code to C++ does not give the same guarantees. It will work > > only for static programs, only for subset of python. How many real-world > > programs are in this subset ? But of course seep-up of such compilation > > will be greater. I think the aim of such compiler is to allow using > > static subset of python syntax to write fast programs (am I wrong?). > > > > Our projects is just different ones, however some correlations of course > > present. May be we can even help each other in overlapping areas. > > > > -- > > Best regards, > > Vladimir > > > > On Friday 10 June 2005 13:44, Mark Dufour wrote: > > > Hi Vova, > > > > > > It's very hard to prove anything about a program without a precise > > > type analysis. As Armin mentioned, implementing this alone, for > > > Python, represents quite an effort. But it is the most important thing > > > for optimizing pure Python: you can't specify types in Python (without > > > messing up your source code, or using Pyrex), but you can optimize > > > other things by hand. In my case, it's even more important, because > > > conversion to C++ essentially gives you most of the optimizations you > > > mention for free. A really high-level optimization that remains in > > > this case is for example trying to allocate things on the stack, or > > > even statically preallocate them (because you do this manually in > > > C++). Other examples of high-level optimizations imo are for example > > > optimization of bounds checking, optimizing memory layout in many > > > ways, and removing 'intermediate lists' as in functional language > > > compilers. > > > > > > But, I don't think a global approach can work well for even moderately > > > dynamic programs, as it's very hard to determine precisely what is > > > going on. (Consider just the use of reflection - it's formally > > > undecidable what kind of attribute names are involved, even without > > > user input.) A global approach then, can imo best consider a subset of > > > Python, and translate code into a language such as C++ (as it operates > > > at the same abstraction level as Python, and you get many > > > optimizations for free.) I really like the elegance of such a > > > solution: you can reuse lots of work done in for example GCC, and you > > > get the ultimate in speed for relatively 'static' programs - which > > > many people, or at least myself, mostly write. I love the syntax of > > > Python, but I don't really use for example dynamic typing for most of > > > the time (it's just convenient to be able to leave out type > > > declarations :D) > > > > > > On the other hand, a non-global approach I think cannot do many > > > high-level optimizations, as it doesn't have enough information or > > > (when done during run-time) does not have the time to calculate the > > > right information. A non-global, run-time approach does seem like the > > > best long-term solution. With Moore's law and all, it can optimize > > > most code to an acceptable level, and still be able to work with the > > > full Python semantics. > > > > > > So, I am left wondering a bit about the approach you would like to > > > take. If you take the global route, then why not convert to C++. But > > > that would be sort of the same thing as Starkiller and Shedskin (my > > > compiler) aim to do. If you take the non-global route, then real > > > high-level optimizations seem out of the question, or at least very > > > complicated? Maybe it would be best to look into the things Armin Rigo > > > and the others are doing with PyPy, perhaps find something you can > > > contribute there? > > > > > > Finally, I have no idea whether the source code for Starkiller is > > > available, or if so, if it's readable. The website seems gone, and I > > > don't know what happened. Well, I know my source code is available, > > > but not very readable -^ (just mail me, and I'll send you this 6000 > > > line can of worms) - I'll be probably still modifying it heavily for > > > the foreseeable future.. > > > > > > > > > Mark. From physics at list.ru Fri Jun 10 16:35:23 2005 From: physics at list.ru (Vova) Date: Fri, 10 Jun 2005 18:35:23 +0400 Subject: [summerofcode] High-level python optimizer. In-Reply-To: References: <200506081908.20046.physics@list.ru> <200506101651.53540.physics@list.ru> Message-ID: <200506101835.23639.physics@list.ru> On Friday 10 June 2005 17:21, LD "Gus" Landis wrote: > Vladimir, > > Good luck... Thanks a lot ! :-) > but recall that to get the $$ you have to complete the > task. Be very careful to not bite off more than you can get done in > only a few (less than 10) weeks! Yes, I know. I think it's really sufficient to implement the general framework (code analyser and interface to adding custom optimizations) and some of (the most promising) optimizations. -- Best regards, Vladimir > > Cheers, > --ldl From ndimiduk at gmail.com Sat Jun 11 02:55:12 2005 From: ndimiduk at gmail.com (Nick Dimiduk) Date: Fri, 10 Jun 2005 20:55:12 -0400 Subject: [summerofcode] stdlib port to python In-Reply-To: <20050609161259.GA4255@code1.codespeak.net> References: <20050605084500.GO5694@solar.trillke.net> <20050605112555.GA7116@code1.codespeak.net> <20050609161259.GA4255@code1.codespeak.net> Message-ID: <86e557c050610175513543b70@mail.gmail.com> I have stumbled upon issue 67 in your issues database: https://codespeak.net/issue/pypy-dev/issue67. How about implementing sre and/or math? I have a recent co of pypy (within the last couple days) and I see that pypy/lib/cmath.py exists, however pypy/module/_sre_pypy/__init__.py claims the file to ba a wrapper for calls to the host implementation. Any thoughts on implementing these two modules over the course of the summer? Too much? Not enough? Thanks once more, -Nick Dimiduk On 6/9/05, Armin Rigo wrote: > Hi all, > > On Sun, Jun 05, 2005 at 01:25:55PM +0200, Armin Rigo wrote: > > collections > > Correction: this module is already in the Python sandbox > (http://cvs.sourceforge.net/viewcvs.py/python/python/nondist/sandbox/collections/). > In general it's a good idea to check here, in addition to Googling a > bit, to make sure no one else has a Python implementation already. > > > A bientot, > > Armin. > _______________________________________________ > summerofcode mailing list > summerofcode at python.org > http://mail.python.org/mailman/listinfo/summerofcode > From tomas.horacek at gmail.com Sat Jun 11 15:06:11 2005 From: tomas.horacek at gmail.com (Tomas Horacek) Date: Sat, 11 Jun 2005 15:06:11 +0200 Subject: [summerofcode] Enhance the Python catalog of modules Message-ID: <3037eada050611060616ba2cc8@mail.gmail.com> Hi, I would like to work on project called "Enhance the Python catalog of modules". The description of project at http://wiki.python.org/moin/CodingProjectIdeas isn't very concrete... I have written an email to Catalog-SIG but they haven't responded me on what should be done in this project. So I have gone to Catalog-SIG mailing list archives and started reading. I have many ideas but I would like to know what should be done in this project from submitter of this project idea (or someone who know it). Sincerely Tomas Horacek From arigo at tunes.org Sat Jun 11 15:35:05 2005 From: arigo at tunes.org (Armin Rigo) Date: Sat, 11 Jun 2005 15:35:05 +0200 Subject: [summerofcode] stdlib port to python In-Reply-To: <86e557c050610175513543b70@mail.gmail.com> References: <20050605084500.GO5694@solar.trillke.net> <20050605112555.GA7116@code1.codespeak.net> <20050609161259.GA4255@code1.codespeak.net> <86e557c050610175513543b70@mail.gmail.com> Message-ID: <20050611133505.GA31504@code1.codespeak.net> Hi Nick, On Fri, Jun 10, 2005 at 08:55:12PM -0400, Nick Dimiduk wrote: > I have stumbled upon issue 67 in your issues database: > https://codespeak.net/issue/pypy-dev/issue67. How about implementing > sre and/or math? I have a recent co of pypy (within the last couple > days) and I see that pypy/lib/cmath.py exists, however > pypy/module/_sre_pypy/__init__.py claims the file to ba a wrapper for > calls to the host implementation. Any thoughts on implementing these > two modules over the course of the summer? Too much? Not enough? That's an excellent plan! The two modules are quite different. The way the math module should be done for PyPy is a bit unclear so far, but it should be mostly a thin wrapper around math functions taken from the host environment. Such a thing would be short and specific to PyPy. What needs to be discussed is how exactly this can be written, so that later translation phases know to which C/Java/etc. routines the wrapper actually refer to. The _sre module, on the other hand, would be a self-contained "normal" Python module that would be useful in general, for experimentation and for all Python reimplementations. It's much more work; I guess that it would come close to the two months of the summer of code plan. It's also something that PyPy needs quite soon. The Python version should be based on Python 2.4's (or CVS's) version of 'Modules/_sre.c', and not 2.3, as there were some changes. (There is also a Java version of a still older _sre in Jython, if you want to have a look at it.) While it's still unclear to me how many proposals the PSF can accept, and if and how many of them could have a PyPy orientation, we are definitely looking forward to your proposal :-) A bientot, Armin From arigo at tunes.org Sat Jun 11 16:11:09 2005 From: arigo at tunes.org (Armin Rigo) Date: Sat, 11 Jun 2005 16:11:09 +0200 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <8180ef690506100639771b5526@mail.gmail.com> References: <200506081908.20046.physics@list.ru> <200506100147.16962.physics@list.ru> <8180ef69050610024436614a04@mail.gmail.com> <200506101651.53540.physics@list.ru> <8180ef690506100639771b5526@mail.gmail.com> Message-ID: <20050611141109.GA31751@code1.codespeak.net> Hi Mark, hi Vova, Vova: I think you are missing some crucial points on how Python works. If some parts of the program are not completely known or analyzable, then it doesn't just mean that these parts cannot be analyzed and optimized. It means that all the information about the complete program is potentially wrong. Consider the following simple example: in module 'foo.py', two functions f() and g() call each other. Now in some completely unrelated part of the program, there is an 'exec' statement. Most probably, it's not possible to know statically what the 'exec' statement will do. Maybe the string that reaches the 'exec' will be at run-time "import foo; foo.g=some_other_function". In this case, your call graph suddenly becomes invalid. This is only an example, though. It could contain much more funny stuff. Here are a few other examples in which I tried to have at least one invalidating example for each invariant you talked about: math.sin = newfunction foo.factorial = newfunction instance.__class__ = newclass SomeClass.__add__ = newmethod SomeClass.__bases__ = (NewBaseClass,) reload(mymodule) somefunction.func_defaults = ('yadda',) somefunction.func_code = newcodeobject __builtin__.len = newfunction setattr(instance, name, value) # where 'name' shadows a method Some of these examples are pretty silly, but they just show that you cannot guarantee correctness. Brett's thesis was about as far as it's possible to go in this direction. (You are falling in a common pitfall, though: it's not the first time someone puts forwards arguments like yours.) On Fri, Jun 10, 2005 at 03:39:44PM +0200, Mark Dufour wrote: > I am just worried that if you plan on doing a _global_ dataflow > analysis, it will be difficult to remain precise, when all sort of > dynamic things happen in the code. I'm not sure, but I think the > people of PyPy are already working heavily on the kinds of > optimizations as you are talking about, but applying it during > run-time, so they can be somewhat precise for dynamic code - ie work > for any Python program (Armin? :)) We have a two-stage approach; right now, we are working on static analysis of a subset of Python. Later, we will extend these techniques to perform an approximative analysis of full Python, but at run-time. Psyco does extreme run-time-only analysis; we will use similar ideas, while trying to combine the advantages of static and run-time analysis (e.g. saving some information as hints between sessions). PyPy has been built from the start with the idea of enabling such a balance between compile- and run-time optimizations. A bientot, Armin. From nhaldimann at gmx.ch Sat Jun 11 17:02:04 2005 From: nhaldimann at gmx.ch (Niklaus Haldimann) Date: Sat, 11 Jun 2005 17:02:04 +0200 Subject: [summerofcode] stdlib port to python In-Reply-To: <20050611133505.GA31504@code1.codespeak.net> References: <20050605084500.GO5694@solar.trillke.net> <20050605112555.GA7116@code1.codespeak.net> <20050609161259.GA4255@code1.codespeak.net> <86e557c050610175513543b70@mail.gmail.com> <20050611133505.GA31504@code1.codespeak.net> Message-ID: <42AAFCEC.4040904@gmx.ch> Hi there Armin Rigo wrote: > The _sre module, on the other hand, would be a self-contained "normal" > Python module that would be useful in general, for experimentation and > for all Python reimplementations. It's much more work; I guess that it > would come close to the two months of the summer of code plan. It's > also something that PyPy needs quite soon. The Python version should be > based on Python 2.4's (or CVS's) version of 'Modules/_sre.c', and not > 2.3, as there were some changes. (There is also a Java version of a > still older _sre in Jython, if you want to have a look at it.) Just FYI, I have submitted a proposal about porting _sre two days ago. In my proposal I am explicitly targetting PyPy and IronPython (I figured Jython doesn't necessarily need a Python _sre since it has its own implementation). After looking at the code a bit closer I estimated roughly 3 weeks (+ a 1.5 weeks buffer) for porting it to (R)Python. My impression was that the design of _sre.c is pretty rigid, porting it would mean doing a somewhat mechanical translation from C to Python code. Your 2 months estimate makes me a bit unsure, now. ;) Can you say something about why you think it would be that much work? To keep me busy for the rest of SoC my proposal also includes porting the array module to Python. AFAIK no Python version of arraymodule.c exists (Jython has a Java version, IronPython has no array module at all). If a Python array module exists somewhere or if there are already ongoing efforts to create one, I would love to hear about it since there is not much time left to correct my proposal. ;) Cheers, Nik From python at jogg.de Sat Jun 11 23:42:58 2005 From: python at jogg.de (Johann C. Rocholl) Date: Sat, 11 Jun 2005 23:42:58 +0200 Subject: [summerofcode] Project proposal Message-ID: <20050611214258.GA18619@rocholl.net> Hi all, this is a shameless plug for my project. But I am also looking for a mentor for Google's Summer of Code. The project is an open-source system for distributed automatic production of browser screenshots, and it is already in public beta. http://www.browsershots.org/ Here is a detailed roadmap for my SoC proposal. http://www.browsershots.org/doc/roadmap/ Why would I post this to summerofcode at python.org? - First of all, shameless plug. - I have applied with Google as a mentoring organization, but they have very many applications. - The server and the distributed screenshot factories are written completely in Python, except for the multi-page merging, which is in Ada for performance, and the queries to the MySQL database, which are in SQL, and some extra tools (bash or Makefile). - Some of the work that I plan on doing will directly benefit Python libraries. For example, it seems that I will have to patch urllib2 to use HTTPS via CONNECT through a web proxy like Squid. - One of the packages I release with the project is called liteweb and is a very very ligthweight collection of utilities for mod_python. - I have followed the python-list for a while, and I like the Python community. - Perhaps somebody is interested in mentoring this project? If you are interested, please let me know. I can also send a copy of my original SoC application. Cheers, Johann From physics at list.ru Sun Jun 12 13:23:58 2005 From: physics at list.ru (Vova) Date: Sun, 12 Jun 2005 15:23:58 +0400 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <20050611141109.GA31751@code1.codespeak.net> References: <200506081908.20046.physics@list.ru> <8180ef690506100639771b5526@mail.gmail.com> <20050611141109.GA31751@code1.codespeak.net> Message-ID: <200506121523.58119.physics@list.ru> Hello Armin ! On Saturday 11 June 2005 18:11, you wrote: > Hi Mark, hi Vova, > > Vova: I think you are missing some crucial points on how Python works. > If some parts of the program are not completely known or analyzable, > then it doesn't just mean that these parts cannot be analyzed and > optimized. It means that all the information about the complete program > is potentially wrong. Consider the following simple example: in module > 'foo.py', two functions f() and g() call each other. Now in some > completely unrelated part of the program, there is an 'exec' statement. > Most probably, it's not possible to know statically what the 'exec' > statement will do. Maybe the string that reaches the 'exec' will be at > run-time "import foo; foo.g=some_other_function". In this case, your > call graph suddenly becomes invalid. Ok, you are right, exec is a bad thing for my algorithm. When control flow reaches exec statement (or any other unknown code without annotation) analyser must forget all assumptions. But before exec that assumptions are right. And after exec there may be new assumptions (of course only about local scopes). The best what can be done is inspecting new code at run-time, modifying assumptions appropriately and recompiling if they had changed. Let's try to see how often exec (and compile) are used in real programs. I've checked some big python projects (I hope the list was random chosen): BitTorrent: not used Mailman: not used PIL: not used (actually used once in unit-tests framework) Plone: used a lot PyRex: not used Portage: not used SCons: used With Plone situation is really bad. It uses a lot of external scripts and does a lot of dynamic tricks (even more interesting than your examples below), so without user interaction it can't be optimized a lot. Let's look inside SCons. It uses exec in the file Script/SConscript.py for executing user-supplied scripts. But these script are executed in specially created scope, and not intended to modify anything outside from this scope. If this information can be passed to analyser manually it can still work. And finally let's look for some timings: from timeit import Timer print Timer('pass', 'pass').timeit() print Timer('f()', 'def f(): pass').timeit() print Timer('for i in xrange(5): pass', 'pass').timeit() print Timer('for i in range(5): pass', 'pass').timeit() this code prints on my machine: 0.0886490345001 0.522771120071 1.64868998528 2.10483407974 Comparing lines 1 and 2 gives some estimation how much can we can get from function inlining (for object methods it's even more actual). Just look at any object-oriented program and count how many it has one-line functions and how often they are called. Comparing lines 1 and 3 gives estimation for loop-unrolling. This is only random examples. > This is only an example, though. It could contain much more funny > stuff. Here are a few other examples in which I tried to have at least > one invalidating example for each invariant you talked about: > > math.sin = newfunction > foo.factorial = newfunction > instance.__class__ = newclass > SomeClass.__add__ = newmethod > SomeClass.__bases__ = (NewBaseClass,) > reload(mymodule) > somefunction.func_defaults = ('yadda',) > somefunction.func_code = newcodeobject > __builtin__.len = newfunction > setattr(instance, name, value) # where 'name' shadows a method As I said before these all can be tracked. > Some of these examples are pretty silly, but they just show that you > cannot guarantee correctness. Brett's thesis was about as far as it's > possible to go in this direction. (You are falling in a common pitfall, > though: it's not the first time someone puts forwards arguments like > yours.) > > On Fri, Jun 10, 2005 at 03:39:44PM +0200, Mark Dufour wrote: > > I am just worried that if you plan on doing a _global_ dataflow > > analysis, it will be difficult to remain precise, when all sort of > > dynamic things happen in the code. I'm not sure, but I think the > > people of PyPy are already working heavily on the kinds of > > optimizations as you are talking about, but applying it during > > run-time, so they can be somewhat precise for dynamic code - ie work > > for any Python program (Armin? :)) > > We have a two-stage approach; right now, we are working on static > analysis of a subset of Python. Later, we will extend these techniques > to perform an approximative analysis of full Python, but at run-time. > Psyco does extreme run-time-only analysis; we will use similar ideas, > while trying to combine the advantages of static and run-time analysis > (e.g. saving some information as hints between sessions). PyPy has been > built from the start with the idea of enabling such a balance between > compile- and run-time optimizations. Yes, this is promising. But for run-time optimization it's really important that optimizer must take not more time that it saves from program execution. It prohibits some optimizations at all. -- Best regards, Vladimir From arigo at tunes.org Sun Jun 12 13:53:18 2005 From: arigo at tunes.org (Armin Rigo) Date: Sun, 12 Jun 2005 13:53:18 +0200 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <200506121523.58119.physics@list.ru> References: <200506081908.20046.physics@list.ru> <8180ef690506100639771b5526@mail.gmail.com> <20050611141109.GA31751@code1.codespeak.net> <200506121523.58119.physics@list.ru> Message-ID: <20050612115318.GA23412@code1.codespeak.net> Hi Vova, On Sun, Jun 12, 2005 at 03:23:58PM +0400, Vova wrote: > Ok, you are right, exec is a bad thing for my algorithm. Once you agree to that, the next step is to realize that you don't actually need an "exec" statement for equally bad things to happen. Strange code can perform arbitrary computations whose side effects include changes to global invariants in ways that cannot easily be tracked. You will likely find yourself defining a number of "forbidden" things that can potentially break the whole idea. Here is a very short list: - all exec's, eval(), execfile(), new.code(), marshal.load() - sys.path manipulations that control where "import" statements will find modules at run-time - __import__() where the module name cannot be predicted - setattr(), delattr() where the attribute name cannot be predicted - calling any built-in function or type that you don't know about (!!! this one is a killer! quite a lot of efforts and maintenance) - passing around or storing some types of objects in containers where they won't be individually trackable any more, if they are then used in a way that might possibly mutate them and break invariants (functions, classes, types, modules, ...) The list could be much longer. The point is that you need, in Mark's terms, a closed world assumption and a subset of Python in order to do any meaningful static upper-bound type/value inference. We even have Brett's Thesis now, which shows exactly how far you can go if you don't assume either of this. If you make these assumptions, though, then your project becomes realistic, but similar to existing projects. A bientot, Armin. From arigo at tunes.org Sun Jun 12 14:04:51 2005 From: arigo at tunes.org (Armin Rigo) Date: Sun, 12 Jun 2005 14:04:51 +0200 Subject: [summerofcode] stdlib port to python In-Reply-To: <42AAFCEC.4040904@gmx.ch> References: <20050605084500.GO5694@solar.trillke.net> <20050605112555.GA7116@code1.codespeak.net> <20050609161259.GA4255@code1.codespeak.net> <86e557c050610175513543b70@mail.gmail.com> <20050611133505.GA31504@code1.codespeak.net> <42AAFCEC.4040904@gmx.ch> Message-ID: <20050612120450.GA23493@code1.codespeak.net> Hi Niklaus, On Sat, Jun 11, 2005 at 05:02:04PM +0200, Niklaus Haldimann wrote: > >The _sre module, on the other hand, would be a self-contained "normal" > >Python module that would be useful in general, for experimentation and > >for all Python reimplementations. It's much more work; I guess that it > >would come close to the two months of the summer of code plan. > Just FYI, I have submitted a proposal about porting _sre two days ago. > In my proposal I am explicitly targetting PyPy and IronPython (I figured > Jython doesn't necessarily need a Python _sre since it has its own > implementation). After looking at the code a bit closer I estimated > roughly 3 weeks (+ a 1.5 weeks buffer) for porting it to (R)Python. Ah, yes, it's a bit difficult to make estimates. After some more consultations, it seems that 4 weeks would be realistic for a regular Python module. Some more 1-2 weeks might be needed if you want to target PyPy's RPython, because some familiarity with it would be needed. The particular issue in this case is that the _sre module can work both on strings and unicode objects. The _sre.c version does #include tricks to basically compile parts of itself twice, once for each type. To get the same effects in RPython, some (probably different) tricks are needed too. The 1-2 extra weeks would be to discuss and implement this kind of tricks. > To keep me busy for the rest of SoC my proposal also includes porting > the array module to Python. Yes, that would be welcome too. The combination _sre+array looks like a good amount of work. Nick's proposal, _sre+math, is a good amount of work as well, because the math module needs much tighter integration with PyPy than the array module. The array module would be more general-purpose. Armin From physics at list.ru Sun Jun 12 14:16:14 2005 From: physics at list.ru (Vova) Date: Sun, 12 Jun 2005 16:16:14 +0400 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <20050612115318.GA23412@code1.codespeak.net> References: <200506081908.20046.physics@list.ru> <200506121523.58119.physics@list.ru> <20050612115318.GA23412@code1.codespeak.net> Message-ID: <200506121616.14941.physics@list.ru> Hello ! On Sunday 12 June 2005 15:53, you wrote: > Hi Vova, > > On Sun, Jun 12, 2005 at 03:23:58PM +0400, Vova wrote: > > Ok, you are right, exec is a bad thing for my algorithm. > > Once you agree to that, the next step is to realize that you don't > actually need an "exec" statement for equally bad things to happen. > Strange code can perform arbitrary computations whose side effects > include changes to global invariants in ways that cannot easily be > tracked. You will likely find yourself defining a number of "forbidden" > things that can potentially break the whole idea. Here is a very short > list: > > - all exec's, eval(), execfile(), new.code(), marshal.load() > - sys.path manipulations that control where "import" statements will > find modules at run-time > - __import__() where the module name cannot be predicted > - setattr(), delattr() where the attribute name cannot be predicted > - calling any built-in function or type that you don't know about > (!!! this one is a killer! quite a lot of efforts and maintenance) > - passing around or storing some types of objects in containers where > they won't be individually trackable any more, if they are then used > in a way that might possibly mutate them and break invariants > (functions, classes, types, modules, ...) All of this is either used quite rarely or used in predictable way (i.e. programer can manually supply analyser with information using some kind of code annotations). The only question is does given speed-up costs annotation effort. I believe that it do. And again: how many programs are actually executing unknown code ? > The list could be much longer. The point is that you need, in Mark's > terms, a closed world assumption and a subset of Python in order to do > any meaningful static upper-bound type/value inference. We even have > Brett's Thesis now, which shows exactly how far you can go if you don't > assume either of this. > > If you make these assumptions, though, then your project becomes > realistic, but similar to existing projects. > > > A bientot, > > Armin. From nhaldimann at gmx.ch Sun Jun 12 16:06:07 2005 From: nhaldimann at gmx.ch (Niklaus Haldimann) Date: Sun, 12 Jun 2005 16:06:07 +0200 Subject: [summerofcode] stdlib port to python In-Reply-To: <20050612120450.GA23493@code1.codespeak.net> References: <20050605084500.GO5694@solar.trillke.net> <20050605112555.GA7116@code1.codespeak.net> <20050609161259.GA4255@code1.codespeak.net> <86e557c050610175513543b70@mail.gmail.com> <20050611133505.GA31504@code1.codespeak.net> <42AAFCEC.4040904@gmx.ch> <20050612120450.GA23493@code1.codespeak.net> Message-ID: <42AC414F.5060906@gmx.ch> Hi Armin Armin Rigo wrote: > Ah, yes, it's a bit difficult to make estimates. After some more > consultations, it seems that 4 weeks would be realistic for a regular > Python module. Some more 1-2 weeks might be needed if you want to > target PyPy's RPython, because some familiarity with it would be needed. > The particular issue in this case is that the _sre module can work both > on strings and unicode objects. The _sre.c version does #include tricks > to basically compile parts of itself twice, once for each type. To get > the same effects in RPython, some (probably different) tricks are needed > too. The 1-2 extra weeks would be to discuss and implement this kind of > tricks. I see. Thanks for your input. All I know about RPython comes from skimming the PyPy coding guide, so it's very likely that I don't understand all the issues around it. It didn't occur to me that the string/unicode dichotomy could be a problem, since I vaguely assumed a common superclass exists to which PyPy can apply its magic. ;) I guess with these issues in mind, I will experiment with PyPy and RPython a bit more in the next days. Cheers Nik From arigo at tunes.org Sun Jun 12 19:28:26 2005 From: arigo at tunes.org (Armin Rigo) Date: Sun, 12 Jun 2005 19:28:26 +0200 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <200506121616.14941.physics@list.ru> References: <200506081908.20046.physics@list.ru> <200506121523.58119.physics@list.ru> <20050612115318.GA23412@code1.codespeak.net> <200506121616.14941.physics@list.ru> Message-ID: <20050612172826.GA25009@code1.codespeak.net> Hi Vova, On Sun, Jun 12, 2005 at 04:16:14PM +0400, Vova wrote: > All of this is either used quite rarely or used in predictable way (i.e. > programer can manually supply analyser with information using some kind of > code annotations). The only question is does given speed-up costs annotation > effort. I believe that it do. I just wanted to make this point. You are effectively targetting a subset of Python in which the programmer cannot use some of the reflective features, and/or in which he must add annotations to guide or give promizes to the type inferencer. This is all good as long as it's clear from the beginning. > And again: how many programs are actually executing unknown code ? Most large programs use them at least a little bit. For example, many known frameworks are full of import-time hacks. Armin From physics at list.ru Sun Jun 12 19:59:10 2005 From: physics at list.ru (Vova) Date: Sun, 12 Jun 2005 21:59:10 +0400 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <20050612172826.GA25009@code1.codespeak.net> References: <200506081908.20046.physics@list.ru> <200506121616.14941.physics@list.ru> <20050612172826.GA25009@code1.codespeak.net> Message-ID: <200506122159.10975.physics@list.ru> Hello Armin ! On Sunday 12 June 2005 21:28, you wrote: > Hi Vova, > On Sun, Jun 12, 2005 at 04:16:14PM +0400, Vova wrote: > > All of this is either used quite rarely or used in predictable way (i.e. > > programer can manually supply analyser with information using some kind > > of code annotations). The only question is does given speed-up costs > > annotation effort. I believe that it do. > > I just wanted to make this point. You are effectively targetting a > subset of Python in which the programmer cannot use some of the > reflective features, and/or in which he must add annotations to guide or > give promizes to the type inferencer. This is all good as long as it's > clear from the beginning. Ok, let it be. My optimizer will never hurt any program regardless the features it uses. Moreover it can do some optimization to any program (at least optimizations that touches only local variables and branches where no unknown code would had be executed). But to get the best one must either use it for complete code or add annotations about absent code. I'll try to make adding annotations as easier as possible. > > And again: how many programs are actually executing unknown code ? > Most large programs use them at least a little bit. For example, many > known frameworks are full of import-time hacks. > If it uses them only a bit than adding annotations will not be vary hard. Anyway, thanks for your attention and explanations ! -- Best regards, Vladimir From fcano at ono.com Sun Jun 12 21:40:50 2005 From: fcano at ono.com (Florencio Cano Gabarda) Date: Sun, 12 Jun 2005 21:40:50 +0200 Subject: [summerofcode] SSL mentoring In-Reply-To: References: Message-ID: <20050612213904.2542.FCANO@ono.com> Sorry can you explain better what do you mean? I did't see Elemental Security as a Mentoring Organization. Thanks very much. -- Florencio Cano Gabarda From gvanrossum at gmail.com Mon Jun 13 01:39:32 2005 From: gvanrossum at gmail.com (Guido van Rossum) Date: Sun, 12 Jun 2005 16:39:32 -0700 Subject: [summerofcode] SSL mentoring In-Reply-To: <20050612213904.2542.FCANO@ono.com> References: <20050612213904.2542.FCANO@ono.com> Message-ID: On 6/12/05, Florencio Cano Gabarda wrote: > Sorry can you explain better what do you mean? I did't see Elemental > Security as a Mentoring Organization. > Thanks very much. We're not, but we have some individuals who know a lot about SSL and who would be willing in helping out (through advice etc.) anyone who endeavors on an SSL-for-Python project. The PSF would have to be your mentoring organization. -- --Guido van Rossum (home page: http://www.python.org/~guido/) From fcano at ono.com Mon Jun 13 11:37:42 2005 From: fcano at ono.com (Florencio Cano Gabarda) Date: Mon, 13 Jun 2005 11:37:42 +0200 Subject: [summerofcode] SSL mentoring In-Reply-To: References: <20050612213904.2542.FCANO@ono.com> Message-ID: <20050613113404.CB27.FCANO@ono.com> I've been studying the SSL3 specification from Netscape. I think it is the last "word" about SSL specification, isn't it? I would like to know if you think that we should center in the specification or in other ssl implementations code. Thanks. -- Florencio Cano Gabarda From gvanrossum at gmail.com Mon Jun 13 16:45:54 2005 From: gvanrossum at gmail.com (Guido van Rossum) Date: Mon, 13 Jun 2005 07:45:54 -0700 Subject: [summerofcode] SSL mentoring In-Reply-To: <20050613113404.CB27.FCANO@ono.com> References: <20050612213904.2542.FCANO@ono.com> <20050613113404.CB27.FCANO@ono.com> Message-ID: On 6/13/05, Florencio Cano Gabarda wrote: > I've been studying the SSL3 specification from Netscape. I think it is > the last "word" about SSL specification, isn't it? > I would like to know if you think that we should center in the > specification or in other ssl implementations code. There's a newer standard named TLS that also needs to be implemented. BTW, the person who volunteered to mentor worked at Netscape and was intimately involved with SSL there. But I would use OpenSSL as a basis. I do note that there are already several Python/SSL modules around, including the _ssl.c that comes with Python itself, M2Crypto, PyOpenSSL, and also something that claims to implement TLS without the need for external modules (I forget the name). I'd say that starting from scratch would appear to be a big waste of time. -- --Guido van Rossum (home page: http://www.python.org/~guido/) From yutingcui at 163.com Mon Jun 13 18:15:02 2005 From: yutingcui at 163.com (Cui Yuting) Date: Tue, 14 Jun 2005 00:15:02 +0800 Subject: [summerofcode] Memory usage profile Message-ID: <42ADB106.9070006@163.com> Sorry for my poor English. I have read the code idea of memory usage profile and have just read some of the source files. As far as my understanding, the goal of this idea is to track the memory and objects usage. I think this can be done by modifying the python core, but I don't know if it is needed to track every memory blocks allocated by the C module (for example, the array allocated by malloc or new). I think the later will be a very hard task. From richcowan at gmail.com Mon Jun 13 21:09:06 2005 From: richcowan at gmail.com (Rich Cowan) Date: Mon, 13 Jun 2005 15:09:06 -0400 Subject: [summerofcode] Remote Control of Mailman using REST Message-ID: <365ff28d050613120948847e13@mail.gmail.com> I looked at the list of proposed Python projects, and lots of it was internal stuff -- it seems to me that someone ought to be thinking about extending python OSS apps to make them more useful to others. In this spirit, I want to propose a task for a Google Summer of Code project: to add an API to the Mailman user interface. If upcoming.org can do it, why not Mailman? Here is a sample list of basic methods that could be implemented. Let me know what you think! If these were implemented we could then implement control of mailman from a desktop application we have developed, which would be very useful. -rich www.organizerscollaborative.org Methods list list.add [HTTP POST] (add a new list, need to include admin email and password, name of list, etc) list.delete [HTTP POST] (delete existing list) list.getinfo [HTTP GET] (returns # of subscribers, traffic, admin name) list.masssubscribe [HTTP POST] (bulk subscribe) list.massunsubscribe [HTTP POST] (bulk unsubscribe) list.clear [HTTP POST] (delete all subscribers) list.getbounces [HTTP POST] (retrieve list of suspect emails) list.purgebounces [HTTP POST] (force the removal of some or all suspect emails) subscriber subscriber.subscribe [HTTP POST] (add a new subscriber if unique) subscriber.unsubscribe [HTTP POST] (delete existing subscriber) subscriber.setdigest [HTTP POST] (set mode to digest for subscriber ) subscriber.setnodigest [HTTP POST] (set mode to normal for subscriber ) subscriber.search [HTTP GET] (get list of subscribers matching substring) subscriber.setname [HTTP POST] (set the first and last name for a subscriber) subscriber.getname [HTTP GET] (get the first and last name for a subscriber) hope someone has been thinking of doing this... this is the type of thing that the developers of upcoming.org chose to implement (see below). I have already suggested this to the civicspace project, but I am thinking that perhaps some progress has already been made somewhere on this... -rich cowan www.organizerscollaborative.org see also http://upcoming.org/services/api/ : Overview Upcoming.org's open API currently supports a RESTful interface, that essentially means you can send an HTTP GET or POST to call exposed methods, and you'll get back an XML document in return. When you send a request, you'll get a response in XML that looks like this: [Data in XML format - see individual method docs] If there's an error, the service gateway will respond with an HTTP error code, and an error message about the problem. From david.ascher at gmail.com Mon Jun 13 21:37:59 2005 From: david.ascher at gmail.com (David Ascher) Date: Mon, 13 Jun 2005 12:37:59 -0700 Subject: [summerofcode] Remote Control of Mailman using REST In-Reply-To: <365ff28d050613120948847e13@mail.gmail.com> References: <365ff28d050613120948847e13@mail.gmail.com> Message-ID: On 6/13/05, Rich Cowan wrote: > I looked at the list of proposed Python projects, and lots of it was > internal stuff -- it seems to me that someone ought to be thinking > about extending python OSS apps to make them more useful to others. > > In this spirit, I want to propose a task for a Google Summer of Code > project: to add an API to the Mailman user interface. If > upcoming.org can do it, why not Mailman? I like the concept! --david From barry at python.org Mon Jun 13 21:53:08 2005 From: barry at python.org (Barry Warsaw) Date: Mon, 13 Jun 2005 15:53:08 -0400 Subject: [summerofcode] Remote Control of Mailman using REST In-Reply-To: References: <365ff28d050613120948847e13@mail.gmail.com> Message-ID: <1118692388.10062.2.camel@geddy.wooz.org> On Mon, 2005-06-13 at 15:37, David Ascher wrote: > On 6/13/05, Rich Cowan wrote: > > I looked at the list of proposed Python projects, and lots of it was > > internal stuff -- it seems to me that someone ought to be thinking > > about extending python OSS apps to make them more useful to others. > > > > In this spirit, I want to propose a task for a Google Summer of Code > > project: to add an API to the Mailman user interface. If > > upcoming.org can do it, why not Mailman? > > I like the concept! Me too! :) -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 307 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/summerofcode/attachments/20050613/c2a8ee32/attachment.pgp From david.ascher at gmail.com Tue Jun 14 02:37:25 2005 From: david.ascher at gmail.com (David Ascher) Date: Mon, 13 Jun 2005 17:37:25 -0700 Subject: [summerofcode] New mailing list for discussion among mentors Message-ID: We've created a new mailing list (pysoc-mentors) for discussions among the potential mentors and willing application-reviewers, to coordinate the review process. I would appreciate it very much if PSF members interested in helping and members of the Python community who are interested in serving as reviewers or mentors would sign up. If you're not a PSF member, get one to email me and vouch for you, and I'll approve your membership. http://mail.python.org/mailman/admin/pysoc-mentors/general People who are applying as students for the SOC should not sign up. -- David Ascher From david.ascher at gmail.com Tue Jun 14 02:40:36 2005 From: david.ascher at gmail.com (David Ascher) Date: Mon, 13 Jun 2005 17:40:36 -0700 Subject: [summerofcode] New mailing list for discussion among mentors In-Reply-To: References: Message-ID: On 6/13/05, David Ascher wrote: > We've created a new mailing list (pysoc-mentors) for discussions among > the potential mentors and willing application-reviewers, to coordinate > the review process. > > I would appreciate it very much if PSF members interested in helping > and members of the Python community who are interested in serving as > reviewers or mentors would sign up. If you're not a PSF member, get > one to email me and vouch for you, and I'll approve your membership. > > http://mail.python.org/mailman/admin/pysoc-mentors/general uh, wrong URL: http://mail.python.org/mailman/listinfo/pysoc-mentors From kv000 at mail.ru Sun Jun 12 13:20:50 2005 From: kv000 at mail.ru (Vova) Date: Sun, 12 Jun 2005 15:20:50 +0400 Subject: [summerofcode] High-level python optimizer. In-Reply-To: <20050611141109.GA31751@code1.codespeak.net> References: <200506081908.20046.physics@list.ru> <8180ef690506100639771b5526@mail.gmail.com> <20050611141109.GA31751@code1.codespeak.net> Message-ID: <200506121520.50864.kv000@mail.ru> Hello Armin ! On Saturday 11 June 2005 18:11, you wrote: > Hi Mark, hi Vova, > > Vova: I think you are missing some crucial points on how Python works. > If some parts of the program are not completely known or analyzable, > then it doesn't just mean that these parts cannot be analyzed and > optimized. It means that all the information about the complete program > is potentially wrong. Consider the following simple example: in module > 'foo.py', two functions f() and g() call each other. Now in some > completely unrelated part of the program, there is an 'exec' statement. > Most probably, it's not possible to know statically what the 'exec' > statement will do. Maybe the string that reaches the 'exec' will be at > run-time "import foo; foo.g=some_other_function". In this case, your > call graph suddenly becomes invalid. Ok, you are right, exec is a bad thing for my algorithm. When control flow reaches exec statement (or any other unknown code without annotation) analiser must forget all assumptions. But before exec that assumptions are right. And after exec there may be new assumptions (of course only about local scopes). The best what can be done is inspecting new code at run-time, modifying assumptions appropriately and recompiling if they had changed. Let's try to see how often exec (and compile) are used in real programs. I've checked some big python projects (I hope the list was random chosen): BitTorrent: not used Mailman: not used PIL: not used (actualy used once in unit-tests framework) Plone: used a lot PyRex: not used Portage: not used SCons: used With Plone situation is really bad. It uses a lot of external scripts and does a lot of dynamic tricks (even more interesting than your examples below), so without user interaction it can't be optimized a lot. Let's look inside SCons. It uses exec in the file Script/SConscript.py for executing user-suplied scripts. But these script are executed in specially created scope, and not intended to modify anything outside from this scope. If this information can be passed to analiser mannualy it can still work. And finally let's look for some timings: from timeit import Timer print Timer('pass', 'pass').timeit() print Timer('f()', 'def f(): pass').timeit() print Timer('for i in xrange(5): pass', 'pass').timeit() print Timer('for i in range(5): pass', 'pass').timeit() this code prints on my machine: 0.0886490345001 0.522771120071 1.64868998528 2.10483407974 Comparing lines 1 and 2 gives some estimation how much can we can get from function inlining (for object methods it's even more actual). Just look at any object-oriented program and count how many it has one-line functions and how often they are called. Comparing lines 1 and 3 gives estimation for loop-unrolling. This is only rangom examples. > This is only an example, though. It could contain much more funny > stuff. Here are a few other examples in which I tried to have at least > one invalidating example for each invariant you talked about: > > math.sin = newfunction > foo.factorial = newfunction > instance.__class__ = newclass > SomeClass.__add__ = newmethod > SomeClass.__bases__ = (NewBaseClass,) > reload(mymodule) > somefunction.func_defaults = ('yadda',) > somefunction.func_code = newcodeobject > __builtin__.len = newfunction > setattr(instance, name, value) # where 'name' shadows a method As I said before these all can be tracked. > Some of these examples are pretty silly, but they just show that you > cannot guarantee correctness. Brett's thesis was about as far as it's > possible to go in this direction. (You are falling in a common pitfall, > though: it's not the first time someone puts forwards arguments like > yours.) > > On Fri, Jun 10, 2005 at 03:39:44PM +0200, Mark Dufour wrote: > > I am just worried that if you plan on doing a _global_ dataflow > > analysis, it will be difficult to remain precise, when all sort of > > dynamic things happen in the code. I'm not sure, but I think the > > people of PyPy are already working heavily on the kinds of > > optimizations as you are talking about, but applying it during > > run-time, so they can be somewhat precise for dynamic code - ie work > > for any Python program (Armin? :)) > > We have a two-stage approach; right now, we are working on static > analysis of a subset of Python. Later, we will extend these techniques > to perform an approximative analysis of full Python, but at run-time. > Psyco does extreme run-time-only analysis; we will use similar ideas, > while trying to combine the advantages of static and run-time analysis > (e.g. saving some information as hints between sessions). PyPy has been > built from the start with the idea of enabling such a balance between > compile- and run-time optimizations. Yes, this is promising. But for run-time optimization it's really important that optimizer must take not more time that it saves from program execution. It prohobits some optimizations at all. -- Best regards, Vladimir From steve at holdenweb.com Tue Jun 14 03:27:19 2005 From: steve at holdenweb.com (Steve Holden) Date: Mon, 13 Jun 2005 21:27:19 -0400 Subject: [summerofcode] [PSF-Members] New mailing list for discussion among mentors In-Reply-To: References: Message-ID: <42AE3277.50408@holdenweb.com> David Ascher wrote: > We've created a new mailing list (pysoc-mentors) for discussions among > the potential mentors and willing application-reviewers, to coordinate > the review process. > > I would appreciate it very much if PSF members interested in helping > and members of the Python community who are interested in serving as > reviewers or mentors would sign up. If you're not a PSF member, get > one to email me and vouch for you, and I'll approve your membership. > > http://mail.python.org/mailman/admin/pysoc-mentors/general > > People who are applying as students for the SOC should not sign up. > David: It's possible there's enough similarity between the PyCon paper approval process and the grant project selection process that the same software might be usable. Would you agree? regards Steve -- Steve Holden +1 703 861 4237 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ From david.ascher at gmail.com Tue Jun 14 06:10:35 2005 From: david.ascher at gmail.com (David Ascher) Date: Mon, 13 Jun 2005 21:10:35 -0700 Subject: [summerofcode] [PSF-Members] New mailing list for discussion among mentors In-Reply-To: <42AE3277.50408@holdenweb.com> References: <42AE3277.50408@holdenweb.com> Message-ID: > It's possible there's enough similarity between the PyCon paper approval > process and the grant project selection process that the same software > might be usable. Would you agree? Possibly, I don't recall the software package used. I think this calls for "champion++" myself, whereby I mean that if we need people who will be able to argue on behalf of student applications, and ideally serve as mentors for said students. We can discuss on the new ml. --da From gtg902n at mail.gatech.edu Tue Jun 14 06:04:19 2005 From: gtg902n at mail.gatech.edu (Brendan Kohler) Date: Tue, 14 Jun 2005 00:04:19 -0400 Subject: [summerofcode] Lotus IDVFS Application In-Reply-To: <200506121520.50864.kv000@mail.ru> References: <200506081908.20046.physics@list.ru> <8180ef690506100639771b5526@mail.gmail.com> <20050611141109.GA31751@code1.codespeak.net> <200506121520.50864.kv000@mail.ru> Message-ID: <1118721859.42ae57435e505@webmail.mail.gatech.edu> Hi, I'm adding my application here as I could not get the entire thing to fit in the provided text box from the google application. I also put a note in the application I submitted (well, the final application I submitted) on where to find the rest of my application (on my website or here). Anyway, here is the full application... ABSTRACT: The goal of the Lotus project is to create an Intelligent, Distributed, Virtual File System (IDVFS) that is portable across most operating systems and hardware configurations. The main tenets of the Lotus Project are that the distributed file system should be: 1. Portable 2. Secure 3. Redundant 4. Intuitive 5. Scalable 6. Intelligent To achieve portability the project will simply use two cross-platform languages that fit perfectly: Python and SQL. Security is a complex area and therefore accommodate many different levels of security to fit the user?s requirements. Redundancy will be achieved by designing the system to adapt to availability of different network resources and will mirror files on different servers intelligently. The Lotus system should not just be intuitive for the end user; it should be intuitive for the administrator to set up and customize as well. As such, the system will feature an extensive set of administrative tools, as well as an advanced system of permissions and a file structure that will benefit both administrators and end users. There is no reason to confuse users and decrease productivity with rigid and archaic systems. Scalability is a major issue and there is no reason that Lotus should not be suitable for applications ranging from large networks with geographical separation to networks in a single household. The Lotus file system will be designed to fit the needs of most network configurations, including completele integration across subnetworks of multiple servers and levels. Intelligence is needed to fulfill the design requirements, and the Lotus system will feature a NetAI system that will manage load balancing, network topology and server disk systems for maximum availability of network resources. NEED AND COMMUNITY IMPACT: At this point, you may be asking why anyone would need this. The truth is, this system has many applications ranging from acting as the backend for web applications to home network integration. Consider how nice it would be to connect your home network of 5+ computers and view all the files as though they were part of a single file system, with the ability to ?hot plug? and sync your laptop with the rest of the network. Imagine being able to search your entire network (featuring machines with different OS?s) without having to search each individual machine. Consider the impact of being able to use a network in a business that supports workgroups and special permissions with complete syncronization between geographically separated locations and redundancy similar to RAID across an entire network. Rather than continuing to list every application I can imagine (which is a lot ;) ), in the interest of space I have presented three case studies at the last section of the document (entitled ?CASE STUDIES?). What are the specific benefits to the Python community? First, the ability to have a managed python backend integrated into a web application written in python is of immense value in my opinion. The ability to scale this backend from single systems to clusters also makes this system future-proof. The second benefit to the community is the free availability of modules I am creating to assist in the creation of this project. These modules include a python-only shared memory system for IPC and a simplified IPC socket system that can be as easily used for IPC on a single system as IPC on a network of systems. CURRENT PROGRESS: This project is a large undertaking. I know very well the limitations of time for the summer of code and the rate at which I work. I could never hope to complete this project in anywhere near the amount of time given in the summer of code, were I to start from scratch. The fact is, however, that I first began design of this project in December and have been slowly making progress ever since. Most work has been in design, not coding, but I have completed coding and recoding several systems (including the CWS). Currently I have a working CWS and many other parts done. I?ve also gotten most of my IPC issues and SQL configurations worked out. In short, I?m right in the middle of the project and beginning work on the second major subsystem (NetAI/S). The goals I will set in the following GOALS section will be attainable with an estimation of roughly thirty hours/week of work on this project. GOALS: Due to the size of this project, my goals are more modest than the completion of the whole system in its entirety. The following are my goals: The system will be able to serve multiple client connections to a single server and each client will be able to perform account management and file management. This requires a fully working CWS, Client Handler and NetAI/S excepting the server-server network connectivity logic and security features such as encryption. Also, error logging will be implemented, though the rest of the administration subsystem will remain incomplete. PERSONAL INFORMATION: I am a CS and Physics student at the Georgia Institute of Technology. I have been programming with python since August of 2004 and have taken two classes in school on it. One was a basic Python class and the second was an independent Study in Python I was granted by the CS department and overseen by the professor who teaches the basic Python class. This summer I am taking two fairly intense classes (Modern Physics and Differential Equations) and unfortunately have to choose between schoolwork and my project since I have to work to pay out of state tuition. I?ve applied for the Summer of Code in hopes that I can work on something I?m really excited about instead of having to set my project aside for a regular job and still get my school work done. In preparation (should I get chosen I didn?t expect there would be quite so many submissions as there apparently are) I have registered a domain for the purpose of my project (pycoder.com) and am designing a website to that I may do blog-style updates on my progress as I work. SYSTEM ARCHITECTURE: The system is divided into two sections, referred to as the Server System and Management. A. Server System: The Server System consists of three loosely coupled subsystems, the CWS, NetAI/S, and Client Handler. I. CWS (Cache Write System) The CWS handles caching of files and writing to disk and SQL. The system avoids concurrency issues in which a client tries to read a file being written or two people try to write to the same file at once. Also, it keeps recent accessed or heavily used files in memory for quick access, which is especially important should the file be stored on a different server. II. NetAI/S (Network AI/Security) The The security portion of the system handles accounts and permissions for clients and provides security services such as encryption. The AI portion of the system handles request routing, storage management and load balancing through careful monitoring of all the servers on the network. III. Client Handler The Client Handler system connects a client to the rest of the network and handles permissions enforcement, request parsing, and various things like searches and traversing directories. An instance of the Client Handler is spawned for every client, taking care of all requests for that single client and providing updates about files changed and accounts modified. B. Management System: The management system consists of two subsystems: the Administration/Logging and the Socket Server. I. Administration/Logging: This subsystem can communicate with any other subsystem, forcing commands, performing diagnostics, and recording errors and client activity in a log. II. Socket Server: This subsystem listens for connections from the WAN and logs in users, redirecting them to another free port and spawning an instance of the Client Handler to handle the connection. In a way the Socket Server acts as a buffer between the Lotus IDVFS and the WAN, ensuring only logged in users can get access to the file system. DETAILED SYSTEM ARCHITECTURE: More detail as to the layout of the system architecture. I. CWS This system uses a subscription method where it establishes a connection with a new client process and waits for commands, which it decodes and then places onto a queue which the main thread uses to distribute commands to the three subsystems: Cache, SQL writer and disk writer. Any command to write to disk results in the caching of the binary data in the Cache where any subsequent requests to access that file will be handled until the file has been written to disk. Caching is handled by a multithreaded structure that stores the binary in indices as objects and two management threads handle weighing accesses versus time in cache to determine which cache objects to release and which to keep, and in some cases which to transfer to a longer term cache. II. NetAI/S This system really consists of three subsystems. The first subsystem (AI) handles load balancing, request routing and where to write files onto the disks. The AI also handles the transfer of data between servers and between different tiers. The second subsystem handles the file system and accounts. It connects to SQL and can display or modify the accounts, workgroups and special permissions for files, folders and users. The third subsystem handles encryption, session keys and any other security measures that the Lotus system must use to meet a requirement. This third subsystem will be designed to be easily extensible depending on the user?s requirements. The NetAI/S, like the CWS, uses a subscription system and places all requests in a queue to be handled by a main thread. III. Client Handler This system consists of two parts. The first part enforces permissions and prevents the client from getting data or making requests it should not be able to. All communications between the Client Handler and NetAI/S or CWS are filtered through here. The second subsystem interacts with the first subsystem and handles queries through SQL, changing permissions on files (where user is allowed to), searching for files, directory walking and logging in and out from the system. An instance of the Client Handler is spawned for each client connection and also stores data like current directory and user permissions (for enforcement). IV. Administration This system allows the complete control of all other subsystems through special UDP connections in every subprocess providing full access to the subsystem?s internals. This port also serves to send the Administration system errors and important information that should be entered into the log files. The Administration system, when its design is finalized, will be fully featured and allow a complete view of what is going on over the entire network. V. Socket Server This system acts as an independent server, handling requests to connect and checking user account/password before spawning an instance of the Client Handler and redirecting the client connections to it. The Socket Server also handles determining which ports are free and how to distribute them. VI. Dependencies The Lotus IDVFS depends on two specifically contructed SQL databases and therefore needs an SQL server present on each machine it is installed in. Likewise, Python must be installed on every system. Currently only one python package is required: mysql-python. The only OS requirements are that the system needs to support Python, since a major goal is portability. VII. Permissions Structure The permissions system is different than you would normally find on a server or file system. Users, files, folders and workgroups all have their own sets of permissions and options. Files, for example, have the ability to require a password to gain access, and folders have permissions defining (for a user) the default state of the folder, the files within the folder, and the subfolders. States can range from fully mofifiable to invisible. Workgroups can be assigned to users to enforce a default set of permissions, and individual permissions for a user can override other permissions (but not passwords). The system as designed is a bit lengthy to describe here, but offers complete protection and customizability not found in the simple permissions of Unix or Windows. CASE STUDIES: Case Study I: Web Application Framework Suppose you are trying to build a web application that holds a public database of Python modules where registered users can search categories of code and download modules. Obviously a limitation must be applied to this database: Only the submitter of the code should be able to modify or delete the module from the database (excepting administrators). This database is expected to be large and needs to be distributed across several severs that are not necessarily in the same geographic location. Solution: By installing the Lotus IDVFS on each of the servers, no matter their location, you can create a database with all the features needed. The only thing that really needs to be coded in this situation is the web interface (which acts as the client). Case Study II: Chain of Photo Stores This is the problem in which the Lotus IDVFS has its roots as a solution. The owner of a photo chain in the midwest, who happens to be a relative of a close friend, had a problem with a huge database of photoshoots he had to maintain and was concerned about employees that had been sometimes stealing the photographs and selling them online. The owner needed a system where he could have a set of geographically separated servers working together to handle the load from the stores, and store the photos with encryption so that employees would have a harder time stealing. In addition, the owner wanted a system where he could monitor the activity of his employees and control their access to different photo shoots; even denying former employees access should they try to access the system from non-company computers. Solution: The Lotus IDVFS simply covers all these problems. The only thing that the owner would need to create after installing the Lotus IDVFS on his servers is the client application to be installed on company computers. Note: Though the idea for the Lotus system was derived from that discussion, I was never involved in creating a solution for the actual company, and the owner?s requirements did seem to err on the side of paranoia. Nevertheless, the Lotus IDVFS does offer the complete solution to this scenario. Case Study III: The Home Network Consider a person having five or more computers on their home network, all with varying amounts of storage and capability. One of these is a laptop, which the owner would like to sync with the network whenever he is at home (automatically backing up the replaced files). Also, the person has children that should have restricted access, and an easy interface to access their files from. Additionally, this person wants to run a web application off the network and have it serve webpages, etc. Solution: The Lotus IDVFS can be installed on all systems and be configured in such a way to easily satisfy the needs of the family with user accounts, private files, and syncing of systems that come on and off the network. A simple gui interface can easily be made as a client and connect to the network. Also, a second client can be created to serve web applications, with different capabilities than the GUI client. Note that the Lotus IDVFS can be configured to use clients of many different types as long as they all conform to the API and each have a user account created. The system can even act as a distributed web server should you really want that kind of thing. From arigo at tunes.org Tue Jun 14 11:48:39 2005 From: arigo at tunes.org (Armin Rigo) Date: Tue, 14 Jun 2005 11:48:39 +0200 Subject: [summerofcode] [PSF-Members] New mailing list for discussion among mentors In-Reply-To: References: Message-ID: <20050614094839.GA12785@code1.codespeak.net> Hi David, On Mon, Jun 13, 2005 at 05:40:36PM -0700, David Ascher wrote: > > We've created a new mailing list (pysoc-mentors) for discussions among > > the potential mentors and willing application-reviewers, to coordinate > > the review process. The archives shouldn't be public at this point, or should they? Armin From mwh at python.net Tue Jun 14 12:11:40 2005 From: mwh at python.net (Michael Hudson) Date: Tue, 14 Jun 2005 11:11:40 +0100 Subject: [summerofcode] [PSF-Members] New mailing list for discussion among mentors In-Reply-To: <20050614094839.GA12785@code1.codespeak.net> (Armin Rigo's message of "Tue, 14 Jun 2005 11:48:39 +0200") References: <20050614094839.GA12785@code1.codespeak.net> Message-ID: <2mbr69dz8j.fsf@starship.python.net> Armin Rigo writes: > Hi David, > > On Mon, Jun 13, 2005 at 05:40:36PM -0700, David Ascher wrote: >> > We've created a new mailing list (pysoc-mentors) for discussions among >> > the potential mentors and willing application-reviewers, to coordinate >> > the review process. > > The archives shouldn't be public at this point, or should they? They're not any more. Cheers, mwh -- Please tell me I don't have to break out sarcasm tags. Please. Smartassed one-liners are a coping mechanism, and I really need them this week. -- Charles Herbig, asr From lac at strakt.com Fri Jun 17 12:51:14 2005 From: lac at strakt.com (Laura Creighton) Date: Fri, 17 Jun 2005 12:51:14 +0200 Subject: [summerofcode] PyOpenSSL Message-ID: <200506171051.j5HApEsm010207@theraft.strakt.com> Martin Sjögren, who wrote it, was working as a summer student at Strakt when he did so. It is part of our product, and we are actively maintaining it, though as far as I know we haven't changed anything with it in 6 months or so, and there have only been minor changes for 2 years. So over at Strakt we are very interested in helping anybody who wants to start from pyOpenSSL. We also want to know what it is that Elemental Security wants that we don't have (in case we actually already have it). But -- EuroPython is in 2 weeks. I don't have time to talk about this now. (I don't really have time to post this note, either, but I did it anyway). Laura From codedivine at gmail.com Sat Jun 25 17:31:40 2005 From: codedivine at gmail.com (Rahul Garg) Date: Sat, 25 Jun 2005 11:31:40 -0400 Subject: [summerofcode] who were accepted Message-ID: Hi people. who of you were accepted and with what projects. rahul From fcano at ono.com Sat Jun 25 17:44:04 2005 From: fcano at ono.com (Florencio Cano Gabarda) Date: Sat, 25 Jun 2005 17:44:04 +0200 Subject: [summerofcode] who were accepted Message-ID: <20050625174319.1F0F.FCANO@ono.com> I were not accepted. Good look for who is going to do the SSL implementation. -- Florencio Cano Gabarda From arvind1 at iitg.ernet.in Sat Jun 25 18:08:45 2005 From: arvind1 at iitg.ernet.in (Arvind Singh) Date: Sat, 25 Jun 2005 21:38:45 +0530 (IST) Subject: [summerofcode] who were accepted In-Reply-To: <20050625174319.1F0F.FCANO@ono.com> References: <20050625174319.1F0F.FCANO@ono.com> Message-ID: i wasn't accepted as well. congrats n good luck for the one working on Parrot VM. but i'd still like to work on it. On Sat, 25 Jun 2005, Florencio Cano Gabarda wrote: > I were not accepted. Good look for who is going to do the SSL > implementation. > > -- > Florencio Cano Gabarda > > > _______________________________________________ > summerofcode mailing list > summerofcode at python.org > http://mail.python.org/mailman/listinfo/summerofcode > From nhaldimann at gmx.ch Sat Jun 25 21:42:11 2005 From: nhaldimann at gmx.ch (Niklaus Haldimann) Date: Sat, 25 Jun 2005 21:42:11 +0200 Subject: [summerofcode] who were accepted + mentors? In-Reply-To: References: Message-ID: <42BDB393.5050104@gmx.ch> Rahul Garg wrote: > who of you were accepted and with what projects. I was accepted with my proposal to port the _sre and array modules to Python. Thanks to everyone who contributed to that decision! I am supposed to study for an exam on monday but I can't concentrate at all because I'm jumping up and down in my chair right now. ;) Did the PSF already sort out mentorships? How and when will I be contacted by my mentor(s)? In case I am mentored by PyPy folks I am considering going to the PyPy sprint in G?teborg. Since the sprint starts next Friday details would have to be worked out very quickly. Cheers Nik From hpk at trillke.net Sat Jun 25 22:58:05 2005 From: hpk at trillke.net (holger krekel) Date: Sat, 25 Jun 2005 22:58:05 +0200 Subject: [summerofcode] who were accepted + mentors? In-Reply-To: <42BDB393.5050104@gmx.ch> References: <42BDB393.5050104@gmx.ch> Message-ID: <20050625205805.GW21207@solar.trillke.net> Hi Niklaus, On Sat, Jun 25, 2005 at 21:42 +0200, Niklaus Haldimann wrote: > Rahul Garg wrote: > > who of you were accepted and with what projects. > > I was accepted with my proposal to port the _sre and array modules to > Python. Thanks to everyone who contributed to that decision! I am > supposed to study for an exam on monday but I can't concentrate at all > because I'm jumping up and down in my chair right now. ;) > > Did the PSF already sort out mentorships? How and when will I be > contacted by my mentor(s)? In case I am mentored by PyPy folks I am > considering going to the PyPy sprint in G?teborg. Since the sprint > starts next Friday details would have to be worked out very quickly. ASFAIK it's very likely that Armin and/or Samuele will be mentoring you. It would indeed make sense to come to Goetheborg (most of us are already here, btw, happily pre-sprinting and making good progress :-) but please don't expect full time mentoring at the sprint because we are already >10 people with some new developers attending from different contexts so it will be a communicative challenge for the core developers anyway :-) However, there will be plenty of room for questions and hacking together, so it's definitely a good idea to plan for coming here IMO. have fun & good luck (if you need it :-) with the exam, holger From nhaldimann at gmx.ch Sun Jun 26 00:15:11 2005 From: nhaldimann at gmx.ch (Niklaus Haldimann) Date: Sun, 26 Jun 2005 00:15:11 +0200 Subject: [summerofcode] who were accepted + mentors? In-Reply-To: <20050625205805.GW21207@solar.trillke.net> References: <42BDB393.5050104@gmx.ch> <20050625205805.GW21207@solar.trillke.net> Message-ID: <42BDD76F.70502@gmx.ch> Hi Holger holger krekel wrote: > ASFAIK it's very likely that Armin and/or Samuele will be mentoring you. Great. I guess I will be contacted as soon as this is set. > It would indeed make sense to come to Goetheborg (most of us > are already here, btw, happily pre-sprinting and making good > progress :-) but please don't expect full time mentoring > at the sprint because we are already >10 people with some new > developers attending from different contexts so it will be a > communicative challenge for the core developers anyway :-) > However, there will be plenty of room for questions and hacking > together, so it's definitely a good idea to plan for coming > here IMO. I certainly wouldn't expect to have a core developer sitting next to me all the time, neither would I want that and I hope I wouldn't need it. ;) The main point of going to the sprint for me would be to meet my mentors face-to-face and just get a general headstart on pypy. Can't imagine a better way to boost my already massive motivation. Cheers Nik From news4vovan at mail.ru Sun Jun 26 13:18:49 2005 From: news4vovan at mail.ru (Vladimir Sukhoy) Date: Sun, 26 Jun 2005 15:18:49 +0400 Subject: [summerofcode] who were accepted In-Reply-To: Message-ID: > Hi people. > who of you were accepted and with what projects. I was accepted with my own idea (proactive I/O library for Python). I look forward to knowing who will be my mentor. And it would be nice to sort out some organizational issues, like where should we register our projects and maybe other important aspects of PSF-mentored development? From sdeibel at wingware.com Mon Jun 27 20:15:15 2005 From: sdeibel at wingware.com (Stephan Deibel) Date: Mon, 27 Jun 2005 14:15:15 -0400 (EDT) Subject: [summerofcode] Free Wing IDE licenses for accepted SoCers Message-ID: Hi, Wingware would like to offer free licenses for Wing IDE Professional, its commercial IDE for Python, to any of the 19 accepted SoC candidates that want it. This would be a full permanent commercial license for using Wing on any OS (Windows, OS X, Linux). There is info on the product here: http://wingware.com/products I will email individuals as well but wanted to start here to expidite getting licenses to those that want one -- just email me if you are interested. If you want to try it first, there is also a free full-featured trial available at http://wingware.com/wingide/trial Thanks, and good luck to all of you on your projects! Stephan Deibel -- Wingware Wing IDE for Python Advancing Software Development www.wingware.com From elliot.cohen at gmail.com Tue Jun 28 02:27:57 2005 From: elliot.cohen at gmail.com (Elliot Cohen) Date: Mon, 27 Jun 2005 17:27:57 -0700 Subject: [summerofcode] Question about Mentors Message-ID: <17b32031050627172763e65e3@mail.gmail.com> Hi, My name is Elliot Cohen, I recently received one of the Google Summer Of Code grants to work on a Python Bayesian Network Toolbox. I haven't received any info yet about who my mentor is and when they should be contacting me. Does anyone know when and how that communication is supposed to happen? Thanks, Elliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/summerofcode/attachments/20050627/d5296a14/attachment.htm From trentm at ActiveState.com Tue Jun 28 02:54:11 2005 From: trentm at ActiveState.com (Trent Mick) Date: Mon, 27 Jun 2005 17:54:11 -0700 Subject: [summerofcode] Question about Mentors In-Reply-To: <17b32031050627172763e65e3@mail.gmail.com> References: <17b32031050627172763e65e3@mail.gmail.com> Message-ID: <20050628005411.GB1935@ActiveState.com> [Elliot Cohen wrote] > Hi, > > My name is Elliot Cohen, I recently received one of the Google Summer Of > Code grants to work on a Python Bayesian Network Toolbox. I haven't received > any info yet about who my mentor is and when they should be contacting me. > Does anyone know when and how that communication is supposed to happen? Some of the PSF folks who will be doing the mentoring are currently organizing details for this. We want to make sure our ducks float, er, are all in a row. Hopefully in a day or two you should receive an intro email from the PSF and your mentor. Congratulations on being selected! Cheers, Trent -- Trent Mick TrentM at ActiveState.com