Re: [Cython] [Python-Dev] C-level duck typing

2012-05-31 Thread Robert Bradshaw
On Thu, May 31, 2012 at 7:20 AM, Dag Sverre Seljebotn wrote: > > SEP updated (to what I hope is the final form): > > https://groups.google.com/forum/?fromgroups#!topic/numfocus/-XWwLMVgXBQ > https://github.com/numfocus/sep/blob/master/sep200.rst > https://github.com/dagss/pyextensibletype Very ni

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-31 Thread Dag Sverre Seljebotn
On 05/28/2012 05:59 PM, Dag Sverre Seljebotn wrote: Dag Sverre Seljebotn wrote: On 05/28/2012 01:24 PM, Nathaniel Smith wrote: On Mon, May 28, 2012 at 12:09 PM, mark florisson wrote: On 28 May 2012 12:01, Nathaniel Smith wrote: On Mon, May 28, 2012 at 11:55 AM, mark florisson wrot

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-28 Thread Dag Sverre Seljebotn
Dag Sverre Seljebotn wrote: >On 05/28/2012 01:24 PM, Nathaniel Smith wrote: >> On Mon, May 28, 2012 at 12:09 PM, mark florisson >> wrote: >>> On 28 May 2012 12:01, Nathaniel Smith wrote: On Mon, May 28, 2012 at 11:55 AM, mark florisson wrote: > On 28 May 2012 11:41, Nathaniel

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-28 Thread Dag Sverre Seljebotn
On 05/28/2012 01:24 PM, Nathaniel Smith wrote: On Mon, May 28, 2012 at 12:09 PM, mark florisson wrote: On 28 May 2012 12:01, Nathaniel Smith wrote: On Mon, May 28, 2012 at 11:55 AM, mark florisson wrote: On 28 May 2012 11:41, Nathaniel Smith wrote: On Mon, May 28, 2012 at 10:13 AM, mark

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-28 Thread Nathaniel Smith
On Mon, May 28, 2012 at 12:09 PM, mark florisson wrote: > On 28 May 2012 12:01, Nathaniel Smith wrote: >> On Mon, May 28, 2012 at 11:55 AM, mark florisson >> wrote: >>> On 28 May 2012 11:41, Nathaniel Smith wrote: On Mon, May 28, 2012 at 10:13 AM, mark florisson wrote: > On 28 Ma

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-28 Thread mark florisson
On 28 May 2012 12:01, Nathaniel Smith wrote: > On Mon, May 28, 2012 at 11:55 AM, mark florisson > wrote: >> On 28 May 2012 11:41, Nathaniel Smith wrote: >>> On Mon, May 28, 2012 at 10:13 AM, mark florisson >>> wrote: On 28 May 2012 09:54, mark florisson wrote: > On 27 May 2012 23:12,

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-28 Thread Nathaniel Smith
On Mon, May 28, 2012 at 11:55 AM, mark florisson wrote: > On 28 May 2012 11:41, Nathaniel Smith wrote: >> On Mon, May 28, 2012 at 10:13 AM, mark florisson >> wrote: >>> On 28 May 2012 09:54, mark florisson wrote: On 27 May 2012 23:12, Nathaniel Smith wrote: > On Sun, May 27, 2012 at 1

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-28 Thread mark florisson
On 28 May 2012 11:41, Nathaniel Smith wrote: > On Mon, May 28, 2012 at 10:13 AM, mark florisson > wrote: >> On 28 May 2012 09:54, mark florisson wrote: >>> On 27 May 2012 23:12, Nathaniel Smith wrote: On Sun, May 27, 2012 at 10:24 PM, Dag Sverre Seljebotn wrote: > On 05/18/2012 1

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-28 Thread Nathaniel Smith
On Mon, May 28, 2012 at 10:13 AM, mark florisson wrote: > On 28 May 2012 09:54, mark florisson wrote: >> On 27 May 2012 23:12, Nathaniel Smith wrote: >>> On Sun, May 27, 2012 at 10:24 PM, Dag Sverre Seljebotn >>> wrote: On 05/18/2012 10:30 AM, Dag Sverre Seljebotn wrote: > > On 05/

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-28 Thread mark florisson
On 28 May 2012 09:54, mark florisson wrote: > On 27 May 2012 23:12, Nathaniel Smith wrote: >> On Sun, May 27, 2012 at 10:24 PM, Dag Sverre Seljebotn >> wrote: >>> On 05/18/2012 10:30 AM, Dag Sverre Seljebotn wrote: On 05/18/2012 12:57 AM, Nick Coghlan wrote: > > I think the mai

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-28 Thread mark florisson
On 27 May 2012 23:12, Nathaniel Smith wrote: > On Sun, May 27, 2012 at 10:24 PM, Dag Sverre Seljebotn > wrote: >> On 05/18/2012 10:30 AM, Dag Sverre Seljebotn wrote: >>> >>> On 05/18/2012 12:57 AM, Nick Coghlan wrote: I think the main things we'd be looking for would be: - a clear

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-27 Thread Nathaniel Smith
On Sun, May 27, 2012 at 10:24 PM, Dag Sverre Seljebotn wrote: > On 05/18/2012 10:30 AM, Dag Sverre Seljebotn wrote: >> >> On 05/18/2012 12:57 AM, Nick Coghlan wrote: >>> >>> I think the main things we'd be looking for would be: >>> - a clear explanation of why a new metaclass is considered too com

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-27 Thread Dag Sverre Seljebotn
On 05/18/2012 10:30 AM, Dag Sverre Seljebotn wrote: On 05/18/2012 12:57 AM, Nick Coghlan wrote: I think the main things we'd be looking for would be: - a clear explanation of why a new metaclass is considered too complex a solution - what the implications are for classes that have nothing to do

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-18 Thread Dag Sverre Seljebotn
On 05/18/2012 12:57 AM, Nick Coghlan wrote: I think the main things we'd be looking for would be: - a clear explanation of why a new metaclass is considered too complex a solution - what the implications are for classes that have nothing to do with the SciPy/NumPy ecosystem - how subclassing woul

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-17 Thread Dag Sverre Seljebotn
I don't know where to put this so I put it up top: I think this talk about implementing caching went a bit overboard myself. Here's a performance ladder for you: Alternative A) Focus on fast lookup; go from 100 ns function call to 5 ns function call Alternative B) Focus on caching a 20 ns l

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-17 Thread Stefan Behnel
mark florisson, 17.05.2012 13:34: > On 17 May 2012 11:14, Stefan Behnel wrote: >> mark florisson, 17.05.2012 11:26: >>> On 17 May 2012 08:36, Stefan Behnel wrote: Dag Sverre Seljebotn, 17.05.2012 09:12: > Stefan Behnel wrote: >> mark florisson, 16.05.2012 21:49: >>> On 16 May 201

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-17 Thread mark florisson
On 17 May 2012 11:14, Stefan Behnel wrote: > mark florisson, 17.05.2012 11:26: >> On 17 May 2012 08:36, Stefan Behnel wrote: >>> Dag Sverre Seljebotn, 17.05.2012 09:12: Stefan Behnel wrote: > mark florisson, 16.05.2012 21:49: >> On 16 May 2012 20:15, Stefan Behnel wrote: >>> Why

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-17 Thread mark florisson
On 17 May 2012 11:03, Stefan Behnel wrote: > mark florisson, 17.05.2012 11:15: >> On 17 May 2012 07:09, Stefan Behnel wrote: >>> mark florisson, 16.05.2012 21:49: On 16 May 2012 20:15, Stefan Behnel wrote: > "Martin v. Löwis", 16.05.2012 20:33: >>> Does this use case make sense to e

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-17 Thread Stefan Behnel
mark florisson, 17.05.2012 11:26: > On 17 May 2012 08:36, Stefan Behnel wrote: >> Dag Sverre Seljebotn, 17.05.2012 09:12: >>> Stefan Behnel wrote: mark florisson, 16.05.2012 21:49: > On 16 May 2012 20:15, Stefan Behnel wrote: >> Why not just use a custom attribute on callables that ho

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-17 Thread Stefan Behnel
mark florisson, 17.05.2012 11:15: > On 17 May 2012 07:09, Stefan Behnel wrote: >> mark florisson, 16.05.2012 21:49: >>> On 16 May 2012 20:15, Stefan Behnel wrote: "Martin v. Löwis", 16.05.2012 20:33: >> Does this use case make sense to everyone? >> >> The reason why we are discus

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-17 Thread mark florisson
On 17 May 2012 08:36, Stefan Behnel wrote: > Dag Sverre Seljebotn, 17.05.2012 09:12: >> Stefan Behnel wrote: >>> mark florisson, 16.05.2012 21:49: On 16 May 2012 20:15, Stefan Behnel wrote: > Why not just use a custom attribute on callables that hold a > PyCapsule? Whenever we see ins

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-17 Thread mark florisson
On 17 May 2012 07:09, Stefan Behnel wrote: > mark florisson, 16.05.2012 21:49: >> On 16 May 2012 20:15, Stefan Behnel wrote: >>> "Martin v. Löwis", 16.05.2012 20:33: > Does this use case make sense to everyone? > > The reason why we are discussing this on python-dev is that we are loo

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-17 Thread Stefan Behnel
Dag Sverre Seljebotn, 17.05.2012 09:12: > Stefan Behnel wrote: >> mark florisson, 16.05.2012 21:49: >>> On 16 May 2012 20:15, Stefan Behnel wrote: Why not just use a custom attribute on callables that hold a PyCapsule? Whenever we see inside of a Cython implemented function that an o

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-17 Thread Dag Sverre Seljebotn
Stefan Behnel wrote: >mark florisson, 16.05.2012 21:49: >> On 16 May 2012 20:15, Stefan Behnel wrote: >>> "Martin v. Löwis", 16.05.2012 20:33: > Does this use case make sense to everyone? > > The reason why we are discussing this on python-dev is that we are >looking > for a ge

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-16 Thread Stefan Behnel
mark florisson, 16.05.2012 21:49: > On 16 May 2012 20:15, Stefan Behnel wrote: >> "Martin v. Löwis", 16.05.2012 20:33: Does this use case make sense to everyone? The reason why we are discussing this on python-dev is that we are looking for a general way to expose these C level

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-16 Thread mark florisson
On 16 May 2012 21:16, Dag Sverre Seljebotn wrote: > On Wed, 16 May 2012 20:49:18 +0100, mark florisson > wrote: >> >> On 16 May 2012 20:15, Stefan Behnel wrote: >>> >>> "Martin v. Löwis", 16.05.2012 20:33: > > Does this use case make sense to everyone? > > The reason why we are d

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-16 Thread mark florisson
On 16 May 2012 21:16, Dag Sverre Seljebotn wrote: > On Wed, 16 May 2012 20:49:18 +0100, mark florisson > wrote: >> >> On 16 May 2012 20:15, Stefan Behnel wrote: >>> >>> "Martin v. Löwis", 16.05.2012 20:33: > > Does this use case make sense to everyone? > > The reason why we are d

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-16 Thread Robert Bradshaw
On Wed, May 16, 2012 at 12:15 PM, Stefan Behnel wrote: > "Martin v. Löwis", 16.05.2012 20:33: >>> Does this use case make sense to everyone? >>> >>> The reason why we are discussing this on python-dev is that we are looking >>> for a general way to expose these C level signatures within the Python

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-16 Thread Dag Sverre Seljebotn
On Wed, 16 May 2012 20:49:18 +0100, mark florisson wrote: On 16 May 2012 20:15, Stefan Behnel wrote: "Martin v. Löwis", 16.05.2012 20:33: Does this use case make sense to everyone? The reason why we are discussing this on python-dev is that we are looking for a general way to expose these C

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-16 Thread mark florisson
On 16 May 2012 20:49, mark florisson wrote: > On 16 May 2012 20:15, Stefan Behnel wrote: >> "Martin v. Löwis", 16.05.2012 20:33: Does this use case make sense to everyone? The reason why we are discussing this on python-dev is that we are looking for a general way to expose th

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-16 Thread mark florisson
On 16 May 2012 20:15, Stefan Behnel wrote: > "Martin v. Löwis", 16.05.2012 20:33: >>> Does this use case make sense to everyone? >>> >>> The reason why we are discussing this on python-dev is that we are looking >>> for a general way to expose these C level signatures within the Python >>> ecosyst

Re: [Cython] [Python-Dev] C-level duck typing

2012-05-16 Thread Stefan Behnel
"Martin v. Löwis", 16.05.2012 20:33: >> Does this use case make sense to everyone? >> >> The reason why we are discussing this on python-dev is that we are looking >> for a general way to expose these C level signatures within the Python >> ecosystem. And Dag's idea was to expose them as part of th