Robert Bradshaw | 14 Apr 2012 01:46
Picon

Re: [Cython] CEP1000: Native dispatch through callables

On Fri, Apr 13, 2012 at 3:06 PM, Dag Sverre Seljebotn
<d.s.seljebotn@...> wrote:
>
>
> Robert Bradshaw <robertwb@...> wrote:
>
>>On Fri, Apr 13, 2012 at 1:27 PM, Dag Sverre Seljebotn
>><d.s.seljebotn@...> wrote:
>>> Ah, I didn't think about 6-bit or huffman. Certainly helps.
>>
>>Yeah, we don't want to complicate the ABI too much, but I think
>>something like 8 4-bit common chars and 32 6-bit other chars (or 128
>>8-bit other chars) wouldn't be outrageous. The fact that we only have
>>to encode into a single word makes the algorithm very simple (though
>>the majority of the time we'd spit out pre-encoded literals). We have
>>a version number to play with this as well.
>>
>>> I'm almost +1 on your proposal now, but a couple of more ideas:
>>>
>>> 1) Let the key (the size_t) spill over to the next specialization
>>entry if
>>> it is too large; and prepend that key with a continuation code (two
>>size-ts
>>> could together say "iii)-d\0\0" on 32 bit systems with 8bit encoding,
>>using
>>> - as continuation). The key-based caller will expect a continuation
>>if it
>>> knows about the specialization, and the prepended char will prevent
>>spurios
>>> matches against the overspilled slot.
(Continue reading)

Nathaniel Smith | 14 Apr 2012 02:19
Picon
Favicon

Re: [Cython] CEP1000: Native dispatch through callables

On Fri, Apr 13, 2012 at 11:22 PM, Dag Sverre Seljebotn
<d.s.seljebotn@...> wrote:
>
>
> Robert Bradshaw <robertwb@...> wrote:
>
>>On Fri, Apr 13, 2012 at 2:24 PM, Nathaniel Smith <njs@...> wrote:
>>> On Fri, Apr 13, 2012 at 9:27 PM, Dag Sverre Seljebotn
>>> <d.s.seljebotn@...> wrote:
>>>> Ah, I didn't think about 6-bit or huffman. Certainly helps.
>>>>
>>>> I'm almost +1 on your proposal now, but a couple of more ideas:
>>>>
>>>> 1) Let the key (the size_t) spill over to the next specialization
>>entry if
>>>> it is too large; and prepend that key with a continuation code (two
>>size-ts
>>>> could together say "iii)-d\0\0" on 32 bit systems with 8bit
>>encoding, using
>>>> - as continuation). The key-based caller will expect a continuation
>>if it
>>>> knows about the specialization, and the prepended char will prevent
>>spurios
>>>> matches against the overspilled slot.
>>>>
>>>> We could even use the pointers for part of the continuation...
>>>
>>> I am really lost here. Why is any of this complicated encoding stuff
>>> better than interning? Interning takes one line of code, is
>>incredibly
(Continue reading)

Greg Ewing | 14 Apr 2012 02:24
Picon
Picon
Favicon

Re: [Cython] CEP1000: Native dispatch through callables

Dag Sverre Seljebotn wrote:

> 1) It doesn't work well with multiple interpreter states. Ok, nothing works
> with that at the moment, but it is on the roadmap for Python

Is it really? I got the impression that it's not considered feasible,
since it would require massive changes to the entire implementation
and totally break the existing C API. Has someone thought of a way
around those problems?

--

-- 
Greg
Dag Sverre Seljebotn | 14 Apr 2012 10:36
Picon
Picon
Gravatar

Re: [Cython] CEP1000: Native dispatch through callables


Nathaniel Smith <njs@...> wrote:

