#16137: lazy_list from various input data
-------------------------------------+-------------------------------------
       Reporter:  MatthieuDien       |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.4
      Component:  misc               |   Resolution:
       Keywords:  LazyPowerSeries,   |    Merged in:
  lazy_list, days57                  |    Reviewers:
        Authors:  Vincent            |  Work issues:
  Delecroix, Matthieu Dien           |       Commit:
Report Upstream:  N/A                |  37e67683e7a2f10152ba3a01b8aed508fe92f0f1
         Branch:                     |     Stopgaps:
  u/MatthieuDien/lazy_list_from_various_input_data|
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by mantepse):

 Replying to [comment:24 vdelecroix]:

 > Cool. Thanks Matthieu!

 a second that!  Sorry about not having mentioned that earlier!

 > 2) [...] I would prefer much more `lazy_list_from_function` whose
 argument would be a function `f(computed_values)` and which would update
 the list `computed_values` with one iteration of the algorithm (and return
 nothing or possibly an error code). And it has no sense to send the size
 of the cache to that function (since it is a list and a list knows its
 length).

 OK, I didn't know that python's lists know their length, so +1

 > 3) I think we need more classes

 I think we should try to avoid redundancy.  I guess, redundancy will be
 obvious once coded...

 However, I also thought that something like `lazy_list_explicit` would be
 very useful.  I'm not sure: is turning on caching for a function in python
 easy enough so that a cached variant of this would not make sense?

 > 5) In the old implementation `lazy_list` were immutable. It has the
 advantage of having shared slices. On the other hand it is annoying
 because they are immutable and hence it will be forbidden to have
 operations like "f += 1" without a (light) copy.

 At least for the applications I have in mind, I think immutability is
 fine.  For example, we will have lazy formal power series, and I certainly
 do not want to make assignments to those possible.  (Think of students who
 prove to me that `exp(z)` equals 2 :-)

 Martin

--
Ticket URL: <http://trac.sagemath.org/ticket/16137#comment:25>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to