Re: DBDI Status

2009-07-16 Thread Tim Bunce
On Wed, Jul 15, 2009 at 03:46:08PM +0100, Sentra Systems wrote:
 Tim

 They fixed a bug in rakudo last night that means a lot more of the  pm's 
 build, still investigating the rest. There a number of additional classes 
 being discovered by javap (above the list you supplied).

Yes, that list was just the top level classes. There's lots of extras
that get referenced by those classes.

 Do you want these to be typecast to 'Any'?

In the short term, yes. In the longer term we'll need to be more
flexible. I envisage a 'type map' file that, for each Java type,
specifies the corresponding Perl6 type (either builtin or in a module).
Any types not in the file would generate a warning and map to Any.

Feel free to add that in! I'd guess it would be straight-forward.

 Rakudo currently doesn't support 'Array of' - so the returns parameters are 
 now returning 'Array' without a type, I've included the type info in a 
 comment at the end of line. Method parameters just get the appropriate 
 sigil now.

 Typecasting was causing several multi methods to end up with the same 
 signature, I've amended the generator to remove the duplicates.

Great.

 I added them to a copy of the list and it starts bring in stuff like the 
 Java print system classes etc. when run against java2perl.

Not quite sure what you mean there Dave.

 Do you want  a snapshot of what I've done so far, or would you rather wait 
 until it's more complete?

Commit early, commit often :)

 What sort of Google account do I need to commit?

Go to google.com. Click 'Sign in' in the top righthand corner.
Click 'Create an account now'. Enter your email address etc.
Send me the email address when you're done.

Or, if you already have a google account, just send me one of the email
addresses associated with the account.

Thanks!

Tim.


Re: DBDI Status

2009-07-10 Thread Sentra Systems

Tim

Attached is a modified copy of the Generator::Std that emits current 
perl6. It's been amended to add the correct sigils and 'use' statements. 
Do you want to give it a try and see if it does what you want?


:)
Dave


Tim Bunce wrote:

On Mon, Jul 06, 2009 at 02:08:17PM +0100, Sentra Systems wrote:
  

Tim

Is there a particular reference implementation of java.sql(x) you're 
planning on running the java2perl on? A quick google shows a reference API 
but no obvious reference implementation.



Any implementation that has the classes will do.  java2perl6 is only
concerned with the class interfaces.  It just runs javap on the class
you give it, parses the class and interfaces definitions it outputs, and
writes corresponding perl6 clasess and roles definitions.

Try running

java2perl6 --outdir jdbc --recurse --nest java.sql.Connection

I've just checked in a file I had on my disk that lists all the
java.sql and javax.sql classess, so you can run

java2perl6 --outdir jdbc --recurse --nest $(cat jdbc_classes.txt)

Tim.

  

Regards
Dave


Tim Bunce wrote:


On Sat, Jul 04, 2009 at 07:09:20PM +0100, Sentra Systems wrote:
  
  

Hi



Hi Dave.

  
  

Has anything happened with a Parrot JDBC implementation?
Is Parrot stable enough yet?
Has anyone mapped out the minimun subset of JDBC that would be required 
to get DBI working in Perl6?



Here's the (current) plan...

1. Dust off java2perl6
http://search.cpan.org/perldoc?java2perl6
http://code.google.com/p/java2perl6/
and update it to generate valid current perl6 code.

2. Add a type aliasing mechanism (ie for the Java URL type use a Perl
Str type) to java2perl6 so we don't have to implement loads of Java
types before we can get started.

3. Write some kind of very dumb Hello World skeleton JDBC driver,
as a proof of concept that uses the interfaces generated by java2perl

4. Refactor Simon Cozens's SQLite3 DBDI driver to use ('consume') the
generated JDBC interfaces.
http://dev.simon-cozens.org/6pan/browser/trunk/DBDI/DBDI/Driver/SQLite3.pm
That's not working right now, so here's a cached version:

http://google.com/search?q=cache:T8FN2WYvgm0J:dev.simon-cozens.org/6pan/browser/trunk/DBDI/DBDI/Driver/SQLite3.pm

Making a move on this has been high on my list of pre-OSCON tasks
but working on NYTProf has remained a higher priority (there are some
great new features in the next release).

If anyone wants to help out with 1 and 2, you'd be more than welcome!
Send me your email address and I'll give you a commit bit.

Tim.

  
  


  




Std.pm
Description: Perl program


Re: DBDI Status

2009-07-06 Thread Sentra Systems

Tim

Is there a particular reference implementation of java.sql(x) you're 
planning on running the java2perl on? A quick google shows a reference 
API but no obvious reference implementation.


Regards
Dave


Tim Bunce wrote:

On Sat, Jul 04, 2009 at 07:09:20PM +0100, Sentra Systems wrote:
  

Hi



Hi Dave.

  

Has anything happened with a Parrot JDBC implementation?
Is Parrot stable enough yet?
Has anyone mapped out the minimun subset of JDBC that would be required to 
get DBI working in Perl6?



Here's the (current) plan...

1. Dust off java2perl6
http://search.cpan.org/perldoc?java2perl6
http://code.google.com/p/java2perl6/
and update it to generate valid current perl6 code.

2. Add a type aliasing mechanism (ie for the Java URL type use a Perl
Str type) to java2perl6 so we don't have to implement loads of Java
types before we can get started.

3. Write some kind of very dumb Hello World skeleton JDBC driver,
as a proof of concept that uses the interfaces generated by java2perl

