[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make GNU Guile more successful

From: Jan Wedekind
Subject: Re: How to make GNU Guile more successful
Date: Sat, 15 Jul 2017 23:17:44 +0100 (BST)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)

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 <pyobject> 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))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]