From mboxrd@z Thu Jan 1 00:00:00 1970 From: amirouche@hyper.dev Subject: Re: guile scheme tutorial Date: Tue, 07 May 2019 09:09:30 +0200 Message-ID: <0d1f8c320496ddd6349e3af0bfc85169@hyper.dev> References: <60f73aa7-e1ae-2c5d-cf47-c179a54a65ce@s.rendaw.me> <007b2bd7409b29dadddc61c0c67d97ab@hyper.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:45426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNuEM-0003mg-T2 for help-guix@gnu.org; Tue, 07 May 2019 03:09:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNuEL-0007TT-Sg for help-guix@gnu.org; Tue, 07 May 2019 03:09:38 -0400 In-Reply-To: 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: rendaw <7e9wc56emjakcm@s.rendaw.me> Cc: Help-Guix , help-guix@gnu.org On 2019-05-07 04:15, rendaw wrote: > 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. Also it returns #t which is expected in every phase procedure.