Hi,
Am 19.02.24 um 23:25 schrieb antlers:
(define (os-with-yubi parent users*)
(modify-record parent
(groups -> (cons (user-group (name "plugdev")) <>))
(users -> (map (lambda (user)
(if (member (user-account-name user)
user
Am Sonntag, dem 25.02.2024 um 13:27 -0800 schrieb antlers:
> Thanks for the detailed response c:
>
> The blocker is that AFAIK we can't tell if a record-field was defined
> as thunk-ed or delay-ed outside of the expansion of the
> `define-record-type*' form that defines it, nor programatically
> a
Thanks for the detailed response c:
The blocker is that AFAIK we can't tell if a record-field was defined as
thunk-ed or delay-ed outside of the expansion of the `define-record-type*'
form that defines it, nor programatically access it's getter/setter (the pair
`(guix records)` defines, which acco
Am Sonntag, dem 25.02.2024 um 10:49 -0800 schrieb antlers:
>
> 1.) It leaks `(guix records)`'s thunked/delayed field abstraction to
> the end-user, which will confuse and regularly bite absolutely anyone
> who tries to use it.
>
> 2.) Ideally we'd check that modified fields exist at compile-time.
> I don't believe that the syntax achieves its goals without this
> mechanism
I just realized my example doesn't actually include a use of recursive
cut after all (whoops), and finding only 2 uses in my code-base, am open to
considering SRFI-26 sufficient. This helps somewhat, but was not the bloc
> That looks like a nice syntax indeed. Is the code behind it small
> enough to include it in (guix records)?
Small enough? Yes (<100 LOC, inc. a handful of comments and tests).
Suitable? No, I introduced it as "moderately-cursed" for a reason >u<
But I appreciate the sentiment c:
1.) It leaks
Am Montag, dem 19.02.2024 um 14:25 -0800 schrieb antlers:
> ```
> (define (os-with-yubi parent users*)
> (modify-record parent
> (groups -> (cons (user-group (name "plugdev")) <>))
> (users -> (map (lambda (user)
> (if (member (user-account-name user)
>
Hi!
Just wanted to say that I really admire your take on end-user service
configuration in the Beaver Labs channel.
I gravitated towards composing functions over `operating-systems` myself,
though my config is probably only ""notable"" for the moderately-cursed
`modify-record` macro that I use
Oh, thank you! Don't study too closely-- I'm quite the novice myself,
having come upon your work in search of better solutions, and the
drawbacks I described are rather notable; but I appreciate that you
see what I was going for.
(I'd be much happier with it if I could interrogate `(guix record)`
Hello!
Edouard Klein skribis:
> Thank you Liliana and Attila for the swift and actionable feedback :)
>
> Below is a revised proposition.
>
> Here is a minimal working example of an os declaration:
> --mwe.scm---
> (use-modules
> (beaver system)
> (beaver functional
Hello,
just FTR, i don't think that the guix codebase is too bad in this regard.
It's not bad for the slightly initiated, which does still take time, and I
think that front would perhaps benefit from some attention.
My main take away from this was that what I liked mostly about the BeaverLab
> > the downside of generating countless macros is that they won't show up
> > in backtraces, and they cannot be found when grep'ping the codebase,
> > and as such make the codebase much less approachable.
>
>
> Reading your words really helped me feel that I'm not alone. You more or
> less summa
Hi Attila,
On Wed, Nov 29 2023, Attila Lendvai wrote:
> i agree. in my experience, it's good practice in general to try to
> make a functional API as convenient as possible, and if that is still
> too verbose or cumbersome, only then add a thin layer of syntactic
> abstractions that expand to cod
> lines of code. I think hyper-focusing on syntax to make services
> "nicer" might be the wrong approach here: You could greatly reduce the
> complexity by making them procedures instead of syntax and still keep
> most of the configuration readable to a great extent.
i agree. in my experience, it
Am Sonntag, dem 26.11.2023 um 21:46 +0100 schrieb Edouard Klein:
>
> Liliana Marie Prikler writes:
> > > (instantiate nginx)
> > I do wish you spelled out service. Also, instantiate takes as much
> > characters to type as add-service.
> >
>
> Done, see below. I was worried about the parony
Liliana Marie Prikler writes:
>> (instantiate nginx)
> I do wish you spelled out service. Also, instantiate takes as much
> characters to type as add-service.
>
Done, see below. I was worried about the paronymy between add-service
and add-services which already exists. I defer to you and y
Hello guix,
I'll chime in because I've been playing around with this kind of thing
in my channel [1]
for a bit now and perhaps some of the ideas will be deemed useful.
(service+ OS SERVICE [CONF])
(service- OS SERVICE)
(modify-service OS SERVICE UPDATE)
I found that defining a functional A
Am Sonntag, dem 26.11.2023 um 17:49 +0100 schrieb Edouard Klein:
> Thank you Liliana and Attila for the swift and actionable feedback :)
>
> Below is a revised proposition.
>
> Here is a minimal working example of an os declaration:
> --mwe.scm---
> (use-modules
> (be
Thank you Liliana and Attila for the swift and actionable feedback :)
Below is a revised proposition.
Here is a minimal working example of an os declaration:
--mwe.scm---
(use-modules
(beaver system)
(beaver functional-services)
(gnu packages version-control)
(gnu
> (service+ OS SERVICE [CONF])
> (service- OS SERVICE)
> (modify-service OS SERVICE UPDATE)
what would the benefit of generating multiple macros for each service compared
to the above functional API (with 3-4 elements altogether)?
i could be missing something here, but it seems to be precious l
Am Freitag, dem 24.11.2023 um 22:43 +0100 schrieb Edouard Klein:
> Dear Guixers,
>
> Here is a quick status update on my proposition to expose composable
> functions to change operating-system declarations.
>
> Thank you all for the feedback you gave me :) It's very nice to not
> be talking in th
Dear Guixers,
Here is a quick status update on my proposition to expose composable
functions to change operating-system declarations.
Thank you all for the feedback you gave me :) It's very nice to not be
talking in the void.
After Liliana opined that these functions should not put too much burd
Anecdotally, my personal configurations are built out of composable
operating-system transformers that add packages, services, etc. through
trees of inherited records.
That's fairly straightforward for eg. adding packages, but becomes more
complicated when you consider modifying service configurat
Hi !
Ludovic Courtès writes:
> Hi Edouard,
>
> Edouard Klein skribis:
>
>> For my clients and my own use, I use a layer on top of operating-system
>> declarations in which I create functions that take an os as a first
>> argument, and return an os.
>>
>> With the help of the handy -> macro, I ca
Hi Edouard,
Edouard Klein skribis:
> For my clients and my own use, I use a layer on top of operating-system
> declarations in which I create functions that take an os as a first
> argument, and return an os.
>
> With the help of the handy -> macro, I can chain them, thus allowing an
> easy stac
Am Donnerstag, dem 23.03.2023 um 09:06 +0100 schrieb Edouard Klein:
> After a few months of experience, and positive feedback from my
> clients, my question to you guys is: would you be interested in
> mainlining this, or should I keep my development efforts separate in
> my channel ?
Having just d
Hi Josselin,
Josselin Poiret writes:
> [[PGP Signed Part:Undecided]]
> Hi Edouard,
>
> Edouard Klein writes:
>
>> #+begin_src scheme
>> (->
>> (minimal-ovh "ssh-rsa AAASomethingSomething== root@minimal-ovh")
>> (http-static-content "sub2.example.com" #:to-dir "/srv/sub2")
>> (http-static-con
Hi Edouard,
Edouard Klein writes:
> #+begin_src scheme
> (->
> (minimal-ovh "ssh-rsa AAASomethingSomething== root@minimal-ovh")
> (http-static-content "sub2.example.com" #:to-dir "/srv/sub2")
> (http-static-content "sub1.example.com" #:to-dir "/srv/sub1/")
> (add-services my-db))
> #+end_src
Dear Guixers,
For my clients and my own use, I use a layer on top of operating-system
declarations in which I create functions that take an os as a first
argument, and return an os.
With the help of the handy -> macro, I can chain them, thus allowing an
easy stacking of multiple "roles" or "funct
29 matches
Mail list logo