Re: [pure-lang] newbie on streams

35 views
Skip to first unread message

Albert Graef

unread,
Apr 26, 2013, 3:53:27 PM4/26/13
to pure...@googlegroups.com
On Tue, Apr 23, 2013 at 11:35 PM, Ebm Boy <ebmtra...@gmail.com> wrote:
> let ones = 1 : ones &;

This creates a cyclic structure, so the stream gets expanded as soon as you first access the tail of the stream. Hence `show` tries to print the entire stream and will eventually run out of memory. Note that this won't happen if you define `ones` as a function instead.

So this is expected behaviour, but one might certainly argue that `show` should handle this more gracefully. ;-) Could you please submit a bug report? https://bitbucket.org/purelang/pure-lang/issues
 
--
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email:  agg...@gmail.com, Dr.G...@t-online.de
WWW:    http://www.musikinformatik.uni-mainz.de/ag

ebmtra...@gmail.com

unread,
Apr 26, 2013, 5:36:24 PM4/26/13
to pure...@googlegroups.com

> let ones = 1 : ones &;

This creates a cyclic structure, so the stream gets expanded as soon as you first access the tail of the stream. Hence `show` tries to print the entire stream and will eventually run out of memory. Note that this won't happen if you define `ones` as a function instead.


ok, thanks.
 
So this is expected behaviour, but one might certainly argue that `show` should handle this more gracefully. ;-) Could you please submit a bug report? https://bitbucket.org/purelang/pure-lang/issues
 

done , this is Issue #6.

By the way, Albert, I've heard about pure via the faust website. My first motivation was another creation of yours, faust2lv2 (but pure is really cool, too!). I've posted a message to faust mailing list because I have a problem with faust2lv2synth and qtractor but I don't know if you have receive it. Here is the link,http://sourceforge.net/mailarchive/message.php?msg_id=30745829  , in case you haven't.

Albert Graef

unread,
Apr 27, 2013, 2:55:37 AM4/27/13
to pure...@googlegroups.com
On Fri, Apr 26, 2013 at 11:36 PM, <ebmtra...@gmail.com> wrote:
done , this is Issue #6.

Thanks.
 
By the way, Albert, I've heard about pure via the faust website. My first motivation was another creation of yours, faust2lv2 (but pure is really cool, too!). I've posted a message to faust mailing list because I have a problem with faust2lv2synth and qtractor but I don't know if you have receive it. Here is the link,http://sourceforge.net/mailarchive/message.php?msg_id=30745829  , in case you haven't.

Yeah, I've seen your message, but I haven't been able to reproduce the issue yet. You may want to submit a bug report at http://code.google.com/p/faust-lv2/issues/list so that it's not forgotten.

Albert

Albert Graef

unread,
Sep 11, 2013, 7:31:51 AM9/11/13
to pure...@googlegroups.com
Fixed in rev. b6cd8d8, thanks for reporting.

On Fri, Apr 26, 2013 at 11:36 PM, <ebmtra...@gmail.com> wrote:
>>
>>> > let ones = 1 : ones &;
>>
>> This creates a cyclic structure, so the stream gets expanded as soon as
>> you first access the tail of the stream. Hence `show` tries to print the
>> entire stream and will eventually run out of memory. Note that this won't
>> happen if you define `ones` as a function instead.
>>
>> So this is expected behaviour, but one might certainly argue that `show`
>> should handle this more gracefully. ;-) Could you please submit a bug
>> report? https://bitbucket.org/purelang/pure-lang/issues
>
> done , this is Issue #6.

--
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email: agg...@gmail.com
WWW: https://plus.google.com/111193356966611167754
Reply all
Reply to author
Forward
0 new messages