[gdal-dev] FFI Interface (to Perl)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] FFI Interface (to Perl)

Ari Jolma-2
Folks,

I've been experimenting with the Perl module FFI::Platypus, to create a
Perl interface to GDAL with its help(1) and it's progressing well.
FFI::Platypus itself uses libffi, which is a portable interface library.
That, and Alien::gdal, which is a Perl module to use GDAL in a system
that has Perl, allow some significant simplifications and streamlining
for the Perl bindings.

I can imagine those leading to the retirement of the Swig based Perl
bindings at some point (like GDAL 3.0) and having only a single
distribution of Perl GDAL bindings that does not live in GDAL source
tree and is distributed through CPAN. In the meantime the Swig based
bindings will live in GDAL source tree and a copy of that with a
modified configuration system (that uses the Alien::gdal) in github(2) +
CPAN.

I don't think I'm aiming at 100% similar API with the FFI interface than
Geo::GDAL since in the latter has accumulated some undesirable things
over the years. Anybody interested in the new API is welcome to collaborate.

Best regards,

Ari

(1) https://github.com/ajolma/Geo-GDAL-FFI

(2) https://github.com/ajolma/Geo-GDAL-2.02


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: FFI Interface (to Perl)

Kurt Schwehr-2
Cool!  Should be useful for other languages to see what is possible with libffi

On Dec 20, 2017 3:23 PM, "Ari Jolma" <[hidden email]> wrote:
Folks,

I've been experimenting with the Perl module FFI::Platypus, to create a Perl interface to GDAL with its help(1) and it's progressing well. FFI::Platypus itself uses libffi, which is a portable interface library. That, and Alien::gdal, which is a Perl module to use GDAL in a system that has Perl, allow some significant simplifications and streamlining for the Perl bindings.

I can imagine those leading to the retirement of the Swig based Perl bindings at some point (like GDAL 3.0) and having only a single distribution of Perl GDAL bindings that does not live in GDAL source tree and is distributed through CPAN. In the meantime the Swig based bindings will live in GDAL source tree and a copy of that with a modified configuration system (that uses the Alien::gdal) in github(2) + CPAN.

I don't think I'm aiming at 100% similar API with the FFI interface than Geo::GDAL since in the latter has accumulated some undesirable things over the years. Anybody interested in the new API is welcome to collaborate.

Best regards,

Ari

(1) https://github.com/ajolma/Geo-GDAL-FFI

(2) https://github.com/ajolma/Geo-GDAL-2.02


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: FFI Interface (to Perl)

Sean Gillies-3
Ari,

This sounds great. I don't use Perl as much as I used to – unless you count GNU Parallel, which I use about 320 hours a day – but I'll follow your progress.

It seems to me that the idea of a common API across different scripting languages isn't attractive to programmers like it once was. R and Node.js interfaces for GDAL are being developed elsewhere, as are my Rasterio and Fiona projects. As long as we're all attentive to the maintenance of the core library the diversity is a good thing.

Shapely uses libffi to bind GEOS functions. The only reason I don't use libffi (and Python's cffi module) for Rasterio and Fiona is that Cython makes integration with Numpy so painless.


On Wed, Dec 20, 2017 at 5:14 PM, Kurt Schwehr <[hidden email]> wrote:
Cool!  Should be useful for other languages to see what is possible with libffi

On Dec 20, 2017 3:23 PM, "Ari Jolma" <[hidden email]> wrote:
Folks,

I've been experimenting with the Perl module FFI::Platypus, to create a Perl interface to GDAL with its help(1) and it's progressing well. FFI::Platypus itself uses libffi, which is a portable interface library. That, and Alien::gdal, which is a Perl module to use GDAL in a system that has Perl, allow some significant simplifications and streamlining for the Perl bindings.

I can imagine those leading to the retirement of the Swig based Perl bindings at some point (like GDAL 3.0) and having only a single distribution of Perl GDAL bindings that does not live in GDAL source tree and is distributed through CPAN. In the meantime the Swig based bindings will live in GDAL source tree and a copy of that with a modified configuration system (that uses the Alien::gdal) in github(2) + CPAN.

I don't think I'm aiming at 100% similar API with the FFI interface than Geo::GDAL since in the latter has accumulated some undesirable things over the years. Anybody interested in the new API is welcome to collaborate.

Best regards,

Ari

(1) https://github.com/ajolma/Geo-GDAL-FFI

(2) https://github.com/ajolma/Geo-GDAL-2.02


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev



--
Sean Gillies

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: FFI Interface (to Perl)

Ari Jolma-2
Sean Gillies kirjoitti 21.12.2017 klo 11:48:
Ari,

This sounds great. I don't use Perl as much as I used to – unless you count GNU Parallel, which I use about 320 hours a day – but I'll follow your progress.

