From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.user Subject: Re: How to make GNU Guile more successful Date: Sun, 16 Jul 2017 17:54:25 +0800 Message-ID: References: <87lgtajpkc.fsf@web.de> <408d91ab-83e4-44ab-bf43-7b46c311a14e@email.android.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1500198901 10485 195.159.176.226 (16 Jul 2017 09:55:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 16 Jul 2017 09:55:01 +0000 (UTC) Cc: "guile-user@gnu.org" To: Jan Wedekind Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jul 16 11:54:55 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 1dWgGL-0002FE-3E for guile-user@m.gmane.org; Sun, 16 Jul 2017 11:54:53 +0200 Original-Received: from localhost ([::1]:44647 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWgGO-0005EA-RI for guile-user@m.gmane.org; Sun, 16 Jul 2017 05:54:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWgFw-0005Ds-7m for guile-user@gnu.org; Sun, 16 Jul 2017 05:54:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWgFv-0006yA-0v for guile-user@gnu.org; Sun, 16 Jul 2017 05:54:28 -0400 Original-Received: from mail-io0-x22d.google.com ([2607:f8b0:4001:c06::22d]:36303) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dWgFu-0006y2-Se for guile-user@gnu.org; Sun, 16 Jul 2017 05:54:26 -0400 Original-Received: by mail-io0-x22d.google.com with SMTP id z62so31243195ioi.3 for ; Sun, 16 Jul 2017 02:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FXbVW5vbsD5sm6zoFKd2nq79kM67vXyP6fPUnC1c5WQ=; b=FIzCti8iBPOFBetU81lkPlp4ExsxLTAaN5Djb9PDsZKhBcYE7iqRhSYRcl5JoB1TqN qaN3WQIZjj0LycksrUJ2Pi/qhTsj71Ivs/Ln5Yn8X6cviXxICZRfnudWinwfJB0rFxOm bw00zyxZMBmiFC4sDHdf8Y5YX6cTjpRsWw1yB0BV36Mu+avSek6wZ7syh5fHnumx8m7d b8wLuJ7O16gDXW8vCmZJn0l+wG5KFCmXbCSDDWEhu8fMOIkoPUSweSwjhaCrpstvs9g4 iiINM6qZ4A5pGVfgh6i4DtW0iC3dnBq7fSUAJqp6H/vEMsbJRiMO2mNGx/4OvMhpuj8Y XnZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FXbVW5vbsD5sm6zoFKd2nq79kM67vXyP6fPUnC1c5WQ=; b=AlsyX1qFGm2k/E+Gj4nMJ9QsD+y+GmcvdnHZjS/oHVqFF3+igcwRhZ0j7lRUp6teKk N1sf0N0N4QBkxknB7CQwHQwmjimVtF4BCGhzNi+MRIJrZ6AJa/5QoA78q0cCoau/RVR7 n5LziRCecCZcKxzlnpZ68t2Wg6l0lyUxDYBuRKm4fbQfQLJ264IXgPz+NU86oGbIh1uI pymVjbsOOzeDzE6wPT22LgQaSm/ea/0I6X4b/m/zdG4BxoiLN+9fXqVqnH8lVVJt0zzl /5w/KTvReUM7FUTIoyOWlzzLVyM2uGx3eGOEyENrbJxYQHeYRJKFqZv4u1kRhO3Itvrg C8Ig== X-Gm-Message-State: AIVw110Es5IydRoGOK57r9GuG7YkHHXRUsgc6dLv8BhUNruR+Zab3NhY sDMlmiC5LEm5WwG5q49mD9vQSANmHw== X-Received: by 10.107.155.83 with SMTP id d80mr17504206ioe.75.1500198866064; Sun, 16 Jul 2017 02:54:26 -0700 (PDT) Original-Received: by 10.107.199.1 with HTTP; Sun, 16 Jul 2017 02:54:25 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::22d 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:13937 Archived-At: I've taken a look at Python bridge for other languages, there're several: For Lua https://labix.org/lunatic-python For ObjC https://pythonhosted.org/pyobjc/ For JS https://github.com/ipython/ipython/wiki/IPEP-26:-Full-Featured-python-js-object-bridge I'm glad that the idea is not just my imagination, it exists and there're something to read. I'll start this work after release Artanis-0.2.2. Best regards. On Sun, Jul 16, 2017 at 6:17 AM, Jan Wedekind wrote: > 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