>On Fri, Apr 13, 2012 at 11:22 PM, Dag Sverre Seljebotn
><d.s.seljebotn@...> wrote:
>>
>>
>> Robert Bradshaw <robertwb@...> wrote:
>>
>>>On Fri, Apr 13, 2012 at 2:24 PM, Nathaniel Smith <njs@...>
>wrote:
>>>> On Fri, Apr 13, 2012 at 9:27 PM, Dag Sverre Seljebotn
>>>> <d.s.seljebotn@...> wrote:
>>>>> Ah, I didn't think about 6-bit or huffman. Certainly helps.
>>>>>
>>>>> I'm almost +1 on your proposal now, but a couple of more ideas:
>>>>>
>>>>> 1) Let the key (the size_t) spill over to the next specialization
>>>entry if
>>>>> it is too large; and prepend that key with a continuation code
>(two
>>>size-ts
>>>>> could together say "iii)-d\0\0" on 32 bit systems with 8bit
>>>encoding, using
>>>>> - as continuation). The key-based caller will expect a
>continuation
>>>if it
>>>>> knows about the specialization, and the prepended char will
>prevent
>>>spurios
(Continue reading)

Dag Sverre Seljebotn | 14 Apr 2012 10:41
Picon
Picon
Gravatar

Re: [Cython] CEP1000: Native dispatch through callables


Greg Ewing <greg.ewing <at> canterbury.ac.nz> wrote:

>Dag Sverre Seljebotn wrote:
>
>> 1) It doesn't work well with multiple interpreter states. Ok, nothing
>works
>> with that at the moment, but it is on the roadmap for Python
>
>Is it really? I got the impression that it's not considered feasible,
>since it would require massive changes to the entire implementation
>and totally break the existing C API. Has someone thought of a way
>around those problems?

I was just referring to the offhand comments in PEP3121, but I guess that PEP had multiple reasons, and
perhaps this particular arguøent had no significance...

You know this a lot better than me.

Dag

>
>-- 
>Greg
>_______________________________________________
>cython-devel mailing list
>cython-devel <at> python.org
>http://mail.python.org/mailman/listinfo/cython-devel

--

-- 
(Continue reading)

Stefan Behnel | 14 Apr 2012 10:56
Picon
Favicon

Re: [Cython] CEP1000: Native dispatch through callables

Dag Sverre Seljebotn, 14.04.2012 10:41:
> Greg Ewing wrote:
>> Dag Sverre Seljebotn wrote:
>>
>>> 1) It doesn't work well with multiple interpreter states. Ok, nothing
>>> works with that at the moment, but it is on the roadmap for Python
>>
>> Is it really? I got the impression that it's not considered feasible,
>> since it would require massive changes to the entire implementation
>> and totally break the existing C API. Has someone thought of a way
>> around those problems?
> 
> I was just referring to the offhand comments in PEP3121, but I guess that PEP had multiple reasons, and
perhaps this particular arguøent had no significance...

IIRC, the last status was that even after this PEP, Py3 still has serious
issues with keeping extension modules in separate interpreters. And this
probably isn't worth doing anything about because it won't work without a
major effort in all sorts of places. And I never heard that any extension
module even tried to support this.

I don't think we should invest too much thought into this direction.

Stefan
_______________________________________________
cython-devel mailing list
cython-devel <at> python.org
http://mail.python.org/mailman/listinfo/cython-devel
Picon

Re: [Cython] Cython 0.16 RC 1

2012-04-12 16:38:37 mark florisson napisał(a):
> Yet another release candidate, this will hopefully be the last before
> the 0.16 release. You can grab it from here:
> http://wiki.cython.org/ReleaseNotes-0.16
> 
> There were several fixes for the numpy attribute rewrite, memoryviews
> and fused types. Accessing the 'base' attribute of a typed ndarray now
> goes through the object layer, which means direct assignment is no
> longer supported.
> 
> If there are any problems, please let us know.

4 tests still fail with Python 3.2 (currently 3.2.3).
All tests pass with Python 2.6.8, 2.7.3 and 3.1.5.

Failures with Python 3.2:

======================================================================
FAIL: NestedWith (withstat)
Doctest: withstat.NestedWith
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.2/doctest.py", line 2153, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for withstat.NestedWith
  File
"/var/tmp/portage/dev-python/cython-0.16_rc1/work/Cython-0.16rc1/tests-3.2/run/c/withstat.cpython-32.so",
line unknown line number, in NestedWith

----------------------------------------------------------------------
(Continue reading)

mark florisson | 14 Apr 2012 12:46
Picon
Gravatar

Re: [Cython] Cython 0.16 RC 1

On 12 April 2012 22:00, Wes McKinney <wesmckinn <at> gmail.com> wrote:
> On Thu, Apr 12, 2012 at 10:38 AM, mark florisson
> <markflorisson88 <at> gmail.com> wrote:
>> Yet another release candidate, this will hopefully be the last before
>> the 0.16 release. You can grab it from here:
>> http://wiki.cython.org/ReleaseNotes-0.16
>>
>> There were several fixes for the numpy attribute rewrite, memoryviews
>> and fused types. Accessing the 'base' attribute of a typed ndarray now
>> goes through the object layer, which means direct assignment is no
>> longer supported.
>>
>> If there are any problems, please let us know.
>> _______________________________________________
>> cython-devel mailing list
>> cython-devel <at> python.org
>> http://mail.python.org/mailman/listinfo/cython-devel
>
> I'm unable to build pandas using git master Cython. I just released
> pandas 0.7.3 today which has no issues at all with 0.15.1:
>
> http://pypi.python.org/pypi/pandas
>
> For example:
>
> 16:57 ~/code/pandas  (master)$ python setup.py build_ext --inplace
> running build_ext
> cythoning pandas/src/tseries.pyx to pandas/src/tseries.c
>
> Error compiling Cython file:
(Continue reading)

Stefan Behnel | 14 Apr 2012 13:00
Picon
Favicon

Re: [Cython] Cython 0.16 RC 1

Arfrever Frehtes Taifersar Arahesis, 14.04.2012 12:16:
> 4 tests still fail with Python 3.2 (currently 3.2.3).
> All tests pass with Python 2.6.8, 2.7.3 and 3.1.5.

Thanks for the report.

> Failures with Python 3.2:
> 
> ======================================================================
> FAIL: NestedWith (withstat)
> Doctest: withstat.NestedWith
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib64/python3.2/doctest.py", line 2153, in runTest
>     raise self.failureException(self.format_failure(new.getvalue()))
> AssertionError: Failed doctest test for withstat.NestedWith
>   File
"/var/tmp/portage/dev-python/cython-0.16_rc1/work/Cython-0.16rc1/tests-3.2/run/c/withstat.cpython-32.so",
line unknown line number, in NestedWith
> 
> ----------------------------------------------------------------------
> File
"/var/tmp/portage/dev-python/cython-0.16_rc1/work/Cython-0.16rc1/tests-3.2/run/c/withstat.cpython-32.so",
line ?, in withstat.NestedWith
> Failed example:
>     NestedWith().runTest()
> Exception raised:
>     Traceback (most recent call last):
>       File "/usr/lib64/python3.2/doctest.py", line 1288, in __run
>         compileflags, 1), test.globs)
(Continue reading)

mark florisson | 14 Apr 2012 13:02
Picon
Gravatar

Re: [Cython] Cython 0.16 RC 1

On 14 April 2012 12:00, Stefan Behnel <stefan_ml <at> behnel.de> wrote:
> Arfrever Frehtes Taifersar Arahesis, 14.04.2012 12:16:
>> 4 tests still fail with Python 3.2 (currently 3.2.3).
>> All tests pass with Python 2.6.8, 2.7.3 and 3.1.5.
>
> Thanks for the report.
>

Indeed, I just pushed a fix here:
https://github.com/markflorisson88/cython/tree/release

Afrever, could you retry running this tests, i.e.

    python runtests.py -vv 'run\.withstat'

Thanks for the help!

>> Failures with Python 3.2:
>>
>> ======================================================================
>> FAIL: NestedWith (withstat)
>> Doctest: withstat.NestedWith
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File "/usr/lib64/python3.2/doctest.py", line 2153, in runTest
>>     raise self.failureException(self.format_failure(new.getvalue()))
>> AssertionError: Failed doctest test for withstat.NestedWith
>>   File
"/var/tmp/portage/dev-python/cython-0.16_rc1/work/Cython-0.16rc1/tests-3.2/run/c/withstat.cpython-32.so",
line unknown line number, in NestedWith
(Continue reading)


Gmane