Jim Baker | 1 Apr 08:11
Favicon
Gravatar

Google Summer of Code

Friday April 3 marks the deadline for applying for the Google Summer of Code (http://socghop.appspot.com/document/show/program/google/gsoc2009/faqs). The Jython project has participated under the umbrella of the Python Software Foundation for the last two years, with several successful projects. We'd like to have some more this summer.

Over the course of the summer and under the guidance of a mentor, a student develops code for contribution to the Jython project. Upon successful completion, the student receives $4500 and a rather nice t-shirt from Google. In addition, a number of students who have participated have gone on to present their work at such conferences as DjangoCon, JavaOne, and PyCon, as well as become committers on the project itself.

Potential ideas include but are certainly not limited to:

  • Jython performance optimization, especially with respect to JDK 7
  • Improving Java and other dynamic languages integration
  • Numerical Jython, a replacement for JNumeric that provides
  • Integration with the Java ecosystem: Web services, distributed shared memory like Terracotta, better support for Hadoop, Spring, etc.

So potential students, please submit your applications by April 3, 12 noon PDT / 19:00 UTC
http://socghop.appspot.com/document/show/program/google/gsoc2009/faqs#timeline

Also feel free to email this list with your ideas, or one of the committers privately as you see fit. This can also be an opportunity to further polish up your application in advance of the deadline.

- Jim

--
Jim Baker
jbaker <at> zyasoft.com
------------------------------------------------------------------------------
_______________________________________________
Jython-dev mailing list
Jython-dev <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-dev
Picon

Wrapper around java objects


I have a class called PyJavaObject which is a wrapper class around java
object. The code looks like this.

class PyJavaObject(PyObject):

    def __init__(self, object):
	self.object = object
	PyObject.__init__(self)
	self.initialized = 1

    def __tojava__(self, clazz):
	if clazz == PyObject:
	   return self

	return self.object

Let say i have few java classes A, B and C.

public class A {
   ...
}

public class B {
   ...
}

public class C {
   public C (A) {
     ...
   }

   public C (B) {
     ...
   }
}

what should happen when i try to create an object of type C from jython like
this

pyA = PyJavaObject(A())
c = C(pyA)

How will jython identifies which constructor to call?
--

-- 
View this message in context: http://www.nabble.com/Wrapper-around-java-objects-tp22821836p22821836.html
Sent from the jython-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Alan Kennedy | 1 Apr 11:32
Favicon
Gravatar

Re: Google Summer of Code

[Jim]
> Potential [GSOC] ideas include but are certainly not limited to:
>
> Jython performance optimization, especially with respect to JDK 7
> Improving Java and other dynamic languages integration
> Numerical Jython, a replacement for JNumeric that provides
> Integration with the Java ecosystem: Web services, distributed shared memory
> like Terracotta, better support for Hadoop, Spring, etc.

I would add.

 - Porting Mercurial to jython, or making jython run mercurial.

It would be nice if we could be "self-hosting" in relation to DVCS.

Regards,

Alan.

------------------------------------------------------------------------------
Oti | 1 Apr 15:56
Picon
Gravatar

Re: Jython install issue

Hi Gareth,

many thanks for testing and reporting anyway!

I never saw this error when running the graphical autotests.
So my hope was you could reproduce it.

What I will do is to properly initialize the variables in question at
the beginning of the installation process, hoping nobody else nulls
them out (checked in with revision 6147).

best wishes,
Oti.

On Wed, Apr 1, 2009 at 10:30 AM, DOUTCH GARETH-GDO003
<Gareth.Doutch <at> motorola.com> wrote:
> Hi Oti,
>
> I retried yesterday and have been unable to reproduce the error using either the command you gave me or my
original one. This is after several attempts.
>
> Regards,
>
> Gareth
>
> -----Original Message-----
> From: Oti [mailto:ohumbel <at> gmail.com]
> Sent: 31 March 2009 13:09
> To: DOUTCH GARETH-GDO003
> Cc: jython-users <at> lists.sourceforge.net
> Subject: Re: [Jython-users] Jython install issue
>
> Hi Gareth,
>
> could you please do the following for me (to track this down):
>  - start the gui installer, by specifying the --verbose option:
>      java -jar jython_installer-2.5b3.jar --verbose
>  - proceed to the 'Target java home' page, where 'Please select the java home directory:' is listed
>  - note the contents of the fields (before you press Next)
>  - copy the output of the console (after you pressed Next)
>  - i am also interested in the contents of the file which is listed on the first line of the output, such as:
>     system properties dumped to c:\Temp\System12345.properties
>
> maybe it is easier for you to attach all this to a bug report on http://bugs.jython.org/
>
> many thanks for your help!
> Oti.
>
>
> On Tue, Mar 31, 2009 at 10:22 AM, DOUTCH GARETH-GDO003 <Gareth.Doutch <at> motorola.com> wrote:
>> I experienced this problem using the graphical installer (Using WinXP
>> home. Command line installer worked fine)
>>
>> C:\Documents and Settings\Gareth>java -jar "C:\Documents and
>> Settings\Gareth\Desktop\jython_installer-2.5b3.jar"
>> Exception in thread "Thread-8" java.lang.NullPointerException
>>         at java.util.StringTokenizer.<init>(Unknown Source)
>>         at java.util.StringTokenizer.<init>(Unknown Source)
>>         at
>> org.python.util.install.Installation.getJavaSpecificationVersion(Insta
>> llation.java:112)
>>         at
>> org.python.util.install.Installation.isValidJava(Installation.java:96)
>>         at
>> org.python.util.install.OverviewPage.activate(OverviewPage.java:224)
>>         at
>> org.python.util.install.AbstractWizardPage.doActivate(AbstractWizardPa
>> ge.java:41)
>>         at
>> org.python.util.install.AbstractWizard.showActivePage(AbstractWizardja
>> va:414)
>>         at
>> org.python.util.install.AbstractWizard.next(AbstractWizard.java:319)
>>         at
>> org.python.util.install.AbstractWizard.gotoNextPage(AbstractWizard.jav
>> a:215)
>>         at
>> org.python.util.install.AbstractWizardValidator.fireValidationSucceede
>> d(AbstractWizardValidator.java:78)
>>         at
>> org.python.util.install.AbstractWizardValidator.access$100(AbstractWiz
>> ardValidator.java:6)
>>         at
>> org.python.util.install.AbstractWizardValidator$ValidatorThread.run(Ab
>> stractWizardValidator.java:16)
>

------------------------------------------------------------------------------
Jim Baker | 1 Apr 21:46
Favicon
Gravatar

Fwd: [SoC2009-mentors] Fwd: Important: Get Your Proposals Submitted to the GSoC 2009 site sooner rather than later

>From our Google Summer of Code list for Python, here's some important advice for potential applicants. At this point all applicants should be submitting their applications, even if in draft form and even if discussed with their potential mentors (like me). Any such drafts can then be revised before the deadline this Friday.

---------- Forwarded message ----------
From: Daniel (ajax) Diniz <ajaksu <at> gmail.com>
Date: Wed, Apr 1, 2009 at 1:39 PM
Subject: [SoC2009-mentors] Fwd: Important: Get Your Proposals Submitted to the GSoC 2009 site sooner rather than later
To: soc2009-mentors <soc2009-mentors <at> python.org>, soc2009-general <soc2009-general <at> python.org>


Hi,
This is an important announcement that was posted to the GSoC lists.
Original at http://tinyurl.com/apply-early-for-GSoC

Executive summary: if you're a student, apply now; if you're a mentor,
tell students to apply now; it is possible (and advised) to discuss
and edit the application after submitting it.

Daniel

---
From: "LH (Leslie Hawthorn)" <lho... <at> gmail.com>
Date: Apr 1, 4:11 pm
Subject: Important: Get Your Proposals Submitted to the GSoC 2009 site
sooner rather than later
To: Google Summer of Code Announce


Hello everyone,

Right now, we have about 2x the students registered onhttp://socghop.appspot.com
as we do # of proposals submitted. We are also hearing from our
mentors that they are reviewing many more proposals than have been
submitted via the GSoC 2009 site, e.g. "We have six applications
turned in but are reviewing another 20 or so in our forums."

I realize that many organizations are working with students to refine
their proposal ideas on their mailing lists, wikis, etc. However, a
proposal on a wiki, mailing list, etc. does not constitute an actual
application for the program; the proposal must be submitted to the
GSoC 2009 site. While doing review and refinement outside of
http://socghop.appspot.com is a useful exercise, it doesn't allow us
to accurately gauge the number of student proposals we're receiving
for GSoC 2009.

Please help us get an accurate sense of how many proposals will be
submitted for GSoC 2009 by submitting your student proposals to the
GSoC 2009 site *now*. It is fine if the proposal is still in draft
format. You are welcome to link to the wiki page, mailing list thread,
forum topic, etc. where your proposal is under discussion and
refinement as part of the proposal submission process.[0]

Finally, many organizations are asking for student to submit patches
as part of the application process. Don't let the patch requirement
stop you from submitting your proposal. The proposal may not be
reviewed until the patch is submitted, but we've given mentors ~2
weeks to review proposals (and any patches they request) after the
application deadline, which is this Friday, 3rd April at 19:00 UTC.

Cheers,
LH

PS - Contrary to all rumors you may hear, we have not extended the
application deadline. Further, don't assume that the deadline will be
extended.

[0] -http://socghop.appspot.com/document/show/program/google/gsoc2009/userguide#depth_studentapply
_______________________________________________
SoC2009-mentors mailing list
SoC2009-mentors <at> python.org
http://mail.python.org/mailman/listinfo/soc2009-mentors



--
Jim Baker
jbaker <at> zyasoft.com
------------------------------------------------------------------------------
_______________________________________________
Jython-dev mailing list
Jython-dev <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-dev
Nick Rothwell | 4 Apr 19:22
Favicon
Gravatar

Changes to standard output printing, 2.2.1->2.5b3?

I have a package which embeds Jython into MaxMSP (http://www.cycling74.com/products/max5 
). Max has a message logging window, and the embedded Java-in-Max  
redirects standard output and error to this window.

This all works fine with Jython 2.2.1, but I'm not seeing anything  
with 2.5b3. Well, I'm seeing the "processing new jar" messages (to  
standard error?) but nothing from Python's "print".

