Hi,
Attila Lendvai skribis:
>> Another approach would be to use ‘define-record-type*’ and record all
>> the default values, including those derived from other fields (just like
>> the default ‘home-directory’ field of is derived from
>> ‘name’.)
>>
>> Does that make sense?
>
>
> i think it does
using *unspecified* here won't work, because Guile's underlying record
implementation uses it pretty much for the same purpose: it errors
when it encounters *unspecified* as a field value:
> (cfg)
While compiling expression:
Syntax error:
unknown file:761:0: %cfg: missing field initializers (threa
Hi,
Attila Lendvai skribis:
>> Out of curiosity, in what case do you need to represent “unset fields”?
>
>
> i think an example works better here: consider Swarm, a p2p storage
> solution. its node implementation is called Bee. bees can join
> swarms. there are some well-known swarms: 'testnet'
> How about using ‘*unspecified*’ in those cases?
hrm, that looks interesting, thanks! i'll try using that first. it's
Guile-specific, but then most of the rest of Guix is...
> Out of curiosity, in what case do you need to represent “unset fields”?
i think an example works better here: consid
Attila Lendvai skribis:
>> There’s no widespread “Maybe” idiom in Scheme; or rather, people use
>> TYPE | #f as a way to approximate “Maybe”. It’s not ideal, primarily
>> because appropriate handling is not statically checked. Yet, that’s
>> what we have and I’m not convinced adding SRFI-189 to t
> There’s no widespread “Maybe” idiom in Scheme; or rather, people use
> TYPE | #f as a way to approximate “Maybe”. It’s not ideal, primarily
> because appropriate handling is not statically checked. Yet, that’s
> what we have and I’m not convinced adding SRFI-189 to the mix would
> bring enough of
Hi,
Attila Lendvai skribis:
> when working on the (gnu services configuration) module, i would like
> to use srfi-189, which is not available in Guile
> (https://srfi.schemers.org/srfi-189/srfi-189.html).
In addition to what Maxime wrote, I’d like to comment on the less
technical side of it. I
> I forgot to include "guile" ("guix shell" needs that to know
> "GUILE_LOAD{,_COMPILED}_PATH"), try
>
> ./pre-inst-env guix shell guile guile-srfi-189 -- guile
that this works indeed, thanks!
i have sent the guile-srfi-189 patch as:
https://issues.guix.gnu.org/53317
--
• attila lendvai
• PGP:
Attila Lendvai schreef op do 13-01-2022 om 18:20 [+]:
> > Using the guile REPL is a little less complicated than the guix
> > repl,
> > I would recommend trying
> >
> > "./pre-inst-env guix shell guile-srfi-189 -- guile" first.
>
> no luck with this either:
>
> $ ./pre-inst-env guix build gu
> no luck with this either:
>
> $ ./pre-inst-env guix shell guile-srfi-189 -- guile
> GNU Guile 3.0.7
> Copyright (C) 1995-2021 Free Software Foundation, Inc.
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This
> program is free software, and you are welcome to redistribute
> Using the guile REPL is a little less complicated than the guix repl,
> I would recommend trying
>
> "./pre-inst-env guix shell guile-srfi-189 -- guile" first.
no luck with this either:
$ ./pre-inst-env guix build guile-srfi-189
/gnu/store/cy1mdr82i8dcj5435hnckibfqks3jmny-guile-srfi-189-0-0.a0e
Maxime Devos schreef op do 13-01-2022 om 11:53 [+0100]:
> Hi,
>
> Attila Lendvai schreef op do 13-01-2022 om 09:55 [+]:
> > + (arguments
> > + '(#:not-compiled-file-regexp "srfi/189\\.scm$"))
>
> Maybe do "guix build guile-srfi-189" to determine if srfi/189.sld
> is actually compil
Attila Lendvai schreef op do 13-01-2022 om 09:55 [+]:
> thank you Maxime!
>
> with your guidance, i have managed to add guile-srfi-189 next to
> the other guile-srfi-NNN packages in guile-xyz.scm (a slightly tested
> diff is attached).
>
> but when i grep for how these guile-srfi-NNN packages
Hi,
Attila Lendvai schreef op do 13-01-2022 om 09:55 [+]:
> + (arguments
> + '(#:not-compiled-file-regexp "srfi/189\\.scm$"))
Maybe do "guix build guile-srfi-189" to determine if srfi/189.sld
is actually compiled to .../srfi/srfi-189.go?
Greetings,
Maxime.
signature.asc
Descript
thank you Maxime!
with your guidance, i have managed to add guile-srfi-189 next to the other
guile-srfi-NNN packages in guile-xyz.scm (a slightly tested diff is attached).
but when i grep for how these guile-srfi-NNN packages are actually used within
guix, then i don't see any hits unfortunatel
Attila Lendvai schreef op wo 12-01-2022 om 16:46 [+]:
> dear Guixers,
>
> when working on the (gnu services configuration) module, i would like
> to use srfi-189, which is not available in Guile
> (https://srfi.schemers.org/srfi-189/srfi-189.html).
>
> is there any way to add it, or an alread
i did a quick experiment: created the srfi/ dir in guix's root dir,
downloaded the .scm file from the srfi's git repo, and added a module
definition to it. it seems to work as expected.
so, technically it seems to be doable. but would a patch that adds it
to Guix get accepted?
--
• attila lendvai
dear Guixers,
when working on the (gnu services configuration) module, i would like to use
srfi-189, which is not available in Guile
(https://srfi.schemers.org/srfi-189/srfi-189.html).
is there any way to add it, or an already established custom for such a
situation? e.g. adding the .scm file
18 matches
Mail list logo