Re: A new paradigm for modifying operating system declarations

2021-01-05 Thread raid5atemyhomework
Hi Carlo, > In principle, I think this should all be handled by a service. > Services have a number of extension points where they can impact > the operating system being declared, by extending other services. > For example, adding a package into the global profile is done by > extending profile-s

Re: A new paradigm for modifying operating system declarations

2021-01-04 Thread Carlo Zancanaro
Hi raid5atemyhomework, On Tue, Jan 05 2021, raid5atemyhomework wrote: What `install-zfs` does is that it installs the same kernel-specific package in three different points: * `kernel-loadable-modules`, because ZFS needs to get into the kernel somehow. * `packages`, because the kernel module

Re: A new paradigm for modifying operating system declarations

2021-01-04 Thread raid5atemyhomework
Hi Jan, > > Better but still don't like it. > Can't we put the os declaration into a variable and then pass it to a > procedure? > Say: > > > (define OS > > (operating-system > > (kernel linux-libre-5.4) > > ; ... other fields ... > > )) > > > > (install-zfs O

Re: A new paradigm for modifying operating system declarations

2021-01-04 Thread raid5atemyhomework
Good morning Taylan, > First, let me point out a more conventional alternative to what your > 'decorate' macro does: > > (define (compose proc . rest) > "Functional composition; e.g. ((compose x y) a) = (x (y a))." > (if (null? rest) > proc > (let ((rest-proc (apply compose rest))) > (lambda x > (

Re: A new paradigm for modifying operating system declarations

2021-01-04 Thread Jan Wielkiewicz
Dnia 2021-01-04, o godz. 15:38:38 raid5atemyhomework napisaƂ(a): > Hi guix-developers, Hello. > ```scheme > (install-zfs > (operating-system > (kernel linux-libre-5.4) > ; ... other fields ... > )) > ``` I don't like this way of nesting the OS declaration inside of any other expr

Re: A new paradigm for modifying operating system declarations

2021-01-04 Thread Taylan Kammer
On 04.01.2021 16:38, raid5atemyhomework wrote: Hi guix-developers, I'd like to propose an idea for constructing `` objects. [... snip ...] What are your opinions? Blech? Yummy? Is it worth exploring this paradigm for adding particularly complex features to an operating system definition?

A new paradigm for modifying operating system declarations

2021-01-04 Thread raid5atemyhomework
Hi guix-developers, I'd like to propose an idea for constructing `` objects. First, let me present the `decorate` form: ```scheme (define-syntax decorate (syntax-rules () ((decorate ((x ...)) a ...) (x ... a ...)) ((decorate (x) a ...) (x a ...)) ((decorate ((x ...) y ...