From mboxrd@z Thu Jan 1 00:00:00 1970 From: rendaw <7e9wc56emjakcm@s.rendaw.me> Subject: Re: guile scheme tutorial Date: Tue, 7 May 2019 11:15:26 +0900 Message-ID: References: <60f73aa7-e1ae-2c5d-cf47-c179a54a65ce@s.rendaw.me> <007b2bd7409b29dadddc61c0c67d97ab@hyper.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:51329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <7e9wc56emjakcm@s.rendaw.me>) id 1hNpi5-0006Ti-IF for help-guix@gnu.org; Mon, 06 May 2019 22:20:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <7e9wc56emjakcm@s.rendaw.me>) id 1hNpdj-0005s2-3p for help-guix@gnu.org; Mon, 06 May 2019 22:15:32 -0400 In-Reply-To: <007b2bd7409b29dadddc61c0c67d97ab@hyper.dev> Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: amirouche@hyper.dev Cc: Help-Guix , help-guix@gnu.org On 5/4/19 8:02 PM, amirouche@hyper.dev wrote: > On 2019-05-04 08:08, rendaw wrote: >> On 5/3/19 9:45 PM, amirouche@hyper.dev wrote: >>> Hello! >>> >>> >> (Whoops, replied with the wrong account.) >> >> Oh, this is great!  I've actually been putting together a small Guix >> guide here: >> https://gitlab.com/rendaw/blog/blob/master/how_to_guix_for_those_who_dont.md >> >> >> It has a small Guile primer, but it doesn't go into depth or have any >> hands on examples like yours.  My goal was to cover just enough so that >> people could understand Guix configs (or at least 90% of them), so no >> recursion, etc.  I'm glad you got into records, I just kind of handwaved >> that away ("they're functions", not 100% sure this is correct either). > > That is good. The beginning looks like guix is not worthwhile and then > you continue in the second page with an introduction to guile and guix. > I find it nice actually. > > I spotted a minor error: > >   (system* (string-append #$openssl "/bin/openssl") >            "genrsa" "-out" private-key "2048")) > >   > https://gitlab.com/rendaw/blog/blob/master/how_to_guix_for_those_who_dont.md#running-executables > > Indeed you can run programs like that but in guix it is preferred to run > with invoke, see the source :) > > Thanks for sharing! Oh awesome, thanks!  I saw the recommendation to use invoke (in the package guide?) but actually I'd like to know what the difference between invoke and system* are... the code above was something I grabbed from the Guix source somewhere (cups.scm?) I just checked now (defined in guix/build/utils.scm) and it looks like invoke raises an exception if the command has a non-zero exit, but otherwise they're the same. One more note for the guide I guess :D