On 09/05/2012 07:10 PM, bearophile wrote:
Ellery Newcomer:
Yep.
Oh, good.
Have any suggestions for supported conversion out of the box?
There are several important cases, like:
Some D lazy ranges <==> Python lazy iterators/generators
array.array <==> D arrays
NumPy arrays <==> D array
On 09/10/2012 10:50 PM, Russel Winder wrote:
Python 2 and Python 3 are totally different in this regard. I don't have
a obvious proposal to make to avoid having PyD for Python 2 and a
different PyD for Python 3, but the six package might have some hints as
it is intended to support creating Pyth
On Mon, 2012-09-10 at 15:54 -0700, Ellery Newcomer wrote:
[…]
> Bugger, I'm going to have to go through pyd and replace all usages
> of str with unicode.
Python 2 and Python 3 are totally different in this regard. I don't have
a obvious proposal to make to avoid having PyD for Python 2 and a
di
On 09/10/2012 12:11 PM, bearophile wrote:
I understand. The point of Pyd is to interface D and Python, while NumPy
is something external. So if you find difficulties just keep it out.
Adding it later is possible.
Thing is, pyd will convert a ndarray to d array already, it just won't
do it as
Ellery Newcomer:
I've been thinking about this one a bit more, and I am not sure
it belongs in pyd.
I understand. The point of Pyd is to interface D and Python,
while NumPy is something external. So if you find difficulties
just keep it out. Adding it later is possible.
Bye,
bearophile
On 09/05/2012 07:10 PM, bearophile wrote:
NumPy arrays <==> D arrays
I've been thinking about this one a bit more, and I am not sure it
belongs in pyd.
First, the conversion is not symmetric. One can convert a numpy.ndarray
to a d array like so:
PyObject* ndarray;
double[][] matrix = d_
Am Mon, 10 Sep 2012 14:48:30 +0200
schrieb Johannes Pfau :
> Sorry, I should have said 'It'll _probably_ never be supported in
> gdc'. There are some possible solutions but:
>
> * It must be good enough to get approved when gdc is merged into gcc.
> (remember it must be portable and gpl and you
Am Sun, 09 Sep 2012 12:55:19 -0700
schrieb Brad Roberts :
> On 9/9/2012 1:15 AM, Johannes Pfau wrote:
> > Am Sat, 08 Sep 2012 16:25:49 +0100
> > schrieb Russel Winder :
> >
> >> On Sat, 2012-09-08 at 07:20 -0700, Ellery Newcomer wrote:
> >> […]
> >>> Okay, here:
> >>> https://bitbucket.org/ariovi
On 9/9/2012 1:15 AM, Johannes Pfau wrote:
> Am Sat, 08 Sep 2012 16:25:49 +0100
> schrieb Russel Winder :
>
>> On Sat, 2012-09-08 at 07:20 -0700, Ellery Newcomer wrote:
>> […]
>>> Okay, here:
>>> https://bitbucket.org/ariovistus/deimos-elfutils/overview
>>>
>>> I have some code with a working makef
On Sun, 2012-09-09 at 10:15 +0200, Johannes Pfau wrote:
[…]
> Please note that pragma(lib) is an evil feature. For example it will
> never work in gdc.
So this is a DMD-only (*) feature and not a feature of the D programming
language per se?
(*) and hence LDC.
--
Russel.
Am Sat, 08 Sep 2012 16:25:49 +0100
schrieb Russel Winder :
> On Sat, 2012-09-08 at 07:20 -0700, Ellery Newcomer wrote:
> […]
> > Okay, here:
> > https://bitbucket.org/ariovistus/deimos-elfutils/overview
> >
> > I have some code with a working makefile and a nonworking
> > SConstruct file.
> >
>
On Sat, 2012-09-08 at 07:20 -0700, Ellery Newcomer wrote:
[…]
> Okay, here: https://bitbucket.org/ariovistus/deimos-elfutils/overview
>
> I have some code with a working makefile and a nonworking SConstruct file.
>
> I believe the issue is the header files have pragma(lib, X) in them, and
> a si
On 09/08/2012 03:09 AM, Russel Winder wrote:
On Fri, 2012-09-07 at 15:21 -0700, Ellery Newcomer wrote:
On 09/06/2012 12:07 AM, Russel Winder wrote:
[…]
just used your scons fork to build the pyd embedded unittests. works
pretty nice
Splendid :-)
Okay, here: https://bitbucket.org/ariovistu
On Fri, 2012-09-07 at 15:21 -0700, Ellery Newcomer wrote:
> On 09/06/2012 12:07 AM, Russel Winder wrote:
[…]
> just used your scons fork to build the pyd embedded unittests. works
> pretty nice
Splendid :-)
If you see any problems or glitches, let me know and/or post a bug
report. Although I sa
On Sat, 2012-09-08 at 00:58 +0200, bearophile wrote:
[…]
> If you support NumPy well and efficiently through Pyd, I think
> some people will start using the D language just for this :-)
>
> NumPy is good but it usually forces you to program vectorially,
> like Matlab. Sometimes this is not nice,
Ellery Newcomer:
I had a look at numpy, and at least ndarray supports the new
style buffer interface (which is pretty freaking complicated),
so convertion is totally doable. I'll fold in support as soon
as I can get dmd to stop stabbing me in the face.
If you support NumPy well and efficient
On 09/06/2012 12:07 AM, Russel Winder wrote:
I am guessing this is interfacing to CPython, remember there is also
PyPy and ActiveState, they have different ways of doing things. Well
the ActiveState C API will be very close to the CPython C API, but PyPy
(which is the best Python 2.7 just now)
On 09/06/2012 09:48 AM, Ellery Newcomer wrote:
On 09/05/2012 11:19 PM, Jacob Carlborg wr
Associative arrays?
check.
eh, that was check as in yes, not check as in look it up yourself.
didn't seem ambiguous at the time.
On 09/06/2012 04:11 AM, bearophile wrote:
Ellery Newcomer:
array.array <==> D arrays
just checked, looks like we have it:
PyStmts(q"{from array import array; a = array('i', [44,33,22,11]);}",
"testing");
assert(PyEval!(int[])("a", "testing") == [44,33,22,11]);
I think if the python object i
On 09/05/2012 11:19 PM, Jacob Carlborg wrote:
On 2012-09-06 04:10, bearophile wrote:
There are several important cases, like:
Some D lazy ranges <==> Python lazy iterators/generators
array.array <==> D arrays
NumPy arrays <==> D arrays
Associative arrays?
check.
https://bitbucket.org/a
Ellery Newcomer:
array.array <==> D arrays
just checked, looks like we have it:
PyStmts(q"{from array import array; a = array('i',
[44,33,22,11]);}", "testing");
assert(PyEval!(int[])("a", "testing") == [44,33,22,11]);
I think if the python object is iterable, it can be converted
to array
On 05/09/12 21:23, Paul D. Anderson wrote:
On Wednesday, 5 September 2012 at 18:13:40 UTC, Ellery Newcomer wrote:
Hey.
Investigating the possibility of providing this conversion in pyd.
Python provides an api for accessing the underlying bytes.
std.bigint seemingly doesn't. Am I missing anyth
Sorry, I missed earlier bits of this thread…
On Wed, 2012-09-05 at 19:37 -0700, Ellery Newcomer wrote:
> On 09/05/2012 07:10 PM, bearophile wrote:
> >
> > Some D lazy ranges <==> Python lazy iterators/generators
> >
>
> I'll look into this one.
>
> > array.array <==> D arrays
>
> just checked,
On 2012-09-06 04:10, bearophile wrote:
There are several important cases, like:
Some D lazy ranges <==> Python lazy iterators/generators
array.array <==> D arrays
NumPy arrays <==> D arrays
Associative arrays?
--
/Jacob Carlborg
On 09/05/2012 07:10 PM, bearophile wrote:
Some D lazy ranges <==> Python lazy iterators/generators
I'll look into this one.
array.array <==> D arrays
just checked, looks like we have it:
PyStmts(q"{from array import array; a = array('i', [44,33,22,11]);}",
"testing");
assert(PyEval!(in
Ellery Newcomer:
Yep.
Oh, good.
Have any suggestions for supported conversion out of the box?
There are several important cases, like:
Some D lazy ranges <==> Python lazy iterators/generators
array.array <==> D arrays
NumPy arrays <==> D arrays
Also, which of the following looks mor
On 09/05/2012 05:02 PM, bearophile wrote:
Ellery Newcomer:
Investigating the possibility of providing this conversion in pyd.
Are you updating Pyd? :-)
Bye,
bearophile
Yep. Have any suggestions for supported conversion out of the box? From
the standard library, I already have Complex, Tup
Ellery Newcomer:
Investigating the possibility of providing this conversion in
pyd.
Are you updating Pyd? :-)
Bye,
bearophile
On Wednesday, 5 September 2012 at 19:23:11 UTC, Paul D. Anderson
wrote:
No, I don't believe so. AFAIK there is no public access to the
underlying array, but I think it is a good idea.
I meant to say I think that access to the array is a good idea,
not the lack of access. Words are hard!
On Wednesday, 5 September 2012 at 18:13:40 UTC, Ellery Newcomer
wrote:
Hey.
Investigating the possibility of providing this conversion in
pyd.
Python provides an api for accessing the underlying bytes.
std.bigint seemingly doesn't. Am I missing anything?
No, I don't believe so. AFAIK there
30 matches
Mail list logo