It seems to me that the idea of a common API across different scripting languages isn't attractive to programmers like it once was. R and Node.js interfaces for GDAL are being developed elsewhere, as are my Rasterio and Fiona projects. As long as we're all attentive to the maintenance of the core library the diversity is a good thing.

I'm more interested in mixing Perl with R for example (sending some things from Perl to be done in R) than having a common API. Every language has its traditions for API.


Shapely uses libffi to bind GEOS functions. The only reason I don't use libffi (and Python's cffi module) for Rasterio and Fiona is that Cython makes integration with Numpy so painless.

So far I've not tried integration with PDL, which is for similar purposes than Numpy. We'll see how that goes eventually, it is anyway something I use for raster processing.

Ari



On Wed, Dec 20, 2017 at 5:14 PM, Kurt Schwehr <[hidden email]> wrote:
Cool!  Should be useful for other languages to see what is possible with libffi

On Dec 20, 2017 3:23 PM, "Ari Jolma" <[hidden email]> wrote:
Folks,

I've been experimenting with the Perl module FFI::Platypus, to create a Perl interface to GDAL with its help(1) and it's progressing well. FFI::Platypus itself uses libffi, which is a portable interface library. That, and Alien::gdal, which is a Perl module to use GDAL in a system that has Perl, allow some significant simplifications and streamlining for the Perl bindings.

I can imagine those leading to the retirement of the Swig based Perl bindings at some point (like GDAL 3.0) and having only a single distribution of Perl GDAL bindings that does not live in GDAL source tree and is distributed through CPAN. In the meantime the Swig based bindings will live in GDAL source tree and a copy of that with a modified configuration system (that uses the Alien::gdal) in github(2) + CPAN.

I don't think I'm aiming at 100% similar API with the FFI interface than Geo::GDAL since in the latter has accumulated some undesirable things over the years. Anybody interested in the new API is welcome to collaborate.

Best regards,

Ari

(1) https://github.com/ajolma/Geo-GDAL-FFI

(2) https://github.com/ajolma/Geo-GDAL-2.02


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev



--
Sean Gillies


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: FFI Interface (to Perl)

Joaquim Luis

You have also the Julia wrapper that needs no ffi lib to do the bindings

 

https://github.com/visr/GDAL.jl

 

From: gdal-dev [mailto:[hidden email]] On Behalf Of Ari Jolma
Sent: Thursday, December 21, 2017 1:03 AM
To: Sean Gillies <[hidden email]>; Kurt Schwehr <[hidden email]>
Cc: gdal dev <[hidden email]>
Subject: Re: [gdal-dev] FFI Interface (to Perl)

 

Sean Gillies kirjoitti 21.12.2017 klo 11:48:

Ari,

 

This sounds great. I don't use Perl as much as I used to – unless you count GNU Parallel, which I use about 320 hours a day – but I'll follow your progress.

 

It seems to me that the idea of a common API across different scripting languages isn't attractive to programmers like it once was. R and Node.js interfaces for GDAL are being developed elsewhere, as are my Rasterio and Fiona projects. As long as we're all attentive to the maintenance of the core library the diversity is a good thing.


I'm more interested in mixing Perl with R for example (sending some things from Perl to be done in R) than having a common API. Every language has its traditions for API.


 

Shapely uses libffi to bind GEOS functions. The only reason I don't use libffi (and Python's cffi module) for Rasterio and Fiona is that Cython makes integration with Numpy so painless.


So far I've not tried integration with PDL, which is for similar purposes than Numpy. We'll see how that goes eventually, it is anyway something I use for raster processing.

Ari


 

 

On Wed, Dec 20, 2017 at 5:14 PM, Kurt Schwehr <[hidden email]> wrote:

Cool!  Should be useful for other languages to see what is possible with libffi

 

On Dec 20, 2017 3:23 PM, "Ari Jolma" <[hidden email]> wrote:

Folks,

I've been experimenting with the Perl module FFI::Platypus, to create a Perl interface to GDAL with its help(1) and it's progressing well. FFI::Platypus itself uses libffi, which is a portable interface library. That, and Alien::gdal, which is a Perl module to use GDAL in a system that has Perl, allow some significant simplifications and streamlining for the Perl bindings.

I can imagine those leading to the retirement of the Swig based Perl bindings at some point (like GDAL 3.0) and having only a single distribution of Perl GDAL bindings that does not live in GDAL source tree and is distributed through CPAN. In the meantime the Swig based bindings will live in GDAL source tree and a copy of that with a modified configuration system (that uses the Alien::gdal) in github(2) + CPAN.

I don't think I'm aiming at 100% similar API with the FFI interface than Geo::GDAL since in the latter has accumulated some undesirable things over the years. Anybody interested in the new API is welcome to collaborate.

Best regards,

Ari

(1) https://github.com/ajolma/Geo-GDAL-FFI

(2) https://github.com/ajolma/Geo-GDAL-2.02


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

 


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev



 

--

Sean Gillies

 


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev