From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: Matrix or array operations library Date: Mon, 24 Dec 2018 16:21:12 -0800 Message-ID: References: <7a362a59-3a4d-44c8-f4cd-5b232b6dffce@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1545697200 24544 195.159.176.226 (25 Dec 2018 00:20:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Dec 2018 00:20:00 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Dec 25 01:19:56 2018 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbaRw-0006HM-4v for guile-user@m.gmane.org; Tue, 25 Dec 2018 01:19:56 +0100 Original-Received: from localhost ([127.0.0.1]:39217 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbaU2-0000r0-DT for guile-user@m.gmane.org; Mon, 24 Dec 2018 19:22:06 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbaTW-0000qs-6s for guile-user@gnu.org; Mon, 24 Dec 2018 19:21:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbaTR-0003w6-0z for guile-user@gnu.org; Mon, 24 Dec 2018 19:21:34 -0500 Original-Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:37757) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gbaTQ-0003on-QW for guile-user@gnu.org; Mon, 24 Dec 2018 19:21:28 -0500 Original-Received: by mail-pl1-x62e.google.com with SMTP id b5so6030233plr.4 for ; Mon, 24 Dec 2018 16:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=FjCpvhZX6LkDrzSozA4jNGVfuFZFNa0vx4s73IRQth0=; b=a8WdFzJfTsOX8utzIUJJAHOy/X4uj2T7YnPcp10YTzjOdMo7+AW2L8PfU3Ds38SGdn CraPDyDAmvW54/zZ4yzu3xGlYLNLaDlzAMy2CCOYpw6jM9I6BsjK0q7bBeaKKc4uIs/J X7FkEeesFp4EKxFSpEw09gPpIHEyiGWmfPXQP5taDFMY1th23w+wKMSLPrTonMpAW/Nx 7/6xJ2aHPNNzu800UW66tG3kDmYWILov2DEqg+hWdCR4pvyEu9+kMj6hYVJZh64FKtqq Fq5VyWzffDfVqj68daqD/t0MjTHPuOdNzBNaOElUHgKeQGpkzxiVgSD48e6niwGkbepC tgBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=FjCpvhZX6LkDrzSozA4jNGVfuFZFNa0vx4s73IRQth0=; b=R+rHZrmFj97+LEPvWxA0hjZhMDAL7/ciD7/EIKWlY2tBXBjVYhBT2P1OTue5wqeR92 hRDERRnIb6GpqADv0Akps7xYdQiW4pTkIicyhEBePeNjgf9Xxlf3s7i1o47Z+xBvDC+n TpqHrU6X27PJLJraeJQjA0G7EvhZQ3C7dmjQPiEqfhqTFquUzbMPqOG6jd3YQmZRX/3W MphgVYIzPfdcI+D8pmEnEzseyIhan2jzFC7nLKCwsi83CrXQ3MDCGbxrfAw/IRi9qniR I1973Bzpd0DHn72VWbJaodMe8JHl1s2agJ1xnaBpfVM8J1aDcRGIFwXTjEn17M7bn4Tc EkAA== X-Gm-Message-State: AJcUukdsJCSzBE4FQUIvmfL4PYsggDMLpIzqnzjbESQIU6ePkh05CtAw cEzdT5+Tc8KaQiZ6YTWyVBZRjGb0 X-Google-Smtp-Source: ALg8bN5PTna/UNAAKRg7/9cdcfv9+NzLPint03ptfv0qTGy7LY5itLTKI3Yg63r4NjjNvK6Q5lNwQg== X-Received: by 2002:a17:902:bcc7:: with SMTP id o7mr14892017pls.281.1545697273723; Mon, 24 Dec 2018 16:21:13 -0800 (PST) Original-Received: from [192.168.2.183] (216-165-228-38.championbroadband.com. [216.165.228.38]) by smtp.gmail.com with ESMTPSA id 15sm47093227pfr.55.2018.12.24.16.21.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Dec 2018 16:21:13 -0800 (PST) In-Reply-To: <7a362a59-3a4d-44c8-f4cd-5b232b6dffce@gmail.com> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::62e X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15142 Archived-At: On 12/24/18 2:01 PM, Zelphir Kaltstahl wrote: > Hello Guile Users, > > Is there some library, that enables high performance matrix operations > or even n-dimensional array operations? I am thinking of something like > NumPy in the Python ecosystem. I think NumPy in turn also uses some > lower level thing to do what it does. I think OpenBLAS or MKL, depending > on the architecture. I wonder if there is any wrapper around OpenBLAS > for Guile or something similar. > > I am writing a little code for matrix operations and currently I am > using Guile arrays, as they are made of vectors and have constant access > time, which is already great. My guess is, that this would be the right > choice if using pure Guile. I am writing data abstraction procedures, so > that later on I could exchange what is used to represent the data. > > Maybe, if there is something like NumPy or lower level, I should use > that instead? (Would I have to learn how to use FFI first?) > > Or maybe Guile's implementation is already so fast, that it would not > make that much difference to use a lower level thing? > > Currently I have only a little experimental program, started today, so > no huge plan. OK, one can fantasize about stuff like Pandas data frames > in Guile, but I have no illusion, that it is a work of a few days or > even weeks. It would be nice to learn, how to use a low level thing or > maybe even Pandas, if there are any such bindings for Guile. I could > make the implementation use different representations, depending on a > parameter or something like that. > > Regards, > > Zelphir > IMO, Guile probably needs something like ndarray, the base for numpy, if matrix operations are going to go anywhere. As far as using blas or others, I have developed a package for helping to use the FFI API for C libraries. It may be of interest to you. ffi-helper: https://www.nongnu.org/nyacc/ffi-help.html Matt