From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: raman@google.com (T.V Raman) Newsgroups: gmane.emacs.devel Subject: Re: streams are cool, you could stream virtually anything! Date: Thu, 5 Nov 2015 15:34:49 -0800 Message-ID: <22075.59289.690185.199808@retriever.mtv.corp.google.com> References: <87ziyuaqhl.fsf@petton.fr> <87fv0labbf.fsf@web.de> <87y4eda0kl.fsf@petton.fr> <8737wl9w5f.fsf@web.de> <87bnb8kd82.fsf@petton.fr> <87wptwirxw.fsf@petton.fr> <877flwl7ee.fsf@web.de> <87y4ecglb5.fsf@petton.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1446766517 4744 80.91.229.3 (5 Nov 2015 23:35:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Nov 2015 23:35:17 +0000 (UTC) Cc: michael_heerdegen@web.de, nicolas@petton.fr, raman@google.com, emacs-devel@gnu.org To: bruce.connor.am@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 06 00:35:16 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZuU3j-0008Dm-N5 for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 00:35:11 +0100 Original-Received: from localhost ([::1]:35933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuU3i-0004LD-OT for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2015 18:35:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuU3T-0004Kx-Al for emacs-devel@gnu.org; Thu, 05 Nov 2015 18:34:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuU3S-0004WT-Ex for emacs-devel@gnu.org; Thu, 05 Nov 2015 18:34:55 -0500 Original-Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]:36154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuU3S-0004WJ-8Y for emacs-devel@gnu.org; Thu, 05 Nov 2015 18:34:54 -0500 Original-Received: by pacdm15 with SMTP id dm15so77245446pac.3 for ; Thu, 05 Nov 2015 15:34:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:mime-version:content-type:content-transfer-encoding:message-id :date:to:cc:subject:in-reply-to:references; bh=UE7bPnnr4dVax+BhfjkoRFDD9gyx9Q/MX3Ooxs+Mhs4=; b=VKVnxZiW+rP1BY0EfvDqWs43f6nY0D79uCGdy8aw09hhfIxs6uikiRExAisz+Ymhu8 go7hrjEZc6B72U2zaO4dLAgnARq+FwlPs72P32P13qTamhTbDM1MeklULtvnbaYHA086 rBbp7Nxz7timOqV4YYkOXyPa8WuLJSIZxQDSBEzdtLn10x3gCr5lTXxCF7f+W2TxYCdP tlU1a2dWKb500RA129UhFnqtjPRumjuDctyEm4yJ8y1PGrkcolkDX4FTWXY9aHV9o5bi wK1WeW757zwaYvo0PtbUZBOSKN3FCa1zq+PiC8meJRkf2wOxnmwiVchshE5zxUFAe2gQ sNUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to :references; bh=UE7bPnnr4dVax+BhfjkoRFDD9gyx9Q/MX3Ooxs+Mhs4=; b=GnocO0Z3vHX/UXjF/tsXop5CjvJ1F2stpjm8P0JoO2+1VpgelthMH+s0/ndRHMT5oG YKrOkdzudPqBnZEqztOjsKBiGNWMP+4Hsp3NwQ3/0Mz6TGkmfU/+NMdjCkZMbiAxDSKd 62P4gheE7d+i30boPMbX1dOvp5WpJ7AH3KMo57yPcRE3vpLxj5yasoHBU5xsiA1VLDRo PuZBtkeGtiUPk+2bqDRYeCgXdNgzzOnpWOi56PFgbWPf13rDhlsV1HwXqV7zSnlDmapv ftQY9Q43E/09E/D01mxMjbnLueT7LT6gvmkkv1IcGl7BAtKlrealphJ/TXuAmNthtRHi LL2Q== X-Gm-Message-State: ALoCoQlB6qp1WSgv2fr86u36cJSdkWnK/ZS3Cve9PFNRmWFpq3WXOVyQzNOrS8Ux/nRuokR62+so X-Received: by 10.68.57.169 with SMTP id j9mr4998680pbq.2.1446766493145; Thu, 05 Nov 2015 15:34:53 -0800 (PST) Original-Received: from retriever.mtv.corp.google.com ([2620:0:1000:1c09:3c49:2577:441a:5ff]) by smtp.gmail.com with ESMTPSA id an5sm9904920pbd.45.2015.11.05.15.34.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Nov 2015 15:34:50 -0800 (PST) Original-Received: by retriever.mtv.corp.google.com (Postfix, from userid 13930) id D04281A10CD; Thu, 5 Nov 2015 15:34:49 -0800 (PST) In-Reply-To: X-Mailer: VM 8.1.1 under 25.0.50.1 (x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193357 Archived-At: I still like these things to be in pairs, and I'm not particularly sold on having stream-pop. I like the symmettry in stream-head and stream-tail -- probably because I originally learnt streams from SICP. Artur Malabarba writes: > On 5 Nov 2015 9:58 pm, "Nicolas Petton" wrote: > > > > Michael Heerdegen writes: > > > > > We can do the very same for streams; just use `stream-cons' instead of > > > `cons': > > > > > > --8<---------------cut here---------------start------------->8--- > > > (defmacro stream-push (newelt place) > > > "Add NEWELT to the stream stored in PLACE. > > > This is equivalent to (setf PLACE (stream-cons NEWELT PLACE))." > > > `(cl-callf2 stream-cons ,newelt ,place)) > > > --8<---------------cut here---------------end--------------->8--- > > > > > > Would that be ok? > > > > I guess so, as long as we don't add too many such functions. > > I dunno. The way I think of streams it makes perfect sense to have a pop without a push. But maybe that's just me. You could call it stream-next or something like that, so people won't be confused by the lack of push. > -- --