From mboxrd@z Thu Jan 1 00:00:00 1970 From: Caleb Ristvedt Subject: GSoC proposal last-minute double-check Date: Mon, 3 Apr 2017 02:25:02 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c09ded6c8156e054c3e0e5b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuwMP-0006zy-1F for guix-devel@gnu.org; Mon, 03 Apr 2017 03:25:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuwMM-0005Ci-GD for guix-devel@gnu.org; Mon, 03 Apr 2017 03:25:09 -0400 Received: from mail-oi0-x22f.google.com ([2607:f8b0:4003:c06::22f]:36073) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cuwMM-0005Ad-64 for guix-devel@gnu.org; Mon, 03 Apr 2017 03:25:06 -0400 Received: by mail-oi0-x22f.google.com with SMTP id r203so115972678oib.3 for ; Mon, 03 Apr 2017 00:25:04 -0700 (PDT) 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: guix-devel@gnu.org --94eb2c09ded6c8156e054c3e0e5b Content-Type: text/plain; charset=UTF-8 I realize this is very last-minute indeed, but thought I'd see if I could get some feedback before I submit. I'm looking at working on the Guile Scheme guix-daemon - it seems much more concrete in scope than the build tool. I wrote my proposal based on https://www.gnu.org/software/soc-projects/guidelines.html, but I think that might be a bit outdated - it's still got links to 2013 stuff and talks about mid-semester evaluations even though the schedule currently is to divide the summer in to 3 work periods. I'm least confident about the timeline of my proposal - is the time for those goals reasonable, evenly spaced, etc? Here's the full proposal as I have it now: * Name Caleb Ristvedt (irc nickname: reepca) * email address caleb.ristvedt@cune.org * name of project Guix Rewrite build daemon in Guile Scheme * Summary Currently the build daemon of Guix is written in C++, inherited from Nix. It works fine but is not as hackable as we'd like, and has poor integration with the rest of Guix. For instance, the daemon calls out to the 'guix substitute', 'guix authenticate', and 'guix offload' commands, but its interface to these commands is very limited. Furthermore, a large part of the daemon's code is already implemented in Scheme: container functionality is available with 'call-with-container', archive creation is implemented in (guix nar), writing derivation files (.drv) is done in (guix derivations), and so on. The goal of this project would be to rewrite the daemon in Guile Scheme using the building blocks already available. Important missing bits include the garbage collector and its scanner (which scans files for references to /gnu/store items), the scheduler, which schedules derivation builds in topological order, using the specified number of cores, etc. * Benefits This would benefit users indirectly by benefiting developers. The easier it is to understand and modify the code, the better the quality of the resulting software (I leave this as an axiom). Better-quality software benefits users. So this project will benefit users. ** Better hackability By "hackability", I mean ease of modifying. Where more than one language needs to be known to make changes, the code is more difficult to change. Where one of those languages is C++, it's even more difficult to change. Where multiple languages need to talk to each other, changing the interface is more difficult than if the interface involves only one language. ** Reduce duplication of code Duplicated code is more code than if there is not duplication. It's easier to understand less code. If we can replace the C++ implementation with one in Guile Scheme, there won't be duplication (we can get rid of the C++ implementation). So replacing the C++ implementation with one in Guile Scheme will make the code easier to understand. * Deliverables A program which, when run, will perform the same function as the current guix-daemon, and is written by me solely in Guile Scheme. Additionally, documentation explaining how the garbage collector and scheduler work and analyzing the time and space requirements of the algorithms used as well as profiling the real-world performance of the daemon. * Plan (I can't find any mention of mid-term evaluations in the 2017 GSoC timeline, so I'm guessing that https://www.gnu.org/software/soc-projects/guidelines.html is outdated?) The missing pieces according to the suggestion description include the garbage collector, scanner, and scheduler. Presumably those are either the only missing pieces or the only non-trivial missing pieces. I will read through the current C++ code implementing garbage collection and scanning during the "Community Bonding Period" to learn how it works. The first step should be to implement the missing pieces. I will be on schedule if I have the garbage collector and scanner working ("working" here means that given sufficient time, all packages lacking references will be deleted or otherwise noticed by a program I wrote in Guile Scheme) by the end of the first work period, and if the scheduler is working by the end of the second work period ("working" here means that a program I wrote in Guile Scheme can order derivations topologically and schedule their building with the same characteristics as the current guix-daemon can). By the end of the third work period I will be on schedule if a complete executable, functioning in the same way as the current guix-daemon and written by me in Guile Scheme, exists. The results from the first two work periods should be usable by themselves in the event that I am unable to complete the entire project. ** Other commitments During the summer I will be unable to work from 1300 to 1800 UTC on Sundays and 0030 to 0400 UTC on Mondays (Sunday morning and evening for me), and from 0030 to 0400 UTC on Fridays (Thursday evening for me). I currently don't anticipate any extended time of unavailability, but should it arise it will either be an emergency or communicated several weeks in advance. * Communication I will communicate using email (individually and/or via the guix-devel mailing list, as seems appropriate) and irc in #guix on freenode. My progress can be monitored via a public github repository to be set up at a later date. I will seek my mentor's input regarding the quality and content of my code at least once a week. * Qualification This project appealed to me for a number of reasons: - It is a GNU project - It uses a Lisp, a family of languages I appreciate - It is clearly-defined (you can't get much clearer than "there is already working code that does what you are trying to do") - I have some experience with Guix and GuixSD before, from the user side (the only one silly enough to accidentally cause a kernel panic in Shepherd by using incorrect command-line syntax!). The idea of a .emacs-style configuration file for the entire operating system especially appeals to me a lot. This project will benefit me by teaching me about garbage collection and at least some of the algorithms used for it. It will also teach me a lot about developing larger-scale programs, and especially about developing programs meant to be used by others, which I expect will involve a lot more input validation than anything I've written before. I'm not /especially/ qualified to work on this. I haven't devoted much time to studying garbage collection, and I haven't looked at the guix-daemon code yet. But I've been told that I am an effective independent learner, and this /does/ interest me. I have learned Common Lisp on my own time over the past two years, so Scheme shouldn't be too far off. I don't have C++ experience, but do have C and Java experience, and the union of concepts from those two should cover most of the C++ concepts. That just leaves the syntax to learn. * Background I am a sophomore computer science major at Concordia University, Nebraska. I started learning programming in high school with Java (specifically, Processing). I learned some Python when my older brother had to use it in his first year of college, then more last year when I arrived. I don't remember exactly when I learned C, but I did. Over the last two years I learned Forth and Common Lisp. I've been using emacs since right before I started at college, and using GNU/Linux for about two years before that. --94eb2c09ded6c8156e054c3e0e5b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I realize this is very last-minute indeed, but though= t I'd see if I could get some feedback before I submit. I'm looking= at working on the Guile Scheme guix-daemon - it seems much more concrete i= n scope than the build tool. I wrote my proposal based on https://www.gnu.org/so= ftware/soc-projects/guidelines.html, but I think that might be a bit ou= tdated - it's still got links to 2013 stuff and talks about mid-semeste= r evaluations even though the schedule currently is to divide the summer in= to 3 work periods. I'm least confident about the timeline of my propos= al - is the time for those goals reasonable, evenly spaced, etc?