Ah, a clue: lines output with

	print([...])

don't appear until I do a

	from java.lang import System
	System.out.println([...])

when everything gets flushed out (complete with line terminators).

	-- N.

Nick Rothwell / Cassiel.com Limited
www.cassiel.com
www.myspace.com/cassieldotcom
www.last.fm/music/cassiel
www.reverbnation.com/cassiel
www.linkedin.com/in/cassiel
www.loadbang.net

------------------------------------------------------------------------------
Nick Rothwell | 4 Apr 20:07
Favicon
Gravatar

Integer conversions

Now I've figured out how to flush out my error messages, I'm seeing  
some unusual behaviour. All well in 2.2.1:

 >>> from java.lang import Integer
 >>> Integer.toString(45)
'45'
 >>> Integer.toString(0xFFFFFFFF)
'-1'

Somewhat odd in 2.5b3:

 >>> from java.lang import Integer
 >>> Integer.toString(45)
u'45'
 >>> Integer.toString(0xFFFFFFFF)
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
         at  
org 
.python 
.core.PyReflectedFunction.throwBadArgError(PyReflectedFunction.java:279)
         at  
org 
.python.core.PyReflectedFunction.throwError(PyReflectedFunction.java: 
300)

java.lang.ArrayIndexOutOfBoundsException:  
java.lang.ArrayIndexOutOfBoundsException: 0

