From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115101 invoked by alias); 3 Feb 2017 20:33:41 -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 115087 invoked by uid 89); 3 Feb 2017 20:33:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.6 required=5.0 tests=BAYES_50,KAM_INFOUSMEBIZ autolearn=no version=3.3.2 spammy=H*M:info, universe, H*r:sk:kawa@so, H*RU:0.0.0.0 X-HELO: egyptian.birch.relay.mailchannels.net Received: from egyptian.birch.relay.mailchannels.net (HELO egyptian.birch.relay.mailchannels.net) (23.83.209.56) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Feb 2017 20:33:30 +0000 X-Sender-Id: hostpapa|x-authuser|peter@peterlane.info Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 1C97E141DDE for ; Fri, 3 Feb 2017 20:33:28 +0000 (UTC) Received: from hp114.hostpapa.com (unknown [100.96.16.189]) by relay.mailchannels.net (Postfix) with ESMTPA id 286DE141C34 for ; Fri, 3 Feb 2017 20:33:27 +0000 (UTC) X-Sender-Id: hostpapa|x-authuser|peter@peterlane.info Received: from hp114.hostpapa.com ([TEMPUNAVAIL]. [172.20.90.159]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.7.14); Fri, 03 Feb 2017 20:33:27 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: hostpapa|x-authuser|peter@peterlane.info X-MailChannels-Auth-Id: hostpapa X-MC-Loop-Signature: 1486154007484:3410345861 X-MC-Ingress-Time: 1486154007483 Received: from host86-137-207-130.range86-137.btcentralplus.com ([86.137.207.130]:48034 helo=[192.168.1.64]) by hp114.hostpapa.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1cZkXl-0014o2-AU for kawa@sourceware.org; Fri, 03 Feb 2017 20:33:18 +0000 To: kawa@sourceware.org From: Peter Lane Subject: Java arrays to Scheme Message-ID: <875fc6cc-c8e6-7eca-4b47-4f02e6195df4@peterlane.info> Date: Fri, 03 Feb 2017 20:33:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=0.6 X-AuthUser: peter@peterlane.info X-IsSubscribed: yes X-SW-Source: 2017-q1/txt/msg00047.txt.bz2 Hi list, I'm trying to understand how to interact with Java functions which return arrays, e.g. double[][] or int[]. When I call a function which returns an int[] or double[][] they display as numbers within [ ... ] square brackets. I can extract their length and elements, e.g. using (x 0) etc where x is the array. What kind of object are these in the Scheme universe? array? vector? and the uniform vector tests return #f. I tried an idea I found under uniform vectors, to try to make a uniform vector share the Java array, but I only get type errors. I would like to convert these Java arrays into a Scheme list or vector, which should be a simple function to write. But is there a function/trick like that already? thanks, Peter. -- Peter Lane http://peterlane.info/scheme.html