Here's the full proposal as I have it now:

* Name
=C2=A0 C= aleb Ristvedt (irc nickname: reepca)

* email address
=C2=A0 caleb.ristvedt@cune.org

* = name of project
=C2=A0 Guix Rewrite build daemon in Guile Scheme

= * Summary
=C2=A0 Currently the build daemon of Guix is written in C++, i= nherited from Nix. It
=C2=A0 works fine but is not as hackable as we'= ;d like, and has poor integration with
=C2=A0 the rest of Guix. For inst= ance, the daemon calls out to the 'guix substitute',
=C2=A0 '= ;guix authenticate', and 'guix offload' commands, but its inter= face to these
=C2=A0 commands is very limited. Furthermore, a large part= of the daemon's code is
=C2=A0 already implemented in Scheme: conta= iner functionality is available with
=C2=A0 'call-with-container'= ;, archive creation is implemented in (guix nar), writing
=C2=A0 derivat= ion files (.drv) is done in (guix derivations), and so on.

=C2=A0 Th= e goal of this project would be to rewrite the daemon in Guile Scheme using=
=C2=A0 the building blocks already available. Important missing bits in= clude the
=C2=A0 garbage collector and its scanner (which scans files fo= r references to
=C2=A0 /gnu/store items), the scheduler, which schedules= derivation builds in
=C2=A0 topological order, using the specified numb= er of cores, etc.

* Benefits
=C2=A0 This would benefit users indi= rectly by benefiting developers. The easier it is
=C2=A0 to understand a= nd modify the code, the better the quality of the resulting
=C2=A0 softw= are (I leave this as an axiom). Better-quality software benefits
=C2=A0 = users. So this project will benefit users.
** Better hackability
=C2= =A0=C2=A0 By "hackability", I mean ease of modifying. Where more = than one language
=C2=A0=C2=A0 needs to be known to make changes, the co= de is more difficult to
=C2=A0=C2=A0 change. Where one of those language= s is C++, it's even more difficult to
=C2=A0=C2=A0 change. Where mul= tiple languages need to talk to each other, changing the
=C2=A0=C2=A0 in= terface is more difficult than if the interface involves only one
=C2=A0= =C2=A0 language.
** Reduce duplication of code
=C2=A0=C2=A0 Duplicate= d code is more code than if there is not duplication. It's easier to=C2=A0=C2=A0 understand less code. If we can replace the C++ implementatio= n with one in
=C2=A0=C2=A0 Guile Scheme, there won't be duplication = (we can get rid of the C++
=C2=A0=C2=A0 implementation). So replacing th= e C++ implementation with one in Guile Scheme
=C2=A0=C2=A0 will make the= code easier to understand.

