From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Vong Subject: Re: GSOC draft Date: Sat, 26 Mar 2016 02:07:25 +0800 Message-ID: <871t6yh1nm.fsf@gmail.com> References: <877fgtcbwc.fsf@gmail.com> <87vb4aog1i.fsf@gnu.org> 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]:34674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajW90-0001tV-O3 for guix-devel@gnu.org; Fri, 25 Mar 2016 14:07:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ajW8w-0004lQ-LA for guix-devel@gnu.org; Fri, 25 Mar 2016 14:07:34 -0400 In-Reply-To: <87vb4aog1i.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 25 Mar 2016 14:14:49 +0100") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org, Pjotr Prins ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hi, Alex! > > Alex Vong skribis: > >> Deliverable: >> An extensible working bare-bone build system in Guile >> Plan: >> Idea: >> Autotool separates the configure phase and the build phase, >> in which the configure phase is responsible of probing feature >> provided by system, while the build phase actually does dependency t= racking >> and performs the build. This is not optimal since global variables h= as to >> pass to another phase, one has to make sure to perform the probing >> in the right order. Also, many probing are done regardless whether t= hey >> are needed. This causes performance issue when the result is not cac= hed. >> So, the idea is to integrate the 2 phases, >> so that every declaration is approximately: >> (target (input ...) rule-to-make-target-from-input) >> and rule-to-make-target-from-input should return a Boolean indicates >> if the build succeed. >> For instance we can probe the C compiler using the following rule: >> (gcc () (and=3D> (return-path-of-gcc-if-exist-else-return-false) >> (lambda (path) (make-c-compiler path)))) >> Proof of concept: >> Incomplete port of Chicken port of PLT (now Racket) make module in G= uile. >> See build instruction of , >> it uses that incomplete port to build. >> 1. Port the Chicken port of PLT (now Racket) make module to Guile. >> 2. Rewrite the make macro using syntax-rules. >> 3. Add support for feature probing. >> 4. Add support for multiple targets. (mid-term?) >> 5. Add support for parallel build and opportunistic execution. >> 6. Discuss with mentor to proceed. > > From this message it is not entirely clear to me whether Guix would be > used at all, and how things would fit together. I believe it would make > a lot of sense to use Guix to build such a thing but then of course, it > would only work for users would have a running guix-daemon. > > WDYT? First, I have withdrawn my proposal since I think it is not good enough. Of course I will be exploring guix during summer, since it is a fun thing to do. My original thought is to first port a working make-like tool and then change it to output g-exps instead of actually performing the build. > > I would suggest looking at the prototype Make replacement that Eelco > Dolstra wrote as part of his PhD thesis on Nix: > > http://nixos.org/~eelco/pubs/phd-thesis.pdf (Chapter 10) > Thanks for the link to the paper. The paper mentioned nix expression. Is that what g-exp based on? I recently learnt monad by reading `You Could Have Invented Monads! (And Maybe You Already Have.)'. I followed the examples and worked them out in Guile. I highly recommend it to anyone who want to learn monad. I want to ask is the store-monad comparable to the state monad? In the article mentioned above, it introduces >>=3D, unit and lift, which always satisfy the following: let f, g be normal procedure and f* be monadic procedure 1. (>>=3D unit f*) =3D=3D=3D (>>=3D f* unit) =3D=3D=3D f* 2. (lift (compose f g)) =3D=3D=3D (>>=3D (lift f) (lift g)) 3. >>=3D is associative What are their name in the case of store-monad? I see there is >>=3D in store-monad, but how about the other ones? > There=E2=80=99s also this defunct project about a Make replacement in Gui= le (not > connected to Guix and Nix): > > http://home.gna.org/conjure/ > The homepage does not mention guile, is conjure written in guile? Also, the all links in `Getting the Code' section are dead. Should it be fixed? > Maybe Pjotr has other comments. > > Thanks, > Ludo=E2=80=99. Finally, I suggest talking about the monad in the next Guix talks, I "assert" people will love it! Thanks for your feedback!