From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109984 invoked by alias); 2 Apr 2017 15:12:54 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 109963 invoked by uid 89); 2 Apr 2017 15:12:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=pleasant, Hx-languages-length:2590, H*M:bf03, research X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 02 Apr 2017 15:12:51 +0000 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1cuhBR-00026K-Ed; Sun, 02 Apr 2017 17:12:49 +0200 Received: from 70-36-239-167.dsl.dynamic.fusionbroadband.com ([70.36.239.167] helo=localhost.localdomain) by mailfront10.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1cuhBQ-0001xN-CO; Sun, 02 Apr 2017 17:12:48 +0200 Subject: Re: Question, GSoC Idea `Easier Access to Native Libraries using JNA/JNR" To: Vasantha Ganesh , kawa@sourceware.org References: From: Per Bothner Message-ID: <30c20dfb-bf03-fdb4-fbcb-3e963d780cdf@bothner.com> Date: Sun, 02 Apr 2017 15:12:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-q2/txt/msg00017.txt.bz2 On 04/02/2017 04:07 AM, Vasantha Ganesh wrote: > I have been trying to write a proposal for ``Easier Access to Native > Libraries using JNA/JNR" idea for my GSoC project. > > The access to native libraries is available through popular libraries > such as JNA and JNR. Access to native libraries in Kawa is just like > any other Java library in a very consistent way (strengths of Kawa?). > > I tried looking into the Ruby wrappers. JRuby is trying to make their > FFI API compliant with other implementations. So that Code on JRuby > can run in the same way as other Ruby implementations. > > Common lisp is trying to do something similar with CFFI. Common lisp > implementations are trying to make their code that can run on other > implementations in the same way. This calls for a common API (CFFI). Looks like you've done some good research. > But in scheme we are not trying to be compliant with any other Scheme > implementations. Take Guile and Kawa for example. Guile code does not > necessarily run on Kawa. Also, Guile has its own FFI. > > These are just my views. I would like to know the motivation of this > project because I'm fuzzy about the usefulness of this project. I'm afraid I haven't JNA or JNR myself, so I don't know firsthald how useful they are, or how much a Kawa binding would help. What was an open question was whether a Kawa wrapper (i.e. some well-design Scheme procedures and/or macros) would make JNA or JNR easier to use. You've suggested that it probably wouldn't. Or at least we don't have enough experience with possible "pain points" to identify areas where a Kawa wrapper would make using JNR noticeable easier or more pleasant, partly because Kawa already makes it very easy and pleasant to use the Java API as-is. Right? > It might be a little late to write proposal for other ideas. Probably You could take a look at the "function types using MethodHandles" idea that I mentioned in an email March 13, and detailed here: https://www.gnu.org/software/kawa/Ideas-and-tasks.html#Optimized-function-types-and-values-using-MethodHandles This is definitely useful, and at least I myself understand both the problem and a general direction for solving it. You could use the text from my link. The problem is it requires a fair bit of understanding of Kawa. For a GSoC proposal you should should that you understand the problem and have a general plan for how to solve it. That may be difficult in less than 2 days. -- --Per Bothner per@bothner.com http://per.bothner.com/