Second Perl 6 Microgrant - Phil Crow on Java to Perl 6 declaration converter

2007-04-04 Thread Leon Brocard

We're pleased to announce that we've selected Phil Crow as the recipient of the
second Perl 6 microgrant. Phil is the hacker behind the Java::Swing module
which allows Perl programmers to put a Java Swing GUI on their application
without writing any Java and he'll be using this knowledge to convert Java
declarations to Perl 6. You can find details of the project he's
planning in the
text of his grant application:

Tim Bunce has suggested that it would be nice to have a general purpose
declaration translator from Java to Perl.  In particular, he is interested
in leveraging this tool to create a JDBC API for Perl 6 from the
Java JDBC classes and interfaces. The result would then provide a strong
foundation for the Perl 6 DBI.

I propose to write that translator. It would have two pieces:

* One would use the Java deparser (part of its standard development
  kit) to turn Java classes or interfaces into an internal structure

* The other half would turn that structure into valid Perl 6. Note that it would
  only translate class, interface, and method declarations, not code.

Success for this project will be a working translator that generates method
declarations in Perl 6 from compiled Java .class files. While all cases
might not be covered, at least the final product should not die when faced
with the unexpected. The generated files will be tested using the then current
version of Pugs.

This project is new and has only recently been discussed in response to the
call for proposals. I'm sure I will have questions to direct to various
Perl 6 mailing lists as the project progresses.

Phil will be blogging about his grant progress at:

 http://use.perl.org/~philcrow/journal/

This microgrant is supported by additional sponsorship from Tim Bunce / DBI.

Please join us in wishing him the best of luck with his project. We're
really looking forward to seeing the results of this work.If you're
interested in submitting a Perl 6 microgrant proposal, you can find
details here:

 http://www.nntp.perl.org/group/perl.perl5.porters/2007/03/msg122448.html

Best, Leon and Jesse


Re: P6ML?

2003-03-26 Thread Leon Brocard
Michael Lazzaro sent the following bits through the ether:

 My own musing was not something that would accept bad XML, but
 something more geared as a P6-based replacement for the steaming
 hunk of crap known as XSL ... For example, one of the Very First
 Things I'll be doing with Perl6 is, of course, creating a
 P6-specific companion to ASP/JSP/PHP

While risking the chance of going very much off topic, might I suggest
that you don't wait until Perl 6 to do all these. Sure, Perl 6 will be
all-dancing with beautiful syntax but Perl 5 has the advantage of
being here now and not really that different. You can play with
prototypes and desired syntax now, and get something finished by the
release of Perl 6.0.0 ;-)

Leon
-- 
Leon Brocard.http://www.astray.com/
scribot.http://www.scribot.com/

... Are you asking me out? That's so cute. What's your name again?


Perl 6 summary for week beginning 2002-10-07

2002-10-15 Thread Leon Brocard
 name from
attr to has.

There was also some talk on the module versioning system, which could be
done with a slice-like notation:

  use Acme[1.0];  # like so
  use Acme[ (1;17..) | (2;0..) ]; # or perhaps
  use Acme[1;17..] | Acme[2;0..]; # or even

I'm pretty sure he was joking, but Larry considered alternatives to the
..., which issues a warning (or maybe an exception) if you try to
execute it. ??? would never complain and !!! would always throw an
exception. Or the other way around. Or one is fatal. Or more likely,
stick with ... and make its behaviour pragmatically controllable.
... is useful for abstract method declaration.

There definitely wasn't any talk about  and |||.

  Perl6 OO Cookbook
Michael Lazzaro made good on his promise last week and produced a
comprehensive Perl 6 OO cookbook describing stuff that hasn't yet been
designed, for a language that doesn't yet exist. It is a great piece of
work and tries to examine real life Perl 6 examples.

There was some discussion of the recipes and the Michael announced that
he wanted to work on an online system for adding new data and many other
changes. Worried about Perl 6 OO? Then check this out:

http://cog.cognitivity.com/perl6/

  In brief
Some of the Parrot tests still don't work under Win32.

Some bugs in various bits of the Parrot JITs were found, and some fixed.

Dakkar found a bug in the Perl 6 compiler which basically boiled down to
checking for truth instead of definedness. Hopefully Perl 6 will remove
this particular problem for us ;-)

We probably need more tinderboxes.

Brent Dax promises to fit a pony into his next patch.

Simon Glover added quite a few tests and pieces of documentation.

C structs need to be padded for the more exotic architectures and
compilers.

There are still some DOD / GC bugs.

  Who's Who in Perl6
Once more we get to meet people involved in the development of Perl 6.

Who are you?
Jerome Quelin.

What do you do for/with Perl 6?
I wrote a Befunge interpreter in Parrot assembly. Now I'm waiting
for Parrot to handle multiarrays and objects in order to implement
the Befunge-98 specs.

Where are you coming from?
Some Perl Golf rumors have said that I'm an alien coming from Mars.

When do you think Perl 6 will be released?
Some day.

Why are you doing this?
In order to have a chance to understand Perl 6 sources. And because
Befunge is a fun language, that deserves to be supported by Parrot.

You have 5 words. Describe yourself.
Perl Golf and Befunge addicted.

Do you have anything to declare?
Befunge rocks.

  Acknowledgements
This summary was brought to you with slightly less distraction from
Super Mario Sunshine and more recognition of the sterling work that
Piers does every week.

As Piers says: One more, if you think this summary has value send money
to the Perl Foundation http://donate.perl-foundation.org and feed back
and/or T?iBooks to me, mailto:[EMAIL PROTECTED]. As usual, the fee
paid for publication of this summary on perl.com has been donated
directly to the Perl Foundation.

Enjoy, Leon
-- 
Leon Brocard.http://www.astray.com/
scribot.http://www.scribot.com/

 f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng



Re: Indeterminate math

2002-10-14 Thread Leon Brocard

Michael G Schwern sent the following bits through the ether:

 Someone [1] wanted to know if 1/0 would produce a divide by zero
 error in Perl 6, or if it would return a value representing an
 indeterminate result (undef?)

This is probably the mathematician in me escaping, but I also remember
a discussion at Y::E about number systems. What if you didn't want
Perl to use the normal number system, but instead only have, say,
positive integers, or integers modulo prime P. This is possible with
Perl 5, but with lots of scary overloading. Will it be any different
in Perl 6? [Or are we not quite there yet?]

Cheers, Leon
-- 
Leon Brocard.http://www.astray.com/
scribot.http://www.scribot.com/

 Any wire cut to length will be too short



Perl 6 summary for week beginning 2002-09-30

2002-10-06 Thread Leon Brocard
 informed us that it looks
like the full name of classes will include their version number, ie
Acme::N-1.1.

In fact, a lot of the discussion is a bit in the air: as Dan Sugalski
pointed out, things like object attributes aren't until Apocalypse 12
and it may be a little early to worry about such things.

http://makeashorterlink.com/?Q19B21502

http://makeashorterlink.com/?H5AB54502

  Subject-Oriented Programming
Schwern also asked about subject-oriented programming, which looked
interesting but which he couldn't quite understand. Andy Wardley
explained that all these advanced programming techniques are all
attempting a clear separation of concerns, and went on to describe and
give pointers to more info.

http://makeashorterlink.com/?K1BB21502

  Matching
Someone mysteriously known only as Ed asked what the favoured syntax
would be to match negative multi-byte strings in Perl 6. It wasn't
entirely clear what the question was, but one thing is sure: the Perl 6
pattern matching engine will have a lot of scope for optimisation.

http://makeashorterlink.com/?S5CB11502

  In brief
Tim Bunce asked if there were any good tools for static code analysis
around. None, apparently.

Brent Dax reminded Andy Dougherty and others about
/Parrot_v?sn?printf(_[sc])?/ in misc.c - a reimplementation of the
printf functions for portability reasons.

Simon Glover added tests for the assign opcode.

It looks like Michael Lazzaro will be writing a list of issues with OO
as well as a tutorial so that everyone is clear what exactly we are
talking about.

Larry cringes every time someone says Parens construct lists in Perl
6.

  Who's Who in Perl6
Once more we get to meet people involved in the development of Perl 6.

Who are you?
Simon Cozens