* Deliverables
=C2=A0 A program which= , when run, will perform the same function as the current
=C2=A0 guix-da= emon, and is written by me solely in Guile Scheme. Additionally,
=C2=A0 = documentation explaining how the garbage collector and scheduler work and=C2=A0 analyzing the time and space requirements of the algorithms used a= s well as
=C2=A0 profiling the real-world performance of the daemon.
=
* Plan
=C2=A0 (I can't find any mention of mid-term evaluations = in the 2017 GSoC timeline,
=C2=A0 so I'm guessing that https://www.gnu.or= g/software/soc-projects/guidelines.html
=C2=A0 is outdated?)

= =C2=A0 The missing pieces according to the suggestion description include t= he garbage
=C2=A0 collector, scanner, and scheduler. Presumably those ar= e either the only
=C2=A0 missing pieces or the only non-trivial missing = pieces.

=C2=A0 I will read through the current C++ code implementin= g garbage collection and
=C2=A0 scanning during the "Community Bond= ing Period" to learn how it works.

=C2=A0 The first step shoul= d be to implement the missing pieces. I will be on
=C2=A0 schedule if I = have the garbage collector and scanner working ("working" here=C2=A0 means that given sufficient time, all packages lacking references w= ill be
=C2=A0 deleted or otherwise noticed by a program I wrote in Guile= Scheme) by the end
=C2=A0 of the first work period, and if the schedule= r is working by the end of the
=C2=A0 second work period ("working&= quot; here means that a program I wrote in Guile
=C2=A0 Scheme can order= derivations topologically and schedule their building with
=C2=A0 the s= ame characteristics as the current guix-daemon can). By the end of the
= =C2=A0 third work period I will be on schedule if a complete executable,=C2=A0 functioning in the same way as the current guix-daemon and written = by me in
=C2=A0 Guile Scheme, exists.

=C2=A0 The results from the= first two work periods should be usable by themselves in
=C2=A0 the eve= nt that I am unable to complete the entire project.

** Other commitm= ents
=C2=A0=C2=A0 During the summer I will be unable to work from 1300 t= o 1800 UTC on Sundays
=C2=A0=C2=A0 and 0030 to 0400 UTC on Mondays (Sund= ay morning and evening for me), and from
=C2=A0=C2=A0 0030 to 0400 UTC o= n Fridays (Thursday evening for me). I currently don't
=C2=A0=C2=A0 = anticipate any extended time of unavailability, but should it arise it will=
=C2=A0=C2=A0 either be an emergency or communicated several weeks in ad= vance.

* Communication
=C2=A0 I will communicate using email (ind= ividually and/or via the guix-devel mailing
=C2=A0 list, as seems approp= riate) and irc in #guix on freenode. My progress can be
=C2=A0 monitored= via a public github repository to be set up at a later date. I will
=C2= =A0 seek my mentor's input regarding the quality and content of my code= at least
=C2=A0 once a week.

* Qualification
=C2=A0 This proj= ect appealed to me for a number of reasons:
=C2=A0 - It is a GNU project=
=C2=A0 - It uses a Lisp, a family of languages I appreciate
=C2=A0 -= It is clearly-defined (you can't get much clearer than "there is = already
=C2=A0=C2=A0=C2=A0 working code that does what you are trying to= do")
=C2=A0 - I have some experience with Guix and GuixSD before, = from the user side (the
=C2=A0=C2=A0=C2=A0 only one silly enough to acci= dentally cause a kernel panic in Shepherd by
=C2=A0=C2=A0=C2=A0 using in= correct command-line syntax!). The idea of a .emacs-style
=C2=A0=C2=A0= =C2=A0 configuration file for the entire operating system especially appeal= s to me
=C2=A0=C2=A0=C2=A0 a lot.

=C2=A0 This project will benefi= t me by teaching me about garbage collection and at
=C2=A0 least some of= the algorithms used for it. It will also teach me a lot about
=C2=A0 de= veloping larger-scale programs, and especially about developing programs=C2=A0 meant to be used by others, which I expect will involve a lot more = input
=C2=A0 validation than anything I've written before.

= =C2=A0 I'm not /especially/ qualified to work on this. I haven't de= voted much time to
=C2=A0 studying garbage collection, and I haven't= looked at the guix-daemon code
=C2=A0 yet. But I've been told that = I am an effective independent learner, and this
=C2=A0 /does/ interest m= e. I have learned Common Lisp on my own time over the past
=C2=A0 two ye= ars, so Scheme shouldn't be too far off. I don't have C++ experienc= e,
=C2=A0 but do have C and Java experience, and the union of concepts f= rom those two
=C2=A0 should cover most of the C++ concepts. That just le= aves the syntax to learn.

* Background
=C2=A0 I am a sophomore co= mputer science major at Concordia University, Nebraska. I
=C2=A0 started= learning programming in high school with Java (specifically,
=C2=A0 Pro= cessing). I learned some Python when my older brother had to use it in his<= br>=C2=A0 first year of college, then more last year when I arrived. I don&= #39;t remember
=C2=A0 exactly when I learned C, but I did. Over the last= two years I learned Forth
=C2=A0 and Common Lisp. I've been using e= macs since right before I started at
=C2=A0 college, and using GNU/Linux= for about two years before that.

--94eb2c09ded6c8156e054c3e0e5b--