From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: streams are cool, you could stream virtually anything! Date: Thu, 05 Nov 2015 17:48:09 +0100 Message-ID: <877flwl7ee.fsf@web.de> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446742146 24391 80.91.229.3 (5 Nov 2015 16:49:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Nov 2015 16:49:06 +0000 (UTC) Cc: Nicolas Petton , bruce.connor.am@gmail.com, emacs-devel To: raman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 05 17:48:57 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 1ZuNiZ-0008W0-4S for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2015 17:48:55 +0100 Original-Received: from localhost ([::1]:33470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuNiY-0006ej-NP for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2015 11:48:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuNiJ-0006eV-0i for emacs-devel@gnu.org; Thu, 05 Nov 2015 11:48:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuNiG-0002yh-BN for emacs-devel@gnu.org; Thu, 05 Nov 2015 11:48:38 -0500 Original-Received: from mout.web.de ([212.227.17.12]:57182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuNiG-0002yP-2E for emacs-devel@gnu.org; Thu, 05 Nov 2015 11:48:36 -0500 Original-Received: from drachen.dragon ([90.186.2.82]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0Lmu2K-1aNxIZ2Fxc-00h5GU; Thu, 05 Nov 2015 17:48:30 +0100 In-Reply-To: (raman@google.com's message of "Thu, 05 Nov 2015 08:31:04 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:AbmXU187lGboJaLtfd3X7N9av3k/07skdr/EtAWiiHxN+Aqy9bt vWhiat/vGTJETA3muO1o0YCiAaH4mLRyzPmvQjZLOJ1tDU3ESvEChq4/v/8r4imwvUpjUIz 3Q3jVCVRC7KpiIFmQBvCPp9Oqx3Dk8+Jx9e9nCY10aoqlhw2GU5qUIUBN8rOfW9xj0ThaLI TD4Hl+vwaD1obTLuY979g== X-UI-Out-Filterresults: notjunk:1;V01:K0:TJ48tM+TclI=:Pa+1rL8JPNUwMQiEwJBY7E i+WWgRGzIzKjsQt8+6nCYatOn81jnezTImYwbe8/E/kpsrpDbevc5LKmaGeus+8dR2r4jZLse UY9QTaa6/19WoumAXd7z3PNP9S4MvYar6gKFZ7GSPGwsD9yYcrsLLoxNZE1DqAK1UR3g1UDOA xIkfoFcmf2AUexP4w8s5ljnqLKbIzfIVZkyErEKrQN1Fzq5GwPWr4X7DRLKgX9Hqrjj2IZHG7 5IJ6fQEQSg1nM5Ju4nMFdCxgJmpNfNXdPepH67hv8Os3A7gdj+xGUrkhsKOhFGySu4etGoTJ0 29ElVL8xvhe8EM+VzXluNs/f74RCp96Ywk283uvsRngdMc8i9p/mcyjq1rv+Ux5rBDpxJiZ4d mnBlNBF5Swt18g0cpPY2TCLUKiqCCYHKvB1ERerbJzHGj7QV9Cs+5FGPfI6Oh6mRr7l5MTqQV PwWwmngXeS1ytqI2I0xOreLNrVLdOZwovjBi3+iZVRMlmlqrKobDR30YBiiGkm/8sbQGL0dml 3KL7PK7ebSs1pPDxcTR0c91ys2WOHf9qAu6irlQrJTL8kj50iMGibiUgXPSwu4d6Nn+6TP4wj 3tdid634pNb0YapvKAz8cJNzw3Mwh76v/NQqUxVeG6J190HHamA91ZL0O75Ys1jo+VWH5ExfP oUJE0CInsVUNCrUq+o6RCF3JFwPPA7nraMkZgpeNhfT4QcBTUAVn9PBPiMeQexlTtmDO6rkFq gu7BMhdIlJCKTzploNnbi8wMub8MAB4avrLnN6KIqmnhTNerPi6XHtNch3OXnBqt6hH99213 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.12 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:193318 Archived-At: raman writes: > I dont like stream-pop because users might then expect there to be a > stream-push --- which might cause confusion. Actually I plan a `stream-push' - why not? There is nothing wrong with that; `push' itself doesn't modify any list, it just sets the PLACE to the newly created cons (cons NEWELT PLACE) 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? Regards, Michael