From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: GSoC 2018 Syntax and semantics of systemd units in the Shepherd - 1st update Date: Tue, 12 Jun 2018 15:11:10 +0200 Message-ID: <87vaaop2tt.fsf@gnu.org> References: <87zi01ilyh.fsf@gnu.org> <9b3b976b-3a3f-d5b6-2aff-8200314f7b7a@student.bham.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSj4w-0001et-5N for guix-devel@gnu.org; Tue, 12 Jun 2018 09:11:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSj4q-0002kO-Cq for guix-devel@gnu.org; Tue, 12 Jun 2018 09:11:18 -0400 In-Reply-To: <9b3b976b-3a3f-d5b6-2aff-8200314f7b7a@student.bham.ac.uk> (Ioannis Panagiotis Koutsidis's message of "Mon, 11 Jun 2018 15:07:23 +0300") 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: Ioannis Panagiotis Koutsidis Cc: guix-devel@gnu.org Heya, Ioannis Panagiotis Koutsidis skribis: > Thank you a lot for your comments! I will make sure to make the changes t= hat you > suggested. Awesome. > As for match and things like car/cdr, I had issues with match and signal = handling > in the service file, which was why I changed it with a cond. As for the u= nit parser > I also take the rest of the list via cdar because match in something like > (x y rest ...) does not bind rest - I will probably have to use (x . (y .= rest)) in > the replacement. If you have a specific example, we can look at it. Rest elements in =E2=80=98match=E2=80=99 patterns should definitely get bound. Here=E2=80= =99s an example at the Guile REPL: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,use(ice-9 match) scheme@(guile-user)> (match '(hello brave gnu world!) ((x rest ...) rest)) $2 =3D (brave gnu world!) --8<---------------cut here---------------end--------------->8--- Here =E2=80=98rest=E2=80=99 is bound to the cdr of the list. If you want let=E2=80=99s get in touch on IRC to discuss the issue that you= had. Cheers, Ludo=E2=80=99.