From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nils Gillmann Subject: Re: a GUIX_PACKAGE_PATH / modules puzzle Date: Thu, 3 May 2018 08:30:33 +0000 Message-ID: <20180503083033.457tdfmh5qmauqb4@abyayala> References: <20180501223951.whoj67yv2h3t6wyl@abyayala> <87bmdxwc6y.fsf@gmail.com> <20180503053613.dffmd6ag57x26fdt@abyayala> <87a7thxkw2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ym4mp2po4ott7qkn" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fE9cv-0003Uu-QT for guix-devel@gnu.org; Thu, 03 May 2018 04:30:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fE9cu-0000tI-Jp for guix-devel@gnu.org; Thu, 03 May 2018 04:30:09 -0400 Received: from conspiracy.of.n0.is ([2a01:4f8:1c0c:7ad0::1]:51104) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fE9cu-0000se-A5 for guix-devel@gnu.org; Thu, 03 May 2018 04:30:08 -0400 Content-Disposition: inline In-Reply-To: <87a7thxkw2.fsf@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Chris Marusich Cc: guix-devel@gnu.org --ym4mp2po4ott7qkn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Chris Marusich transcribed 2.3K bytes: > Nils Gillmann writes: >=20 > > Anyways, in which section of the guile Manual would I find "pk"? I've > > done surprisingly little debugging with Guile itself so far. >=20 > Unfortunately, pk isn't (yet?) documented. It apparently stands for > "peek stuff". It prints and returns the value passed to it. It's a > useful little shortcut for printing values. Okay, thanks. > Here are some simple > examples of how to use it: >=20 > --8<---------------cut here---------------start------------->8--- > scheme@(guile-user)> (pk "hello") >=20 > ;;; ("hello") > $1 =3D "hello" > scheme@(guile-user)> (pk (list 1 2 3)) >=20 > ;;; ((1 2 3)) > $2 =3D (1 2 3) > scheme@(guile-user)> (define (1+ n) (+ 1 (pk n))) > scheme@(guile-user)> (1+ 2) >=20 > ;;; (2) > $3 =3D 3 > scheme@(guile-user)> pk > $4 =3D # > --8<---------------cut here---------------end--------------->8--- >=20 > Note that pk does not print out all values when a procedure returns > multiple values, but it is still quite handy: >=20 > --8<---------------cut here---------------start------------->8--- > scheme@(guile-user)> (pk (values 1 2)) >=20 > ;;; (1) > $5 =3D 1 > --8<---------------cut here---------------end--------------->8--- >=20 > I hope that helps! Seems like in the case of using (system) it doesn't do anything, I'll try guile interaction with Guix tonight. > By the way, if you feel like taking a trip down the rabbit hole, here is > the answer to the somewhat unrelated question of "why did pk only print > the first value?" >=20 > https://lists.gnu.org/archive/html/guile-user/2017-06/msg00043.html >=20 > --=20 > Chris --ym4mp2po4ott7qkn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlrqyKkACgkQ4i+bv+40 hYgYAg//VugWtySrlD8kLtIzTog84QyAX5IUY/1RRbqxQDHmHgipfc4k9vIkLAUg AYpq1UQalrfyhU1hX7m1pnPchgfXTelmUguAEiPK0xsYUvBoJ6Vk24+XmI61JLio y2AaWcBzX7oxT2cDOy7slK1GYhVuxcS7vmaTYiM/oJv2X5MNOozUBUD1XoxkLX5r N9fO9/eW8749r/n/hko7eFHzfrDO+iosYpXv88SMM4g3O3nqqRAnTzOcRVWgB1E/ 9g2ambaarFZK2zwohrHSWNaywbVvdBkzWg3YqCfvBSTzKuMfMU+1xUemFueAt1i3 lbi1XonMPpkxu2G/YHtJG+SWHCtfbxPLa7Y9b7DigYRVht1LJGODPW3tGbxRwM8d MuM4ADNtgNhAFCO/I+EDpcsU3EBF7dQ/ZiiB/T3HzCnbKqeC5IoO0hy/hkGcDzU0 uEOiDpILwpWJ3xU2G+xuHCgPKUIj8C4rJWToar0y1zxphPDhkXfpe5q9xkNg6D32 NEyHK8doIpwwMqwM9Vqj4BTlrC6HHd42s0CkhQNQrqujfaF/NiF7xdDFWVgLk5oD 5ps1ehXb9OsYqCkXa1buldPjCzSPBmKfLy3qqkgqu9nzisE5dMUnGS17FJ1YPkrB kXGK0ccEmErwmxsEd8OCY3NzhoZhT9TgCytGKjfdMbGMUhz7vUk= =ghyZ -----END PGP SIGNATURE----- --ym4mp2po4ott7qkn--