You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Ron Blaschke <ma...@rblasch.org> on 2004/11/10 11:01:10 UTC
[convert] Type Conversion Library
Some time ago, I came to this group with a proposal for a generic type
conversion library. As a refresher, it is a graph based solution,
where you just drop in your converters and the library will try to
figure out a possible path.
Some example conversions that are working include
- String -> Integer (via String -> Long -> Integer path)
- u[] -> v[], given the library knows how to convert u -> v (eg, you
can simple say
final byte[] bytes = converter.convert(new int[]{1,2,3}, Types.findType("byte[]"));
- u[] -> List<u>, given the library knows how to convert u -> v
The library's primary goal is to be generic. Quite useful for rapid
prototyping, or generic conversion (when you don't quite know the input
or output type).
Since you guys weren't too eager on my initial proposal, I don't
expect that you are now - which is ok, really.
But the library may or may not contain thoughts from our initial
discussion, so I'd like to make sure that it is ok that I publish the
library at my discretion.
Thanks,
Ron
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [convert] Type Conversion Library
Posted by Ron Blaschke <ma...@rblasch.org>.
Thursday, November 11, 2004, 6:54:44 PM, Henri Yandell wrote:
> You can do what you want with your own copy of any code you send in to
[snip]
Thanks for the info.
> recently stopped using it and am building again from scratch.
I am looking forward to seeing your approach.
> My suggestion is that you release your library on your own and see how
> it goes. As long as it's licence compatible (simplest being to use
> ASL-2), we'll be very interested in seeing how it goes and probably
> all be interested in becoming users of it.
Yup, I'll do that.
Thanks again,
Ron
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [convert] Type Conversion Library
Posted by Henri Yandell <fl...@gmail.com>.
It breaks down like this:
You can do what you want with your own copy of any code you send in to
Apache; it's only when you start doing things with code that has been
modified, through Apache, by another contributor/committer that you
have to start worrying a lot. So +1 to releasing your library,
provided it doesn't contain any of the code from Struts, BeanUtils,
Convert etc. If it does; follow the ASL licence and say "This contains
code from Apache..." etc.
I think we're pretty interested in a commons-convert, but those
interested haven't had time to work on it. I continued to use my
variant of commons-convert for a bit on various projects, but have
recently stopped using it and am building again from scratch.
My suggestion is that you release your library on your own and see how
it goes. As long as it's licence compatible (simplest being to use
ASL-2), we'll be very interested in seeing how it goes and probably
all be interested in becoming users of it.
Hen
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [convert] Type Conversion Library
Posted by Ron Blaschke <ma...@rblasch.org>.
Wednesday, November 10, 2004, 11:56:04 PM, robert burrell donkin wrote:
> On 10 Nov 2004, at 22:46, Stephen Colebourne wrote:
>> This is a legal question, and most of us aren't very good at those ;-(
>>
>> I believe that if your new work is derived directly from the original
>> source
>> you gave to the ASF, and is not derived from any later additions made
>> whilst
>> part of [convert], then the code is still just yours to do as your
>> wish. But
>> IANAL.
> this is also my understanding (again, though, IANAL). if this isn't
> good enough for you, then probably general at jakarta would be a better
> place to raise this issue. maybe a member or henri will be able to give
> you a more definitive answer...
> of course, the derived contributions are also be built on providing
> that you abide by the terms of the ASL2.0 (which aren't very onerous).
Thanks for your responses. I'm planning to distribute it under der
Apache License as well, so I hope there are little or no issues.
What I don't know is if you guys would be interested in the library as
part of commons.
Ron
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [convert] Type Conversion Library
Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On 10 Nov 2004, at 22:46, Stephen Colebourne wrote:
> This is a legal question, and most of us aren't very good at those ;-(
>
> I believe that if your new work is derived directly from the original
> source
> you gave to the ASF, and is not derived from any later additions made
> whilst
> part of [convert], then the code is still just yours to do as your
> wish. But
> IANAL.
this is also my understanding (again, though, IANAL). if this isn't
good enough for you, then probably general at jakarta would be a better
place to raise this issue. maybe a member or henri will be able to give
you a more definitive answer...
of course, the derived contributions are also be built on providing
that you abide by the terms of the ASL2.0 (which aren't very onerous).
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [convert] Type Conversion Library
Posted by Stephen Colebourne <sc...@btopenworld.com>.
This is a legal question, and most of us aren't very good at those ;-(
I believe that if your new work is derived directly from the original source
you gave to the ASF, and is not derived from any later additions made whilst
part of [convert], then the code is still just yours to do as your wish. But
IANAL.
Stephen
----- Original Message -----
From: "Ron Blaschke" <ma...@rblasch.org>
> Some time ago, I came to this group with a proposal for a generic type
> conversion library. As a refresher, it is a graph based solution,
> where you just drop in your converters and the library will try to
> figure out a possible path.
>
> Some example conversions that are working include
> - String -> Integer (via String -> Long -> Integer path)
> - u[] -> v[], given the library knows how to convert u -> v (eg, you
> can simple say
> final byte[] bytes = converter.convert(new int[]{1,2,3},
Types.findType("byte[]"));
>
> - u[] -> List<u>, given the library knows how to convert u -> v
>
> The library's primary goal is to be generic. Quite useful for rapid
> prototyping, or generic conversion (when you don't quite know the input
> or output type).
>
> Since you guys weren't too eager on my initial proposal, I don't
> expect that you are now - which is ok, really.
>
> But the library may or may not contain thoughts from our initial
> discussion, so I'd like to make sure that it is ok that I publish the
> library at my discretion.
>
> Thanks,
> Ron
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [convert] Type Conversion Library
Posted by Ron Blaschke <ma...@rblasch.org>.
Wednesday, November 10, 2004, 8:15:51 PM, Kris Nuttycombe wrote:
> I'm certainly interested in type conversion problems. Are you working
> with the existing commons-convert project in the sandbox?
No, it's something different that currently just lives on my hard
disk. The code is somewhat messy, and may be of little use for
others right now. But I'm about to start working on the
documentation.
The approach is nothing really fancy. It contains a simple type
system, to model primitives, classes and parametric types, a graph to
"draw" the conversions and a lookup (currently Dijkstra's shortest
path algorithm) to find a conversion path.
Once I've got the basic documentation in place I'll put it up
somewhere, and gladly drop you a note.
Ron
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [convert] Type Conversion Library
Posted by Kris Nuttycombe <Kr...@noaa.gov>.
I'm certainly interested in type conversion problems. Are you working
with the existing commons-convert project in the sandbox?
Kris
Ron Blaschke wrote:
>Some time ago, I came to this group with a proposal for a generic type
>conversion library. As a refresher, it is a graph based solution,
>where you just drop in your converters and the library will try to
>figure out a possible path.
>
>Some example conversions that are working include
> - String -> Integer (via String -> Long -> Integer path)
> - u[] -> v[], given the library knows how to convert u -> v (eg, you
> can simple say
>final byte[] bytes = converter.convert(new int[]{1,2,3}, Types.findType("byte[]"));
>
> - u[] -> List<u>, given the library knows how to convert u -> v
>
>The library's primary goal is to be generic. Quite useful for rapid
>prototyping, or generic conversion (when you don't quite know the input
>or output type).
>
>Since you guys weren't too eager on my initial proposal, I don't
>expect that you are now - which is ok, really.
>
>But the library may or may not contain thoughts from our initial
>discussion, so I'd like to make sure that it is ok that I publish the
>library at my discretion.
>
>Thanks,
>Ron
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>
>
--
=====================================================
Kris Nuttycombe
Associate Scientist
Geospatial Data Services Group
CIRES, National Geophysical Data Center/NOAA
(303) 497-6337
Kris.Nuttycombe@noaa.gov
=====================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org