Reputation
70,743
Next tag badge:
215/100 score
20/20 answers
Badges
7 213 302
Newest
 Enlightened
Impact
~451k people reached

33s
comment Unexpected behavior from Return called in a Block
@user8074 It is a duplicate, because the OP was interested in the explanation of the behavior, rather than a solution (of which he was aware).
22m
comment Unexpected behavior from Return called in a Block
@Szabolcs I'd argue that the opposite is true: using Throw / Catch is a bad style when Return (with 2 args, may be) can be used. Of course, one must know how to use it correctly, and it is not very intuitive at first.
24m
comment Unexpected behavior from Return called in a Block
@user8074 In this question itself
19h
revised File-backed lists/variables for handling large data
edited tags
19h
revised Lazy lists of Tuples and Subsets
edited tags
19h
revised How to Fold over lazy lists and over tasks, just as with Lists?
edited tags
19h
revised Functional style using lazy lists?
edited tags
1d
comment Fast way to pass an array of integers to Java using JLink
@d555 Was glad to help. Thanks for the accept.
1d
answered Fast way to pass an array of integers to Java using JLink
1d
awarded  Enlightened
1d
awarded  Nice Answer
Aug
31
revised Is there a built-in equivalent to Python's enumerate?
edited tags
Aug
31
revised Efficient lazy weak compositions
edited tags
Aug
30
comment Efficient lazy weak compositions
I'd say you did an excellent job here, given that you had to dig a lot of things and there is no documentation. In any case, thanks a bunch for such a great non-trivial test of Streaming functionality! It is great to see this stuff being put to use.
Aug
30
comment Efficient lazy weak compositions
In particular, you should be able to wrap you entire benchmark code in LazyListBlock, and then you shouldn't need any explicit chunk cleanup, since (if everything works correctly), all generated LazyLists will then be automatically destroyed.
Aug
30
comment Efficient lazy weak compositions
One more tidbit is that if you want to destroy some intermediate LazyLists, generated in the process, you can use one of LazyListBlock, LazyListBlockReturn. The former destroys all LazyLists, created inside of it, while the latter keeps the one that is being returned, if it is the value of the code run inside of it, and otherwise works the same as LazyListBlock, destroying all the other LazyList objects, generated inside of it. There is also LazyListBlockProtect, which you can wrap around some LazyLists created inside LazyListBlock, to protect them from destruction.
Aug
30
comment Efficient lazy weak compositions
Virtual chunks have some bug which, for instance, prevents my implementation of LazyTuples (Virtual chunk branch of it) to work correctly. I should really fix it, it is good to be reminded about it. As to chunk destruction, I'd also be grateful for reports in cases when some chunks aren't collected using Scan[LazyListDestroy, LazyLists[]] code.
Aug
30
comment Efficient lazy weak compositions
Also, while using DeleteFile@FileNames["*.mx", $StreamingCacheBase] will indeed delete the chunks from disk, this will leave Streaming in an invalid state. The better way is to use something like Scan[LazyListDestroy, LazyLists[]], which should (if the Streaming garbage collector works correctly, which I hope is true) then delete chunks from disk as a part of the lazy list destruction procedure.
Aug
30
comment Efficient lazy weak compositions
I have to mention, that there are types of chunks called Virtual, for which there is no caching on disk. I did not demonstrate how to use them, and also there seems to be a bug there which I still have to fix, but for example infinite Range is built with those. They can be used any time when you can generate chunks purely by calling some function of the chunk index. In the implementation of LazyTuples, there is a branch that uses virtual chunks. They might be better suited for this case. I will have to revisit the bug there though.
Aug
30
comment Efficient lazy weak compositions
Wow. I am impressed. Really. It will take me some time to absorb that. But I will certainly set out the time and do that. Big +1, of course.