What do you do for/with Perl 6?
I was the Parrot pumpking up until 0.0.4, and wrote much of the PMC
and string infrastructure. I then escaped to get a life, play more
Go and be a nicer person.

As perl.com editor and occasional author, I pop in from time to time
just to check on the correctness of things I'm writing about and
make sure Parrot compiles on at least one platform I possess so I
can test code for articles. Rumours of my return to development have
been greatly exaggerated. :)

Where are you coming from?
I'm not, I'm already here!

When do you think Perl 6 will be released?
I don't think Perl 6 - as we understand it - ever will be released.
How's that for a Delphic pronouncement?

Why are you doing this?
Because I like food.

You have 5 words. Describe yourself.
Less vehemently obnoxious than before.

Do you have anything to declare?
Watch out for some surprises in the near future.

  Acknowledgements
This summary was brought to you with much distraction indeed from Super
Mario Sunshine. Thanks to Kate Pugh and #london.pm for proofreading.

As Piers says: One more, if you think this summary has value send money
to the Perl Foundation http://donate.perl-foundation.org and feed back
and/or T?iBooks to me, mailto:[EMAIL PROTECTED]. As usual, the fee
paid for publication of this summary on perl.com has been donated
directly to the Perl Foundation.

Enjoy, Leon
-- 
Leon Brocard.http://www.astray.com/
scribot.http://www.scribot.com/

 Bioengineers wear designer genes



Perl 6 summary for week ending 2002-07-21

2002-07-22 Thread Leon Brocard

=head1 TITLE

Perl 6 summary for week ending 2002-07-21

=head1 AUTHOR

Leon Brocard [EMAIL PROTECTED]

=head1 DETAILS

Another week, another Perl 6 summary. Cunningly this week I have taken
over the summary from Piers in order to make it easier for me to
namecheck myself. It's been a good week too, with more happening in
perl6-internals than perl6-language. So that's where I'll start...

=head2 Parrot 0.0.7