In "45", the jump to Unicode is a little surprising - is there a  
reason for that?

In "0xFFFFFFFF", I presume there's a promotion to long - 2.5b3 thinks  
it's really 4294967295L, where 2.2.1 just let it overflow to -1  -  
what error should I expect here? In my own Python-to-Java call I get a  
coercion error, which makes sense.

	-- N.

Nick Rothwell / Cassiel.com Limited
www.cassiel.com
www.myspace.com/cassieldotcom
www.last.fm/music/cassiel
www.reverbnation.com/cassiel
www.linkedin.com/in/cassiel
www.loadbang.net

------------------------------------------------------------------------------
Philip Jenvey | 4 Apr 20:35
Gravatar

Re: Changes to standard output printing, 2.2.1->2.5b3?


On Apr 4, 2009, at 10:22 AM, Nick Rothwell wrote:

> I have a package which embeds Jython into MaxMSP (http://www.cycling74.com/products/max5
> ). Max has a message logging window, and the embedded Java-in-Max
> redirects standard output and error to this window.
>
> This all works fine with Jython 2.2.1, but I'm not seeing anything
> with 2.5b3. Well, I'm seeing the "processing new jar" messages (to
> standard error?) but nothing from Python's "print".
>
> Ah, a clue: lines output with
>
> 	print([...])

