Re: guile-oauth 1.1.0 released

2022-02-23 Thread Blake Shaw
Aleix Conchillo Flaqué  writes:

> Hi,
>
> I'm happy to announce guile-oauth 1.1.0. This is a minor release that just
> adds a missing #:body keyword argument to OAuth1 and OAuth2 HTTP request
> procedures and improves documentation.
>
> 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.1.0.tar.gz
> https://download.savannah.nongnu.org/releases/guile-oauth/guile-oauth-1.1.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.1.0.tar.gz.sig
>
> * Changes since 1.1.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

thanks you Alex! 
-- 
“In girum imus nocte et consumimur igni”



Re: Shell commands with output to string

2022-02-23 Thread Josselin Poiret
Hello,


p...@thomasdanckaert.be writes:

> Hi,
>
> to throw in an example: I once used a function like the one below to 
> handle stdout and stderr from external commands (from 
> https://github.com/tdanckaert/jobview/blob/master/jobtools.scm#L38 ).  
> Probably far from perfect (my first and only scheme project...), but 
> hopefully it gives you an idea.

Just chiming in to say that [1] isn't fixed yet, so you may run into
issues if you try to redirect out and err to the same port.  In Guix, we
use the following workaround for now ([2]):
--8<---cut here---start->8---
  (match-let (((input . output) (pipe)))
;; Hack to work around Guile bug 52835
(define dup-output (duplicate-port output "w"))
;; Void pipe, but holds the pid for close-pipe.
(define dummy-pipe
  (with-input-from-file "/dev/null"
(lambda ()
  (with-output-to-port output
(lambda ()
  (with-error-to-port dup-output
(lambda ()
  (apply open-pipe* (cons "" command)
(close-port output)
(close-port dup-output)
(handler input)
(close-port input)
(close-pipe dummy-pipe))
--8<---cut here---end--->8---

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52835
[2] 
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/installer/utils.scm?id=c0bc08d82c73e464a419f213d5ae5545bc67e2bf#n87

Best,
-- 
Josselin Poiret



Re: Shell commands with output to string

2022-02-23 Thread Olivier Dion via General Guile related discussions
On Wed, 23 Feb 2022, Zelphir Kaltstahl  wrote:

>> There's ton of missing stuffs in the standard library IMO.  On top of my
>> head, filesystem paths manipulation (e.g. path-join) is also one that is
>> probably getting re-invented a lots.
>
> I actually made something for that, trying to copy mostly the Python
> behavior for os.path.join:
>
> https://notabug.org/ZelphirKaltstahl/guile-fslib
>
> Also available as a GNU Guix package, but not updated in a while on
> Guix.  Repository contains more up to date version.

This is great and should be merged into the standard library of Guile.
Maybe not at it's (I have not read everything), but this would be trully
benifical to all Guile users.

By keeping this as an external library such as a Guix package, I fear
we're aiming at the 'nodejs syndrome' where everything -- down to
the simplest hello world -- is a package dependency.

>> I believe that the successful story of Python is not just about its
>> pretty syntax, but also dues to its very large standard library.
>
> I think so too. Although I sometimes have the feeling, that Guile does
> things in a cleaner way, once one figures out how to do them in the
> first place. One thing I really like are the ports. Stuff like
> call-with-output-string. Takes some twisting of the brain, but once
> one gets it, it becomes very useful and elegant.

Of course Scheme does things better than Python.  I wouldn't be hacking
with it if it was not the case ^^.  Not only the syntax, but the
programming paradigms.  You want FP, you got it.  You want OOP, sure.
You prefer procedural, no problem.  With Python it's more like just OOP
although there's been progress on the FP side.

> But yes, Python is very beginner friendly in terms of batteries
> included.  Although I think that its syntax feels a bit ad-hoc. As in
> "Oh we want some syntax for X … lets invent this keyword here. or some
> new operators or things like that."

Yeah they were late to the FP paradigm so they had to invent something
without breaking their OOP echo chamber I guess.  IIRC, there's talks
about adding patterns matching which Lisp has since the begining.  So
yeah very late to the game of FP.

> I like Guile syntax (or Scheme in general) much more. However, it is
> difficult to motivate others in a quick demo to learn the language,
> when you cannot take half an hour time to explain, what that for other
> people weird looking syntax is actually really cool.

I'm not sure if it's only the syntax.  Yes we often see "but the
parentheses burn my eyes" but I believe that things are more complex
than that.  What I think is difficult is to explain to someone why they
should try to learn new languages in the first place.  On top of my
head, people ask themself the following question before learning a new
language:

  - Profit -> Can I easily find a good paying job by developing in
this language?
  
  - Field -> Can I develop in my field (e.g. video game, mathematic)
with this language?  Is there a community?

  - Support -> Can I find solutions to my problems easily online?
Are there libraries for common problems that I could encounter?

  - Prototyping -> How easy is it for me to scratch an idea with
this language?

and probably other reasons.  Now, try to explain to someone that does
web developpement in Javascript or Python that Scheme is far more
supperior.  That person would just ask: Does Guile has support for
MongoDB?  And proceed to dismiss it.

Of course, some hackers like me just like to learn new stuffs.  It took
me about an one hour into Scheme course of the MIT on youtube to
understand that I just found the holy grail of programming language.
And yet, I have not find the answer to the `profit` question.

-- 
Olivier Dion
Polymtl



Re: Shell commands with output to string

2022-02-23 Thread Blake Shaw
Olivier Dion via General Guile related discussions 
writes:

> On Wed, 23 Feb 2022, Zelphir Kaltstahl 
> wrote:
>
>>> There's ton of missing stuffs in the standard library IMO.  On top
>>> of my
>>> head, filesystem paths manipulation (e.g. path-join) is also one
>>> that is
>>> probably getting re-invented a lots.
>>
Nice work Zelphir!
>> I actually made something for that, trying to copy mostly the Python
>> behavior for os.path.join:
>>
>> https://notabug.org/ZelphirKaltstahl/guile-fslib
>>
>> Also available as a GNU Guix package, but not updated in a while on
>> Guix.  Repository contains more up to date version.
>
> This is great and should be merged into the standard library of Guile.
> Maybe not at it's (I have not read everything), but this would be trully
> benifical to all Guile users.
>
I very much disagree. While it's a large implementation of Scheme, Guile
is still Scheme. This is all really simple stuff, and there are many
ways to implement these functions. Do the Guile maintainers really need
to be burdened by adding trivial functionality to the core library?

This is really simple stuff, but it was nevertheless difficult for me to
figure out how to do much of it in Guile. Many things that confused me
to death ended up being a big "oh, its just that??" Which seems to
indicate that the issue is less with the core library lacking
functionality and more with the presentation of Guile itself -- the
docs, which in December we heard a large number of complaints about.

> By keeping this as an external library such as a Guix package, I fear
> we're aiming at the 'nodejs syndrome' where everything -- down to
> the simplest hello world -- is a package dependency.
>
>>> I believe that the successful story of Python is not just about its
>>> pretty syntax, but also dues to its very large standard library.
>>
>> I think so too. Although I sometimes have the feeling, that Guile does
>> things in a cleaner way, once one figures out how to do them in the
>> first place. One thing I really like are the ports. Stuff like
>> call-with-output-string. Takes some twisting of the brain, but once
>> one gets it, it becomes very useful and elegant.
>
I agree, there is just a mental leap getting to there. I think with
examples based on the "expressive graduation" strategy I outlined in my
Guix Days presentation can lessen that load quite a bit, and get folks
moving with the goods they need to build their own tools quickly.
> Of course Scheme does things better than Python.  I wouldn't be hacking
> with it if it was not the case ^^.  Not only the syntax, but the
> programming paradigms.  You want FP, you got it.  You want OOP, sure.
> You prefer procedural, no problem.  With Python it's more like just OOP
> although there's been progress on the FP side.
>
>> But yes, Python is very beginner friendly in terms of batteries
>> included.  Although I think that its syntax feels a bit ad-hoc. As in
>> "Oh we want some syntax for X … lets invent this keyword here. or some
>> new operators or things like that."
>
> Yeah they were late to the FP paradigm so they had to invent something
> without breaking their OOP echo chamber I guess.  IIRC, there's talks
> about adding patterns matching which Lisp has since the begining.  So
> yeah very late to the game of FP.
>
>> I like Guile syntax (or Scheme in general) much more. However, it is
>> difficult to motivate others in a quick demo to learn the language,
>> when you cannot take half an hour time to explain, what that for other
>> people weird looking syntax is actually really cool.
>
> I'm not sure if it's only the syntax.  Yes we often see "but the
> parentheses burn my eyes" but I believe that things are more complex
> than that.  What I think is difficult is to explain to someone why they
> should try to learn new languages in the first place.  On top of my
> head, people ask themself the following question before learning a new
> language:
>
>   - Profit -> Can I easily find a good paying job by developing in
> this language?
So why are Haskell and Rust some of the most popular languages today
besides the "big names" (which I don't its reasonable to imagine a scheme
implementation suddenly breaking the mold and acceding to)
>
>   - Field -> Can I develop in my field (e.g. video game, mathematic)
> with this language?  Is there a community?
Yes and yes to those fields, with great tools! (Haunt, recent vector libs)
But the community, like many a scheme, is a bit hermetic, and this is
based in practices like mailing lists, which I don't think can/will
change. We could start a guile-hackers discourse server, or something
else more public-facing, but would any of the current users join?

So then we are the Day Zero guile crew, and thats gonna be rough to get
going.
>
>   - Support -> Can I find solutions to my problems easily online?
> Are there libraries for common problems that I could encounter?
This! While I think the Guile website is re

Re: Shell commands with output to string

2022-02-23 Thread Olivier Dion via General Guile related discussions
On Thu, 24 Feb 2022, Blake Shaw  wrote:
> Olivier Dion via General Guile related discussions 
> writes:
>> This is great and should be merged into the standard library of Guile.
>> Maybe not at it's (I have not read everything), but this would be trully
>> benifical to all Guile users.
>>
> I very much disagree. While it's a large implementation of Scheme,
> Guile is still Scheme. This is all really simple stuff, and there are
> many ways to implement these functions. Do the Guile maintainers
> really need to be burdened by adding trivial functionality to the core
> library?

It it's simple stuff, but as you mentioned, it's difficult to determine
how things are done in Guile as a beginer.  So maybe the problem is not
the lack of functionality, but lack of knowledge/understanding.

I for one am a big advocate of do your own stuff if you can.  That's
what I do for my projects.  But some people prefers to just glue stuffs
together instead and that's okay too.

>>   - Field -> Can I develop in my field (e.g. video game, mathematic)
>> with this language?  Is there a community?
> Yes and yes to those fields, with great tools! (Haunt, recent vector
> libs) But the community, like many a scheme, is a bit hermetic, and
> this is based in practices like mailing lists, which I don't think
> can/will change. We could start a guile-hackers discourse server, or
> something else more public-facing, but would any of the current users
> join?  So then we are the Day Zero guile crew, and thats gonna be
> rough to get going.

I think that would certainly reach out to more people.  In my experience
-- at least where I live -- people in their mid 20 like me don't use
mailing list or see them as a thing of the past of dead project.

> I agree with much of what you're saying, but I disagree with the idea
> of Guile becoming a "batteries included" Scheme loaded with
> conveniences.  Andy et al have far more important issues to worry
> about.

I don't think that Guile should have a batteries included standard
library like Python does.  Maybe just a few more friendly functions that
are commonly used.  And I certainly don't want to impose any burden on
anyone to implement them!

> On the other hand, I would be down to organize and contribute to an
> effort to create a battery pack, based on a study of the utilities
> offered by Python. We saw that Guix is picking up in production use
> and such a library would be very helpful (and I think Tropin's RDE
> might be trying to accomplish something like this)

I think this would be the best option.  Leaving it to the community.
This would remove the burden on the maintainers while making the library
bigger and bigger while also ensuring the prefer coding style of the
community.  However, we should probably also lookg at what is done on
the Racket side.  They have very nice things like type system and
contract programming!

> There is the existing Guile-lib, which seems to have intended something
> similar in the past. Let me briefly comment on its TOC:

Everytime I've looked into it  I feel
like it was a dead project by the look of the website.  Even though its
last update was in 2021.  The documentation is also lacking in my souvenir.
But something like this is a good start.

>>(os process)
>>Spawning processes and capturing their output
> where has this been my whole guile experience?!? too late, I made one
> myself (:

We all did I believe ^^

>>(scheme kwargs)
>>Defining functions with flexible keyword arguments
> how is that different from existing kwargs?

I think this was before curried definitions were introduced?

> As you can see, much of this is stuff that won't come in handy until
> you already feel compfortable with guile.
>
> In fact, some of it will just seem like weird alien technology until
> you've spent some time with scheme.
>
> So while I agree that an organized effort to roll-out a battery pack
> would be hugely beneficial, I think efforts to make the existing
> knowledge base of guile more accessible/easier to navigate/less messy
> would get folks moving with the large ecosystem faster,
> speaking/thinking in guile, and thus would be more rewarding than
> porting conventional idioms into a box that makes guile more familiar
> for python and JS developers.

Refactoring of the documentation I think we all agree on that after your
talk last week and its echo on the ML.  I also believe that things need
to be modernized a bit.  Like your discourse proposition for discussion,
but also things like the website of guile-lib.

-- 
Olivier Dion
Polymtl



Re: guile-oauth 1.1.0 released

2022-02-23 Thread Jérémy Korwin-Zmijowski

Yo Aleix !

I'm happy to announce guile-oauth 1.1.0. This is a minor release that just
adds a missing #:body keyword argument to OAuth1 and OAuth2 HTTP request
procedures and improves documentation.

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


Thank you for your work on that !

Cheers,

Jérémy



OpenPGP_0x700F5E0CCBB2E2D1.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: bytestructures 2.0.1

2022-02-23 Thread Jérémy Korwin-Zmijowski

Yo Taylan !

Thank you for your work !

Jérémy



OpenPGP_0x700F5E0CCBB2E2D1.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: GOOPS class printing

2022-02-23 Thread Jan Wedekind
You can define the write and display methods for a metaclass. Also see my 
article on inspection and metaclasses:

https://www.wedesoft.de/software/2014/03/02/oop-with-goops/

Kind regards
Jan

On 23 February 2022 21:43:50 GMT, Mike Gran  wrote:
>Hello all-
>
>If I define a GOOPS class like so...
>
>   (use-modules (oop goops))
>   (define-class  ())
>   
>   
>When it is printed, it has a long hex string in it
>
>$2 = #<  7fa3d9a5bc80>
>
>Is there a way to change how a class prints itself so that
>it does not have a hex string?  So that it is just
>
>   #< >
>
>or something similar?
>
>Thanks,
>Mike Gran
>
>

-- 
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.


Re: [EXT] GOOPS class printing

2022-02-23 Thread Thompson, David
Hi Mike,

On Wed, Feb 23, 2022 at 4:44 PM Mike Gran  wrote:
>
> Hello all-
>
> If I define a GOOPS class like so...
>
>(use-modules (oop goops))
>(define-class  ())
>
>
> When it is printed, it has a long hex string in it
>
> $2 = #<  7fa3d9a5bc80>
>
> Is there a way to change how a class prints itself so that
> it does not have a hex string?  So that it is just
>
>#< >
>
> or something similar?

GOOPS turns several procedures into methods, such as 'write'.  I think
I've defined special write methods in the past for this purpose.  Here
is a basic and silly example:

scheme@(guile-user)> (define-class  ())
scheme@(guile-user)> (make )
$33 = #< 55ddef3b0680>
scheme@(guile-user)> (define-method (write (foo ) port)
   (display "hello" port))
scheme@(guile-user)> (make )
$34 = hello

Hope that helps,

- Dave



Setup a remote pair-programming environment

2022-02-23 Thread Jérémy Korwin-Zmijowski

Dear Guixters,

I realised I have not shared my last blog post about Guix with you here.

It's about how I used Guix to set up a remote pair-programming 
environment (mostly to hack with Guile). I mean somewhere I could hack 
with another person.

For example:
- I introduced people to Guile and Test Driven Development.
- Simon introduced me to Guix contribution through bug fixing !

Our setup was pretty experimental but we were able to pull Guix sources, 
compile, edit in Emacs, etc.

We were using Jitsi to talk to each other.

That was fun, really fun (at least for me haha).
I enjoy this way to share knowledge, demonstrate, mentor, etc. More than 
reading or watching content from you all.


And I hope some of you will enjoy doing remote pair-programming as much 
as I did.


Here is the link of the blog post:
https://tiny.write.as/jeko/how-to-setup-a-remote-pair-programming-environment-with-gnu-guix
Here is the like of my repo with my setup:
https://framagit.org/Jeko/pair-programming-vm

Love you, take care !

Jérémy



OpenPGP_0x700F5E0CCBB2E2D1.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Setup a remote pair-programming environment

2022-02-23 Thread Jérémy Korwin-Zmijowski
I should have said « Hi Guilers » oops!

Jérémy



guile-redis 2.2.0 released

2022-02-23 Thread Aleix Conchillo Flaqué
Hi,

I'm happy to announce guile-redis 2.2.0. This release adds the new commands
found in the upcoming Redis 7.0.

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

* About

guile-redis is a Guile module for the Redis key-value data store. It provides
all commands up to Redis 7.0 and supports multiple commands, pipelining and
Pub/Sub.

* Download

Compressed sources and a GPG detached signature[*]:

https://download.savannah.nongnu.org/releases/guile-redis/guile-redis-2.2.0.tar.gz
https://download.savannah.nongnu.org/releases/guile-redis/guile-redis-2.2.0.tar.gz.sig

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

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

   gpg --verify guile-redis-2.2.0.tar.gz.sig

* Changes since 2.2.0

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

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

Happy hacking!

Aleix


Re: guile-redis 2.2.0 released

2022-02-23 Thread Nala Ginrut
Congrats! And thank you!

On Thu, Feb 24, 2022, 13:34 Aleix Conchillo Flaqué 
wrote:

> Hi,
>
> I'm happy to announce guile-redis 2.2.0. This release adds the new commands
> found in the upcoming Redis 7.0.
>
> https://github.com/aconchillo/guile-redis/
>
> * About
>
> guile-redis is a Guile module for the Redis key-value data store. It
> provides
> all commands up to Redis 7.0 and supports multiple commands, pipelining and
> Pub/Sub.
>
> * Download
>
> Compressed sources and a GPG detached signature[*]:
>
>
> https://download.savannah.nongnu.org/releases/guile-redis/guile-redis-2.2.0.tar.gz
>
> https://download.savannah.nongnu.org/releases/guile-redis/guile-redis-2.2.0.tar.gz.sig
>
> [*] To verify download both files and then run:
>
>gpg --keyserver keys.openpgp.org \
> --recv-keys 7CEC5511C8D057A9EF17470C54D4CC6FFC7468F4
>
>gpg --verify guile-redis-2.2.0.tar.gz.sig
>
> * Changes since 2.2.0
>
> https://github.com/aconchillo/guile-redis/blob/master/NEWS
>
> Bugs and comments can be reported at
> https://github.com/aconchillo/guile-redis/issues
>
> Happy hacking!
>
> Aleix
>