From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Amirouche Boubekki Newsgroups: gmane.lisp.guile.user Subject: Re: optimizing lazy sequences: srfi-41 vs delayed continuation with values + promise vs delayed continuation with cons + lambda Date: Mon, 26 Feb 2018 00:31:39 +0100 Message-ID: <974901f7d49a92131112cf991ca50ece@hypermove.net> References: <691b8451eee86e60f7f1094488827073@hypermove.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1519601411 19111 195.159.176.226 (25 Feb 2018 23:30:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Feb 2018 23:30:11 +0000 (UTC) User-Agent: Roundcube Webmail/1.1.2 Cc: guile-user To: Guile User Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Feb 26 00:30:07 2018 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eq5k6-0004hZ-9U for guile-user@m.gmane.org; Mon, 26 Feb 2018 00:30:06 +0100 Original-Received: from localhost ([::1]:56217 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eq5m8-0003vJ-Jb for guile-user@m.gmane.org; Sun, 25 Feb 2018 18:32:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eq5lg-0003vA-Pu for guile-user@gnu.org; Sun, 25 Feb 2018 18:31:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eq5lg-0005M3-4j for guile-user@gnu.org; Sun, 25 Feb 2018 18:31:44 -0500 Original-Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:59811) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eq5ld-0005DW-Ps; Sun, 25 Feb 2018 18:31:41 -0500 Original-Received: from webmail.gandi.net (webmail7-d.mgt.gandi.net [10.58.1.147]) (Authenticated sender: amirouche@hypermove.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPA id 0E75CC5A4F; Mon, 26 Feb 2018 00:31:39 +0100 (CET) In-Reply-To: <691b8451eee86e60f7f1094488827073@hypermove.net> X-Sender: amirouche@hypermove.net X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4b98:c:538::194 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14469 Archived-At: > (define (lazyseq-with-stream) > (list->stream (iota max))) This is wrong. It must be implemented as: (define-stream (lazyseq-with-stream) (stream-let loop ((v 1)) (stream-cons v (loop (+ 1 v))))) I get the same segfault with the following error: Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS