Re: [ANN] (potato make) - makefiles in scheme

2021-02-15 Thread Olivier Dion via General Guile related discussions
On Mon, 15 Feb 2021, Mike Gran  wrote:
> Hello All-
>
> I wrote a pure scheme Guile library (potato make) that lets one write
> makefiles in scheme.  The code lives at
> https://github.com/spk121/potato-make.

Interesting project!  I'm currently working on a small utility that
takes Scheme definition of a C project and generates a Makefile for it.
potato-make could make things easier to emit Makefile text from s-exp
templates.

>
> If you are familiar with the cryptic makefile syntax, and with scheme
> syntax, you may be able to decipher this makefile written in potato
> make.  Here ':=' is variable assignment, ':' is a target rule and '->'
> is a suffix rule.  The '~' syntax is a lazy concatenation operator
> that passes its output as a string to the system() procedure.
>
>   #!/usr/bin/env sh
>   exec guile -s "$0" "$@"
>   !#
>
>   (use-modules (potato make))
>   (initialize)
>
>   (:= CC "gcc")
>   (:= CFLAGS "-g -O2")
>
>   (: "all" '("foo"))
>   (: "foo" '("foo.o" "bar.o")
> (~ ($ CC) "-o" $@ $^))
>   (-> ".c" ".o"
> (~ ($ CC) "-c" $<))
>
>   (execute)
>
> There is quite a bit of flexibility here.  You can write your recipes
> in shell, in scheme, or in scheme that returns a string that gets
> passed to the shell.
>
> I'll probably rename the ':' syntax for the sake of SRFI-119 wisp
> compatibility.  Translated to wisp, this really would look like a
> dialect of makefile.
>
> No official tarball yet. I'll do that soonish after I get better
> coverage in the test suite.  I was just a bit proud of this silly
> hack, and wanted to show it off.  Thanks for reading.
>
> Regards,
> Mike Gran
>
-- 
Olivier Dion
PolyMtl



Re: guile-hall issues converting my project to a hall project

2021-02-15 Thread Zelphir Kaltstahl
On 07.02.21 14:30, Tim Van den Langenbergh wrote:
> On Saturday, 6 February 2021 22:49:12 CET Zelphir Kaltstahl wrote:
>> Hello Guile Users!
>>
>> I decided to try to use guile-hall to convert my project at
>> https://notabug.org/ZelphirKaltstahl/guile-fslib into a Guix package.
>> For that purpose I created a separate branch
>> "wip-guix-package-using-guile-hall"
>> (branch: https://notabug.org/ZelphirKaltstahl/guile-fslib/src/wip-guix-packa
>> ge-using-guile-hall commit:
>> https://notabug.org/ZelphirKaltstahl/guile-fslib/src/a8344c5dd47515c533af3eb
>> d497adcce6b683e82), from which I am starting to run commands.
>>
>> It seems, that many of guile-hall's defaults are wrong for my project
>> and I need to adapt a lot of its settings. It also tells me to report
>> unsupported file types, but I cannot do that in the guile-hall
>> repository, because I cannot log in on Gitlab, because Gitlab has a
>> "clever" "check of my browser", which simply loops forever reloading the
>> "browser check" website … My guess: The check requires third party
>> cookies to be set. So I am going to write about it here and hope someone
>> knows how to proceed.
>>
>> The example call in the readme of
>> https://gitlab.com/a-sassmannshausen/guile-hall for converting a project is:
>>
>> 
>> hall init --convert --author "Jane Doe" --prefix guile frobnigator --execute
>> 
>>
>> I am not sure what exactly the prefix is. `hall init --help` only tells
>> me: "Prefix of the project.", which does not help me. It basically has
>> zero more information for me. Does this already have to do with the
>> Makefile, which is created later? I leave prefix at "guile" for now.
>> What is "frobnigator"? I think it is the name of the project, because in
>> `hall init --help` it says that the syntax is:
>>
>> 
>> hall initiate [-cx] NAME
>>  [-a "Alyssa P. Hacker"]
>>  [-l gpl3+]
>>  [-p guile]
>>  [-w "https://website.mine";]
>> 
>>
>> (I like the SICP reference, btw.) `NAME` is the only thing that I cannot
>> translate anything else to be in the command above. I think it would be
>> better to not use something confusing like "frobnigator", which people
>> might not know what that even is, and use a generic word like
>> "my-project-name".
>>
>> So the command I run is:
>>
>> 
>> hall init --convert --author 'Zelphir Kaltstahl' --prefix 'guile' fslib
>> --license 'agpl3+' --execute 
>>
>> What I like about it is, that everything seems to be dry-run, except
>> when adding `--execute`. That makes things less scary.
>>
>> Then hall creates a bunch of files, but most things seem not to consider
>> my actual already existing project structure. hall never asks me what my
>> test directory is or what file my license information is in. I think it
>> would be good to have those things available as command line arguments,
>> so that I do not need to fix things afterwards, which differ from the
>> defaults.
>>
>> I will list the things, that I need to change to correct values after
>> the hall command has finished and steps I am taking, from the
>> perspective of a first time user, because perhaps it can help improving
>> guile-hall:
>>
>> (1) Remove my old license file, which was not `COPYING` but `LICENSE`.
>> Here I do not really care about in which file it is. It would be great,
>> if hall asked me about the `LICENSE` file though. Perhaps a list of
>> common names of license files could be added to hall and it could check
>> for those?
>>
>> (2) In `guix.scm` the version is wrong. It should be `(version
>> "0.2.0")`, not `(version "0.1")`. The git repository already has a tag
>> `0.2.0`, but I think, that "0.1" is a default value, which is simply put
>> into `guix.scm`. Here a `--version` argument would be good to have, with
>> the default still being `0.1.0` or `0.1`. I think 3 parts is the better
>> choice, because it makes processing version numbers easier. Every
>> version number would have 3 parts. Always. And it could be made a list
>> of 3 symbols or even numbers as well. But if they are only numbers, one
>> could not have something like "rc" for release candidate or stuff like
>> that. Also not everyone might want to use version numbers like these. I
>> have seen projects using the date as version number.
>>
>> (3) After adapting the version number, the `source` has to be adapted as
>> well to reflect the change in version. At this point I get insecure
>> about the whole thing. "Will Guix be able to find this archive? Will it
>> look only for a version number consisting of 2 parts? Will anything
>> break later in the process, because I am not following the same
>> versioning syntax and have 3 parts instead of 2 parts written in the
>> string?"
>>
>> (4) In the `guix.scm` native inputs are defined. The concept of that is
>> very unclear in my mind. I read about that previously on the Guix pages,
>> but I already forgot again what native inputs are an

guile-oauth 1.0.0 released

2021-02-15 Thread Aleix Conchillo Flaqué
Hi,

I'm very excited to announce guile-oauth 1.0.0. The biggest addition to
this version is OAuth 2.0 support (authorization code and client
credentials grants). It comes with a Reddit example. It has also very minor
breaking changes for the old OAuth 1.0a API.

https://github.com/aconchillo/guile-oauth/

* About

guile-oauth is an OAuth client module for Guile. It supports the following
features:

- OAuth 1.0a: HMAC-SHA1 and PLAINTEXT signatures.
- OAuth 2.0: Authorization Code and Client Credentials grant types.

* Download

Compressed sources and a GPG detached signature[*]:

https://download.savannah.nongnu.org/releases/guile-oauth/guile-oauth-1.0.0.tar.gz
https://download.savannah.nongnu.org/releases/guile-oauth/guile-oauth-1.0.0.tar.gz.sig

[*] To verify download both files and then run:

   gpg --keyserver keys.openpgp.org \
--recv-keys 7CEC5511C8D057A9EF17470C54D4CC6FFC7468F4

   gpg --verify guile-oauth-1.0.0.tar.gz.sig

* Changes since 1.0.0

https://github.com/aconchillo/guile-oauth/blob/master/NEWS

Bugs and comments can be reported at
https://github.com/aconchillo/guile-oauth/issues

Happy hacking!

Aleix