From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.user,gmane.lisp.guile.devel Subject: Streams and gc Date: Wed, 10 Sep 2014 14:36:36 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c22d9e865b050502b54d07 X-Trace: ger.gmane.org 1410353261 17645 80.91.229.3 (10 Sep 2014 12:47:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Sep 2014 12:47:41 +0000 (UTC) To: guile-devel , "guile-user@gnu.org" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Sep 10 14:47:34 2014 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XRhIo-0006i8-Rj for guile-user@m.gmane.org; Wed, 10 Sep 2014 14:47:14 +0200 Original-Received: from localhost ([::1]:56105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRhIo-00018I-Gb for guile-user@m.gmane.org; Wed, 10 Sep 2014 08:47:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRh8Z-0002df-C1 for guile-user@gnu.org; Wed, 10 Sep 2014 08:36:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRh8Y-00017B-54 for guile-user@gnu.org; Wed, 10 Sep 2014 08:36:39 -0400 Original-Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]:40407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRh8X-00016s-Us; Wed, 10 Sep 2014 08:36:38 -0400 Original-Received: by mail-pa0-f41.google.com with SMTP id bj1so6309976pad.0 for ; Wed, 10 Sep 2014 05:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=iduq+wyB6VNiXm8iMe5USfM8wDy4n28TviQkGj34Dkk=; b=AkUcBi368IKIebXBlOvrSHBotPY+uww6AdxKyOyidyqOmpivE5D6Ncwihwnlt9XFHZ hpjitPiSPIghlKIjghUNU7Z68qgzugpDY9+EaFyWam2mexac++MtrB+XIzDVOlc/C8ek MC8pKqt6f9L41R+0U0f9Kowu+CzwrdkIozh6zbBWHhut8x8W3HGrQOcxGepHUxWiWHWT lquM0Szs1Jf/R1jsbCbHCSmMWPJ2jkFkTomwj/aS5yRE6n7kKagVF8DHhEa9W2qqZXpE rAusXPFii+1lQ3/bDnecoxqhXWOtiL1Kp3icNPPjp9esIqT4ON3hQok8o1wx2Dx0gZE8 i/1Q== X-Received: by 10.70.98.201 with SMTP id ek9mr1994838pdb.150.1410352596538; Wed, 10 Sep 2014 05:36:36 -0700 (PDT) Original-Received: by 10.70.95.33 with HTTP; Wed, 10 Sep 2014 05:36:36 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::229 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 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-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11492 gmane.lisp.guile.devel:17434 Archived-At: --001a11c22d9e865b050502b54d07 Content-Type: text/plain; charset=UTF-8 Consider getting a stream of data and that we store it through consing, this has the drawback that the list will grow indefinitely. What you want is to make sure that any data that you need for computation a pointer to the start and end of the data would mean that by modding the mark procedure will tell the special cons cell that a part has a start reference or an end referense. Then in a custom sweep procedure you would be able to tell if these markings increments/decrements counters when you can discard data for gc. You would not need any magic at all but custom mark procedures and a custom sweep procedure. I find this tool pretty interesting. Maybe a little project that implements this would be cool to have WDYT? Cheers! --001a11c22d9e865b050502b54d07 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Consider getting a stream of data and that we store it thr= ough consing, this has the drawback that the list will grow indefinitely. W= hat you want is to make sure =C2=A0that any data that you need for computat= ion a pointer to the start and end of the data would mean that by modding t= he mark procedure will tell the special cons cell that a part has a start r= eference or an end referense. Then in a custom sweep procedure you would be= able to tell if these markings increments/decrements counters when you can= discard data for gc. You would not need any magic at all but custom mark p= rocedures and a custom sweep procedure. I find this tool pretty interesting= .

Maybe a little project that implements this would= be cool to have WDYT?

Cheers!

--001a11c22d9e865b050502b54d07--