Version 1.1 of the tco module (tail-calls, recursion, call/cc)

2015-11-06 Thread Th. Baruchel
The version 1.1 of the tco module is released. It is much more owerful since it now allows nested systems of continuations. The most important is probably rather that I took the time to write a very detailed presentation of the module on my blog: http://baruchel.github.io/ Regards, tb. -- https:/

Re: New module (written in C) for using the high-precision QD library

2015-08-01 Thread baruchel
Hi, Thank you for your answer. Actually this is the third version I am writing for using the QD library; the first onPython using ctypes; the second one was in Cython; this one is in C. I don't claim being a Cython expert and maybe my Cython code was not optimal but I can say the C version is s

New module (written in C) for using the high-precision QD library

2015-07-30 Thread baruchel
Hi, I wrote a module for wrapping the well-known high-precision QD library written by D.H. Bailey. You can find it here: https://github.com/baruchel/qd It is written in pure C with the CPython C-API in order to get the highest possible speed. The QD library provides floating number types for

A new module for performing tail-call elimination

2015-07-13 Thread Th. Baruchel
Hi, after having spent much time thinking about tail-call elimination in Python (see for instance http://baruchel.github.io/blog/ ), I finally decided to write a module for that. You may find it at: https://github.com/baruchel/tco Tail-call elimination is done for tail-recursion as well as for

Re: My attempts in playing with tail-recursion in python

2013-08-28 Thread Thomas Baruchel
Le 28-08-2013, Thomas Baruchel a écrit : > The following functions are fully usable; I hope someone will enjoy using > them. > > If you are not interested by the explanations, just jump to the end of the > message and take my functions for using them. Despite the very short size

My attempts in playing with tail-recursion in python

2013-08-28 Thread Thomas Baruchel
it that way: def B(func): x = (lambda f: (lambda x: x(x))(lambda y: f(lambda *args: lambda: y(y)(*args(func) def wrapper(*args): out = x(*args) while '__call__' in dir(out): out = out() return out return wrapper tr2 = B(fac) tr2(5