From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jan Wedekind Newsgroups: gmane.lisp.guile.user Subject: Re: How to make GNU Guile more successful Date: Sat, 15 Jul 2017 23:17:44 +0100 (BST) Message-ID: References: <87lgtajpkc.fsf@web.de> <408d91ab-83e4-44ab-bf43-7b46c311a14e@email.android.com> Reply-To: Jan Wedekind NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1500157103 4310 195.159.176.226 (15 Jul 2017 22:18:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Jul 2017 22:18:23 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: "guile-user@gnu.org" To: Nala Ginrut Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jul 16 00:18:17 2017 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 1dWVO9-0000Ki-6G for guile-user@m.gmane.org; Sun, 16 Jul 2017 00:18:13 +0200 Original-Received: from localhost ([::1]:43407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWVOB-0004xd-AU for guile-user@m.gmane.org; Sat, 15 Jul 2017 18:18:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWVNp-0004xM-5J for guile-user@gnu.org; Sat, 15 Jul 2017 18:17:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWVNk-0000pK-KO for guile-user@gnu.org; Sat, 15 Jul 2017 18:17:53 -0400 Original-Received: from wp424.webpack.hosteurope.de ([2a01:488:42:1000:50ed:85c1::]:38686) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dWVNk-0000p2-Ds for guile-user@gnu.org; Sat, 15 Jul 2017 18:17:48 -0400 Original-Received: from host86-163-166-96.range86-163.btcentralplus.com ([86.163.166.96] helo=wedemob.home); authenticated by wp424.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1dWVNg-0000oC-VK; Sun, 16 Jul 2017 00:17:45 +0200 X-X-Sender: jan@wedemob.home In-Reply-To: X-bounce-key: webpack.hosteurope.de;jan@wedesoft.de;1500157068;0bc1148c; X-HE-SMSGID: 1dWVNg-0000oC-VK X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:488:42:1000:50ed:85c1:: 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:13934 Archived-At: On Sat, 15 Jul 2017, Nala Ginrut wrote: > @Jan Yes, that should be a way to go. And I have a new idea which is > just an idea at present. Many we could find a way to read PyObject to > Gulie, and call Python module directly (say, numpy). There should be a > type-compatible abstract level between Guile and PyObject. If it > works, we may implement Python3 on Guile. Although it seems a large > work to implement complete Python3 frontend, we may save lot of work > to write alternative Python modules for Guile. > Julia language does in this idea, but it's backend is compatible with > Python. My idea is not to convert all Python types to Guile, just wrap > some types to a special object like is enough, then Guile Sure, a Guile Python bridge would be nice for using NumPy and SciPy. However while NumPy is quite mature, it cannot do compose array operations and avoid intermediate results as Theano can. One could write bindings to Theano. However I think that the bridging code would get in the way at some point. >From the Theano documentation [1]: >>> import numpy >>> import theano.tensor as T >>> from theano import function >>> x = T.dscalar('x') >>> y = T.dscalar('y') >>> f = function([x, y], x + y) >>> f(2, 3) This is about having "2 + 3" being computed with fast compiled code. With Scheme macros most of that can be implemented transparently [2]: >>> (use-modules (aiscm tensor) (aiscm int)) >>> (tensor (+ 2 3)) [1] http://www.deeplearning.net/software/theano/tutorial/adding.html#adding-two-matrices [2] http://wedesoft.github.io/aiscm/operation.html#tensor-operations