The big news for this week is that DrForr has released Parrot 0.0.7 to
the world (strange that lots of open source projects are releasing
code just before the O'Reilly Open Source conference...). This release
contains a Perl 6 grammar (with small, partial compiler!), functional
subroutine, coroutine and continuation PMCs, global variables, an
intermediate code compiler (imcc), a pure-Perl assembler and working
garbage collection. The name is Parrot. Percy Parrot.

http:[EMAIL PROTECTED]/msg11090.html
http://www.cpan.org/modules/by-authors/id/J/JG/JGOFF/parrot_0.0.7.tgz

Note that the really cool Perl 6 compiler needs at least Perl 5.6. Oh,
and check out imcc if you haven't looked at it yet.

=head2 Retro Perl

Nicholas Clark stated that In October 2000 I believed that 5.005
maintenance *is* important for the acceptance of perl6, and I still do
now. A first patch to the preliminary Perl 6 compiler was sent by
Leopold Toetsch to make it work on 5.005_03 and seeing as Chip
Salzenberg has restarted work on a new maintenance release of Perl
5.005 it's probably good for various parts of Parrot to run on retro
perls. Shouldn't be a major problem.

=head2 Parrot docs

One of the big pushes last week was for more documentation inside
Parrot. Writing documentation is always a problem for an open source
project and it hit the wall last week. The good news is that lots of
new documentation has been added to Parrot.

There was some discussion on the nature of documentation. The result
is that inline C documention should write up API details and that
longer discussions (say, the choice of algorithms, how to avoid
overflows in unsigned arithmetic, the pros and cons of differing
hash algorithms) would end up as .dev files inside the docs/dev/
directory, much as PDD07 Conventions and Guidelines for Perl Source
Code says. A few more documentation patches followed.

Recently the mailing list and IRC channel have been quite busy and it
seems like the new push for more documentation has attracted new
people. Bonus!

http:[EMAIL PROTECTED]/msg11080.html

=head2 MANIFESTations

The Parrot MANIFEST file tends not to be kept up-to-date with recent
additions. Andy Dougherty produced a patch to do this. Nicholas Clark
asked: Is CVS flexible enough to let us run a manifest check on each
commit and generate warnings that get sent somewhere useful if it
fails?. Robert Spier answered that it could and with any luck he'll
get it in soon...

=head2 RECALL

Tanton Gibbs posted a patch to clean up a problem with our Copy on
Write strategy. He kindly explained it for me: The basic problem is
that in perlint.pmc we have something like:

  void set_string( PMC* value ) {
CHANGE_TYPE( SELF, PerlString );
SELF-data = value-data
  }

In other words implement a COW strategy after being changed into a
PerlString. However, in perlstring.pmc the following is performed:

  void set_string( PMC* value ) {
SELF-data = string_copy( INTERP, value-data );
  }

The RECALL command automates that so that set_string now looks like:

  void set_string( PMC* value ) {
CHANGE_TYPE( pmc, PerlString );
RECALL;
  }

Thanks to Tanton for explaining.

=head2 Internals misc

There were also lots of other small patches and discussions. It looks
like the push for this week is to make it easier to add new PMCs to
Parrot.

=head2 Meanwhile, in perl6-language

It was a quiet week in the perl6-language list, which is probably a
good thing as thinking too much about hyper operators makes my head
hurt.

=head2 Hyper operators

There was some discussion on hyper operators this week. It didn't go
anywhere in particular, but discussed lots of syntax. Objections such
as this code looks ugly! came up regularly when talking about code
such as:

  @solution =  (^-@b + sqrt(@b^**2 ^+ 4^*@a^*@c) ) ^/ (2^*@a);

Luke Palmer pointed out that it might be better expressed as:

  for @a; @b; @c; @s is rw -
$a; $b; $c; $s {
  $s = (-$b + sqrt($b**2 - 4*$a*$c)) / (2*$a)
  }

Karl Glazebrook explained that PDL keeps everything as objects and
does hyper operator magic without additional syntax. So Perl 6 @y =
$a ^* @x ^+ @b happens in PDL with the clearer $y = $a * $x + $b.
Isn't PDL shiny?

=head1 Whitespace?

Brent Dax noticed that there might be a problem with the regular
expression modifier :w. The words modifier, according to Apocalypse
5 , causes an implicit match of whitespace wherever there's literal
whitespace in a pattern. He asked what the following expand to:

  m:w/foo [~|bar]/
  m:w/[~|bar] foo/
  m:w/[~|bar] [^|baz]/
  m:w/@foo @bar/

Luke Palmer

Re: RFC 71 (v1) Legacy Perl $pkg'var should die

2000-08-09 Thread Leon Brocard

Damian Conway sent the following bits through the ether:

 If you take this, I won't be able to port the forthcoming Klingon.pm
 module to Perl 6!!!

D'oh! ;-)

Leon
-- 
Leon Brocard.http://www.astray.com/
yapc::Europe - September 22-24 London - http://yapc.org/Europe/

... Error 404: .signature generator ran out of tuits



Re: Things to remove

2000-08-08 Thread Leon Brocard

Martyn J. Pearce sent the following bits through the ether:

 I use this in one-liners, and it's _dead_ handy

May I suggest that Perl6 will be a different language? I've seen the
"I use it, don't change it" argument a couple of times now and it's
not a strong enough argument. The whole point is to clean up the
language.

Cheers! Leon
-- 
Leon Brocard.http://www.astray.com/
yapc::Europe - September 22-24 London - http://yapc.org/Europe/

... Error 404: .signature generator ran out of tuits



Re: Infinite lists (was Re: RFC 24 (v1) Semi-finite (lazy) lists)

2000-08-07 Thread Leon Brocard

Damian Conway sent the following bits through the ether:

 Rather than continue to argue the details, why don't people post some
 examples of code where they feel these lazy lists might be useful, and
 let's see if there aren't already good alternatives.

It should be noted that "infinite" lazily-evaluated lists can be used
in Perl 5 in a perlish way with careful use of Tie::Array and
closures.

I've got an example of this in my poorly-coded Functional module[1],
which allows things like: 

  take(10, filter("prime", integers))

[yes, that is perl ;-] ... (which is done lazily)

Anything to make this easier to do in Perl 6 is welcomed ;-)

Leon

[1] http://www.astray.com/Functional/
-- 
Leon Brocard.http://www.astray.com/
yapc::Europe - September 22-24 London - http://yapc.org/Europe/

... Error 404: .signature generator ran out of tuits