I'm not sure what you mean here, this looks like a Python 3 style  
print function. Do you mean the normal print statement? i.e. print 'foo'

> don't appear until I do a
>
> 	from java.lang import System
> 	System.out.println([...])
>
> when everything gets flushed out (complete with line terminators).

stdout is now lined buffered, like in CPython, whereas it wasn't in  
2.2. You can disable this buffering via a command line option or with  
a Java property when initializing Jython. However note that this also  
opens stdout/err/in into binary mode.

You could also disable buffering at runtime by reopening the  
underlying file descriptor:

sys.stdout = os.fdopen(sys.stdout.fileno(), sys.stdout.mode, 0) # 0  
means unbuffered

--
Philip Jenvey

------------------------------------------------------------------------------
Philip Jenvey | 4 Apr 20:46
Gravatar

Re: Integer conversions


On Apr 4, 2009, at 11:07 AM, Nick Rothwell wrote:

> Somewhat odd in 2.5b3:
>
>>>> from java.lang import Integer
>>>> Integer.toString(45)
> u'45'

This is one of the big changes for 2.5, Java strings are now  
synonymous with Python unicode objects. We really had to do this now  
that our str and unicode objects are significantly different (which  
makes us much more compatible with CPython), and it just makes more  
sense. It'll make a lot of sense in Jython 3. =]

>
>>>> Integer.toString(0xFFFFFFFF)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>         at
> org
> .python
> .core.PyReflectedFunction.throwBadArgError(PyReflectedFunction.java: 
> 279)
>         at
> org
> .python.core.PyReflectedFunction.throwError(PyReflectedFunction.java:
> 300)
>
> java.lang.ArrayIndexOutOfBoundsException:
> java.lang.ArrayIndexOutOfBoundsException: 0
>
> In "45", the jump to Unicode is a little surprising - is there a
> reason for that?
>
> In "0xFFFFFFFF", I presume there's a promotion to long - 2.5b3 thinks
> it's really 4294967295L, where 2.2.1 just let it overflow to -1  -
> what error should I expect here? In my own Python-to-Java call I get a
> coercion error, which makes sense.

I'm not sure, but definitely not this error. Could you log a ticket  
for this issue?

--
Philip Jenvey

------------------------------------------------------------------------------
Nick Rothwell | 4 Apr 22:07
Favicon
Gravatar

Re: Changes to standard output printing, 2.2.1->2.5b3?

On 4 Apr 2009, at 19:35, Philip Jenvey wrote:

> I'm not sure what you mean here, this looks like a Python 3 style  
> print function. Do you mean the normal print statement? i.e. print  
> 'foo'

Sorry - yes - I was confusingly using "[...]" to mean "the usual".

> stdout is now lined buffered, like in CPython, whereas it wasn't in  
> 2.2.

OK, but isn't print("foo") without a trailing comma supposed to flush  
out a line with terminating linebreak? If I do

	print "A"
	print "B"
	...
	from java.lang import System
	System.out.println("C")

I get nothing from the prints, but then get all three lines flushed on  
the println.

Everything is fine running the Jython console - but the lines are not  
being flushed by MaxMSP. I'm now guessing rather wildly that it's some  
kind of CR-vs-LF issue.

> sys.stdout = os.fdopen(sys.stdout.fileno(), sys.stdout.mode, 0) # 0  
> means unbuffered

No joy with this, but I expect that Max is doing something odd with  
the JVM streams. I'll experiment with the properties. (Are these  
documented?)

	-- N.

Nick Rothwell / Cassiel.com Limited
www.cassiel.com
www.myspace.com/cassieldotcom
www.last.fm/music/cassiel
www.reverbnation.com/cassiel
www.linkedin.com/in/cassiel
www.loadbang.net

------------------------------------------------------------------------------

Gmane