4. Refactor Simon Cozens's SQLite3 DBDI driver to use ('consume') the
generated JDBC interfaces.
http://dev.simon-cozens.org/6pan/browser/trunk/DBDI/DBDI/Driver/SQLite3.pm
That's not working right now, so here's a cached version:

http://google.com/search?q=cache:T8FN2WYvgm0J:dev.simon-cozens.org/6pan/browser/trunk/DBDI/DBDI/Driver/SQLite3.pm

Making a move on this has been high on my list of pre-OSCON tasks
but working on NYTProf has remained a higher priority (there are some
great new features in the next release).

If anyone wants to help out with 1 and 2, you'd be more than welcome!
Send me your email address and I'll give you a commit bit.

Tim.

  




Re: DBDI Status

2009-07-06 Thread Tim Bunce
On Mon, Jul 06, 2009 at 02:08:17PM +0100, Sentra Systems wrote:
 Tim

 Is there a particular reference implementation of java.sql(x) you're 
 planning on running the java2perl on? A quick google shows a reference API 
 but no obvious reference implementation.

Any implementation that has the classes will do.  java2perl6 is only
concerned with the class interfaces.  It just runs javap on the class
you give it, parses the class and interfaces definitions it outputs, and
writes corresponding perl6 clasess and roles definitions.

Try running

java2perl6 --outdir jdbc --recurse --nest java.sql.Connection

I've just checked in a file I had on my disk that lists all the
java.sql and javax.sql classess, so you can run

java2perl6 --outdir jdbc --recurse --nest $(cat jdbc_classes.txt)

Tim.

 Regards
 Dave


 Tim Bunce wrote:
 On Sat, Jul 04, 2009 at 07:09:20PM +0100, Sentra Systems wrote:
   
 Hi
 

 Hi Dave.

   
 Has anything happened with a Parrot JDBC implementation?
 Is Parrot stable enough yet?
 Has anyone mapped out the minimun subset of JDBC that would be required 
 to get DBI working in Perl6?
 

 Here's the (current) plan...

 1. Dust off java2perl6
 http://search.cpan.org/perldoc?java2perl6
 http://code.google.com/p/java2perl6/
 and update it to generate valid current perl6 code.

 2. Add a type aliasing mechanism (ie for the Java URL type use a Perl
 Str type) to java2perl6 so we don't have to implement loads of Java
 types before we can get started.

 3. Write some kind of very dumb Hello World skeleton JDBC driver,
 as a proof of concept that uses the interfaces generated by java2perl

 4. Refactor Simon Cozens's SQLite3 DBDI driver to use ('consume') the
 generated JDBC interfaces.
 
 http://dev.simon-cozens.org/6pan/browser/trunk/DBDI/DBDI/Driver/SQLite3.pm
 That's not working right now, so here's a cached version:
 
 http://google.com/search?q=cache:T8FN2WYvgm0J:dev.simon-cozens.org/6pan/browser/trunk/DBDI/DBDI/Driver/SQLite3.pm

 Making a move on this has been high on my list of pre-OSCON tasks
 but working on NYTProf has remained a higher priority (there are some
 great new features in the next release).

 If anyone wants to help out with 1 and 2, you'd be more than welcome!
 Send me your email address and I'll give you a commit bit.

 Tim.

   



Re: DBDI Status

2009-07-05 Thread Harry

Hi all,

Is the parrot DBDI being worked on again.

 Harry
Join team plico. 
http://www.hjackson.org/cgi-bin/folding/index.pl



- Original Message 
From: Tim Bunce tim.bu...@pobox.com
To: Sentra Systems sentra.syst...@ntlworld.com
Cc: dbdi-dev@perl.org; Simon Cozens si...@simon-cozens.org
Sent: Saturday, July 4, 2009 11:36:32 PM
Subject: Re: DBDI Status

On Sat, Jul 04, 2009 at 07:09:20PM +0100, Sentra Systems wrote:
 Hi

Hi Dave.

 Has anything happened with a Parrot JDBC implementation?
 Is Parrot stable enough yet?
 Has anyone mapped out the minimun subset of JDBC that would be required to 
 get DBI working in Perl6?

Here's the (current) plan...

1. Dust off java2perl6
http://search.cpan.org/perldoc?java2perl6
http://code.google.com/p/java2perl6/
and update it to generate valid current perl6 code.

2. Add a type aliasing mechanism (ie for the Java URL type use a Perl
Str type) to java2perl6 so we don't have to implement loads of Java
types before we can get started.

3. Write some kind of very dumb Hello World skeleton JDBC driver,
as a proof of concept that uses the interfaces generated by java2perl

4. Refactor Simon Cozens's SQLite3 DBDI driver to use ('consume') the
generated JDBC interfaces.
http://dev.simon-cozens.org/6pan/browser/trunk/DBDI/DBDI/Driver/SQLite3.pm
That's not working right now, so here's a cached version:

http://google.com/search?q=cache:T8FN2WYvgm0J:dev.simon-cozens.org/6pan/browser/trunk/DBDI/DBDI/Driver/SQLite3.pm

Making a move on this has been high on my list of pre-OSCON tasks
but working on NYTProf has remained a higher priority (there are some
great new features in the next release).

If anyone wants to help out with 1 and 2, you'd be more than welcome!
Send me your email address and I'll give you a commit bit.

Tim.