From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Proposal for a new (ice-9 history) Date: Mon, 29 Oct 2018 15:13:20 +0100 Message-ID: Reply-To: mikael@djurfeldt.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009d036305795eacae" X-Trace: blaine.gmane.org 1540822308 27432 195.159.176.226 (29 Oct 2018 14:11:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 29 Oct 2018 14:11:48 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Oct 29 15:11:44 2018 Return-path: Envelope-to: guile-devel@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 1gH8Gc-00071W-SJ for guile-devel@m.gmane.org; Mon, 29 Oct 2018 15:11:43 +0100 Original-Received: from localhost ([::1]:45881 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gH8Ij-0000XQ-7V for guile-devel@m.gmane.org; Mon, 29 Oct 2018 10:13:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gH8Ib-0000VY-1R for guile-devel@gnu.org; Mon, 29 Oct 2018 10:13:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gH8IX-0000Ir-My for guile-devel@gnu.org; Mon, 29 Oct 2018 10:13:44 -0400 Original-Received: from mail-ot1-f51.google.com ([209.85.210.51]:37308) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gH8IX-0000FP-F9 for guile-devel@gnu.org; Mon, 29 Oct 2018 10:13:41 -0400 Original-Received: by mail-ot1-f51.google.com with SMTP id o14so7672474oth.4 for ; Mon, 29 Oct 2018 07:13:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to:cc; bh=d89AwvtldjEfNo2IWB0G7G3Nbv3TK5F3IaRyCPOx4Rc=; b=DrygF7ejS2CGURUI4D0zlNsPm9CEgqfgEP7gWA+DQX+HbjQks5/f6t8N2eoBkNbHjx I+DY/++gqwstu/jfN8MF+pAPG+Zn2Ivp+LA065By+rGKDzBVg5lvQ2x9ZnzRmZJDx9Dp AYuHYseBwMLJ2cZuKDxNOzB0b6j2ishlwYt6cUt66mD1mhxzrC2Gu9jI8EvJCyKtLGBJ 2NxSR75VHs19yy4uKrNQTPdRkD9wuHbxc1TLYsCboQWYs12Aj7n5MxSjCOLJRdSKNDzA //oibzIDpT/KUqfwAQ9xatjcp3e+VnVvpv2ZyOU3QkxrzOAJR5ZckZboFxldcmDFDU9+ JCJQ== X-Gm-Message-State: AGRZ1gLj9xBas6FMC8tk2luSf4NrSGblL8cfuztNtZNeMxVeo0BVRrpj 9toiTxGTQZx31RFwtQnLPZN3mM0asIWDZApDRRkBgQ== X-Google-Smtp-Source: AJdET5dPPhwZPGt26P0oykIHDYwIa+Boe39GMJD9+nCIEfQ4pbsQ+GDCHoajaM+5o3PW9eo/Fx9MO2gkQH11QSAoXuo= X-Received: by 2002:a9d:7357:: with SMTP id l23mr9269218otk.204.1540822413409; Mon, 29 Oct 2018 07:13:33 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.210.51 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19697 Archived-At: --0000000000009d036305795eacae Content-Type: text/plain; charset="UTF-8" I'd like to rewrite (ice-9 history) to conform to the full GDB value history syntax. This is because I find that I miss being able to refer to "the last value" etc. Currently we have: $ the N:th value from the start The extension would add bindings for: $$ the N:th value from the end $ the last value (= $$0) $$ the value just prior to the last value (= $$1) Implementation: Currently, every step in the REPL defines a $ in the module (value-history) the interface of which is appended to the list of used interfaces for the (current-module). The new implementation would just add a new result value to a list, not doing any definition. The interface of (value-history) would instead have a lazy-binder which provides a syntax transformer for every $... actually being used. The $... identifier would expand into a list-ref into the value history. Please evaluate this suggestion and give comments or an OK. Best regards, Mikael Djurfeldt --0000000000009d036305795eacae Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'd like to rewrite (ice-9 history) to conform to= the full GDB value history syntax. This is because I find that I miss bein= g able to refer to "the last value" etc.

Currently we have:

$<N> the N:th value from= the start

The extension would add bindings fo= r:

$$<N> the N:th value from the end

$ the last value (=3D $$0)

$$ th= e value just prior to the last value (=3D $$1)

Imp= lementation:

Currently, every step in the REPL def= ines a $<N> in the module (value-history) the interface of which is a= ppended to the list of used interfaces for the (current-module).
=
The new implementation would just add a new result value to = a list, not doing any definition.

The interface of= (value-history) would instead have a lazy-binder which provides a syntax t= ransformer for every $... actually being used. The $... identifier would ex= pand into a list-ref into the value history.

Pleas= e evaluate this suggestion and give comments or an OK.

=
Best regards,
Mikael Djurfeldt

--0000000000009d036305795eacae--