From: "Felipe López" <felipe.lopac@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Switching to ECMAscript
Date: Tue, 1 Apr 2014 10:16:37 -0500 [thread overview]
Message-ID: <CAKJhm3vGzr7csTCp8YS=f5Z2YZMkDKpyEbf1gLX49Zu12xgNVw@mail.gmail.com> (raw)
In-Reply-To: <87k3b9l6xs.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2694 bytes --]
2014-04-01 4:45 GMT-05:00 Ludovic Courtès <ludo@gnu.org>:
> Hello,
>
> Over the last few months I have been questioning some of the choices
> that were initially made for Guix. So I finally took the time to
> investigate more what could be done about it, and specifically I’ve been
> playing with Guile’s ECMAscript front-end.
>
> This is what’s already possible with Guile 2.0:
>
> --8<---------------cut here---------------start------------->8---
> scheme@(guile-user)> ,L ecmascript
> Happy hacking with ECMAScript! To switch back, type `,L scheme'.
> ecmascript@(guile-user)> require('guix');
> ;;; <unknown-location>: warning: possibly unbound variable `require'
> $1 = #<<js-module-object> 1e325a0>
> ecmascript@(guile-user)> require('gnu.packages.vim');
> $2 = #<<js-module-object> 1660370>
> ecmascript@(guile-user)> $2['vim'];
> $3 = #<package vim-7.4 gnu/packages/vim.scm:32 3ad0c60>
> ecmascript@(guile-user)> $1['open-connection'] ();
> $4 = #<build-daemon 256.14 24fe840>
> ecmascript@(guile-user)> $1['package-derivation']($4, $3);
> $5 = #<derivation /gnu/store/kksx3yywbmkjswwj84d58brrdryvjbwi-vim-7.4.drv
> => /gnu/store/3wacq9b5qhnk1vn82jggnc10rb1ib4hl-vim-7.4 2d25cd0>
> --8<---------------cut here---------------end--------------->8---
>
> Pretty cool, no?
>
> ECMAscript lacks some features that we’re used to, such as records and
> macros (which we rely on a lot for package definitions, see [0]), but
> OTOH it has the neat notion of “object properties.” And of course, it’s
> very popular, and GNU hackers are usually familiar with it.
>
> In fact, as I already mentioned in my FOSDEM talk [1], things like npm
> already nicely leverage that, so we don’t even have to come up with a
> new format for package definitions.
>
> So the plan would be to start rewriting package definitions in JS, to
> start with, and then go ahead with the (guix ...) modules. Hopefully
> we can reach feature parity with the current Guix within a year or so.
>
> Another thing I would like to improve in the next months is the
> packaging model. The functional paradigm has its pros, but it has also
> been causing us difficulties. I would like to allow build processes to
> access the root file system, so we can do things like “post-install
> hooks.” I don’t have any clear road map on this one though, so
> suggestions are welcome!
>
> Comments?
>
> Thanks,
> Ludo’.
>
> [0] Section 3.3, http://arxiv.org/abs/1305.4584
> [1] See around slide 29,
> http://www.gnu.org/software/guix/guix-fosdem-20140201.pdf
>
:| :) :D :D
--
Luis Felipe López Acevedo
http://sirgazil.bitbucket.org/
[-- Attachment #2: Type: text/html, Size: 3565 bytes --]
next prev parent reply other threads:[~2014-04-01 15:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-01 9:45 Switching to ECMAscript Ludovic Courtès
2014-04-01 10:02 ` Alex Sassmannshausen
2014-04-01 13:21 ` Ludovic Courtès
2014-04-01 14:07 ` Andreas Enge
2014-04-01 16:17 ` Ludovic Courtès
2014-04-01 18:48 ` Thompson, David
2014-04-01 15:16 ` Felipe López [this message]
2014-04-02 13:12 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKJhm3vGzr7csTCp8YS=f5Z2YZMkDKpyEbf1gLX49Zu12xgNVw@mail.gmail.com' \
--to=felipe.lopac@gmail.com \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).