[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Switching to ECMAscript
Switching to ECMAscript
Tue, 01 Apr 2014 11:45:03 +0200
Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)
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:
scheme@(guile-user)> ,L ecmascript
Happy hacking with ECMAScript! To switch back, type `,L scheme'.
;;; <unknown-location>: warning: possibly unbound variable `require'
$1 = #<<js-module-object> 1e325a0>
$2 = #<<js-module-object> 1660370>
$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 =>
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 ), 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 , 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!
 Section 3.3, http://arxiv.org/abs/1305.4584
 See around slide 29,
Description: PGP signature
- Switching to ECMAscript,
Ludovic Courtès <=
- Re: Switching to ECMAscript, Ludovic Courtès, 2014/04/01
- Re: Switching to ECMAscript, Alex Sassmannshausen, 2014/04/01
- Re: Switching to ECMAscript, Andreas Enge, 2014/04/01
- Re: Switching to ECMAscript, Felipe López, 2014/04/01
- Re: Switching to ECMAscript, Ludovic Courtès, 2014/04/02