unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Happy birthday, Guile!
@ 2020-02-16 14:56 Ludovic Courtès
  2020-02-16 16:20 ` Linus Björnstam
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Ludovic Courtès @ 2020-02-16 14:56 UTC (permalink / raw)
  To: guile-user

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

Hello Guilers!

Today, it’s been 9 years since Guile 2.0 came out!

  https://lists.gnu.org/archive/html/guile-devel/2011-02/msg00173.html

It’s impressive how much has been accomplished since 2.0, and how what
seemed like a pipe dream back then came into reality with 3.0.  I think
Guile 2.0 started a renaissance of Guile, and it’s in bloom now.  :-)

We used to have a “Guile potluck” for the anniversary, where people
would bring their own hacks and virtually join for a party.  We missed
it this year, but if there’s a nice hack that you’d like to share, now
is a good time!

Happy hacking with Guile!

Ludo’.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile!
  2020-02-16 14:56 Happy birthday, Guile! Ludovic Courtès
@ 2020-02-16 16:20 ` Linus Björnstam
  2020-02-16 18:36 ` Arun Isaac
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 21+ messages in thread
From: Linus Björnstam @ 2020-02-16 16:20 UTC (permalink / raw)
  To: guile-user

Hooray! I have a bunch of small utils that I use to make repl life easier. One thing I did to scratch an itch is a clojuresque lambda shorthand (cut on steroids) for guile. It transverses whatever expressions you put into it and rewrites it into a lambda where all identifiers of the form %n where n is an integer gets transformed into a lambda argument.

https://hg.sr.ht/~bjoli/megacut/browse

 (megacut (let ((a "Hello ")) (string-append a %1)))
    => (lambda (%1) (let ((a "Hello")) (string-append a %1)))

Using read-hash-extend one can write #%:

#%(apply + (/ 10 %1) %&)
   => (lambda (%1 . %&) (apply + (/ 10 %1) %&))

It supports arbitrary many arguments, and also allows for "ignoring" arguments: 

#%(display %3)
    => (lambda (%1 %2 %3) (display %3))

A regular % is also a shorthand for %1:

 #%(+ % %) =>  (lambda (%1) (+ %1 %1))

I use it daily. 20 minutes of scripting that the last year or so probably saves me at least 25 seconds of typing :)

It has rudimentary unhygienic support for nesting, which may or may not be a terrible idea.

I have another useful little function, port->list which takes a port and a read function and returns a list of whatever the reader function returns until the port EOFs. less powerful than port-fold, but less fuss to use when you just want a list. I leave that as an exercise for the reader, though.

-- 
  Linus Björnstam

On Sun, 16 Feb 2020, at 15:56, Ludovic Courtès wrote:
> Hello Guilers!
> 
> Today, it’s been 9 years since Guile 2.0 came out!
> 
>   https://lists.gnu.org/archive/html/guile-devel/2011-02/msg00173.html
> 
> It’s impressive how much has been accomplished since 2.0, and how what
> seemed like a pipe dream back then came into reality with 3.0.  I think
> Guile 2.0 started a renaissance of Guile, and it’s in bloom now.  :-)
> 
> We used to have a “Guile potluck” for the anniversary, where people
> would bring their own hacks and virtually join for a party.  We missed
> it this year, but if there’s a nice hack that you’d like to share, now
> is a good time!
> 
> Happy hacking with Guile!
> 
> Ludo’.
> 
> Attachments:
> * signature.asc



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile!
  2020-02-16 14:56 Happy birthday, Guile! Ludovic Courtès
  2020-02-16 16:20 ` Linus Björnstam
@ 2020-02-16 18:36 ` Arun Isaac
  2020-02-16 21:08   ` sirgazil
  2020-02-16 19:14 ` Roel Janssen
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Arun Isaac @ 2020-02-16 18:36 UTC (permalink / raw)
  To: Ludovic Courtès, guile-user

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]


> Today, it’s been 9 years since Guile 2.0 came out!

Happy birthday, Guile! And, congratulations to the entire Guile
community!

> We used to have a “Guile potluck” for the anniversary, where people
> would bring their own hacks and virtually join for a party.  We missed
> it this year, but if there’s a nice hack that you’d like to share, now
> is a good time!

I just made some guile bindings for xapian[1], the search library. My
first use of the library will be to improve Guix package search. But,
I can think of many more interesting things to do with it!

https://git.systemreboot.net/guile-xapian/about

It's quite incomplete and probably a little premature to announce it
here, but since you asked! :-)

[1]: https://xapian.org/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile!
  2020-02-16 14:56 Happy birthday, Guile! Ludovic Courtès
  2020-02-16 16:20 ` Linus Björnstam
  2020-02-16 18:36 ` Arun Isaac
@ 2020-02-16 19:14 ` Roel Janssen
  2020-02-16 19:30   ` Ricardo Wurmus
  2020-02-16 21:13 ` Happy birthday, Guile! Mike Gran
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Roel Janssen @ 2020-02-16 19:14 UTC (permalink / raw)
  To: Ludovic Courtès, guile-user

On Sun, 2020-02-16 at 15:56 +0100, Ludovic Courtès wrote:
> Hello Guilers!
> 
> Today, it’s been 9 years since Guile 2.0 came out!
> 
>   https://lists.gnu.org/archive/html/guile-devel/2011-02/msg00173.html
> 
> It’s impressive how much has been accomplished since 2.0, and how what
> seemed like a pipe dream back then came into reality with 3.0.  I think
> Guile 2.0 started a renaissance of Guile, and it’s in bloom now.  :-)
> 
> We used to have a “Guile potluck” for the anniversary, where people
> would bring their own hacks and virtually join for a party.  We missed
> it this year, but if there’s a nice hack that you’d like to share, now
> is a good time!
> 

It's good to see that GNU Guile is going strong!

Since we're sharing hacks, here are a few from my project:

- An LDAP authenticator using the FFI and openldap:
https://github.com/UMCUGenetics/sparqling-genomics/blob/master/web/ldap/authenticate.scm.in

We use it on a site-local deployment.

- HTTP digest authentication:
https://github.com/UMCUGenetics/sparqling-genomics/blob/master/web/sparql/driver.scm#L82-L157

This has been tested against Virtuoso endpoints.

- Multi-format HTTP requests/responses for building RESTful interfaces:
https://github.com/UMCUGenetics/sparqling-genomics/blob/master/web/www/db/api.scm

It's not perfect, and probably needs some work to be generic enough to suite
other use-cases than the one I wrote it for.

Kind regards,
Roel Janssen





^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile!
  2020-02-16 19:14 ` Roel Janssen
@ 2020-02-16 19:30   ` Ricardo Wurmus
  2020-02-17  9:16     ` Ludovic Courtès
  0 siblings, 1 reply; 21+ messages in thread
From: Ricardo Wurmus @ 2020-02-16 19:30 UTC (permalink / raw)
  To: Roel Janssen; +Cc: Ludovic Courtès, guile-user


Hi Roel,

> - An LDAP authenticator using the FFI and openldap:
> https://github.com/UMCUGenetics/sparqling-genomics/blob/master/web/ldap/authenticate.scm.in
>
> We use it on a site-local deployment.
>
> - HTTP digest authentication:
> https://github.com/UMCUGenetics/sparqling-genomics/blob/master/web/sparql/driver.scm#L82-L157
>
> This has been tested against Virtuoso endpoints.
>
> - Multi-format HTTP requests/responses for building RESTful interfaces:
> https://github.com/UMCUGenetics/sparqling-genomics/blob/master/web/www/db/api.scm
>
> It's not perfect, and probably needs some work to be generic enough to suite
> other use-cases than the one I wrote it for.

What do you think about adding these things to
https://notabug.org/cwebber/guile-webutils/ ?  This was once intended to
be a collection of useful tools that come in handy when writing web
applications.

--
Ricardo



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile!
  2020-02-16 18:36 ` Arun Isaac
@ 2020-02-16 21:08   ` sirgazil
  0 siblings, 0 replies; 21+ messages in thread
From: sirgazil @ 2020-02-16 21:08 UTC (permalink / raw)
  To: Arun Isaac; +Cc: "Ludovic Courtès", guile-user

 ---- On Sun, 16 Feb 2020 13:36:16 -0500 Arun Isaac <arunisaac@systemreboot.net> wrote ----
 > 
 > > Today, it’s been 9 years since Guile 2.0 came out!
 > 
 > Happy birthday, Guile! And, congratulations to the entire Guile
 > community!
 > 
 > > We used to have a “Guile potluck” for the anniversary, where people
 > > would bring their own hacks and virtually join for a party.  We missed
 > > it this year, but if there’s a nice hack that you’d like to share, now
 > > is a good time!
 > 
 > I just made some guile bindings for xapian[1], the search library. My
 > first use of the library will be to improve Guix package search. But,
 > I can think of many more interesting things to do with it!
 > 
 > https://git.systemreboot.net/guile-xapian/about
 > 
 > It's quite incomplete and probably a little premature to announce it
 > here, but since you asked! :-)

But glad to know it exists :)



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile!
  2020-02-16 14:56 Happy birthday, Guile! Ludovic Courtès
                   ` (2 preceding siblings ...)
  2020-02-16 19:14 ` Roel Janssen
@ 2020-02-16 21:13 ` Mike Gran
  2020-02-16 21:34   ` sirgazil
  2020-02-16 21:54 ` Ricardo Wurmus
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Mike Gran @ 2020-02-16 21:13 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-user

On Sun, Feb 16, 2020 at 03:56:31PM +0100, Ludovic Court??s wrote:
> Hello Guilers!
> 
> Today, it???s been 9 years since Guile 2.0 came out!

> We used to have a ???Guile potluck??? for the anniversary, where people
> would bring their own hacks and virtually join for a party.  We missed
> it this year, but if there???s a nice hack that you???d like to share, now
> is a good time!

I'm still hacking a few things.  Unfortunately I don't have a nice,
small, standalone project I can point to that fits the old "guile
potluck".

I guess I can point back to guile-gi v0.2.2 from a couple of months
ago.  It can be used to make GTK3 and Webkit bindings.  But, I didn't
do much of the work on that point release.  I do hope contribute more
as we prepare for v0.3.0 which will be, I believe, ready for use by
the general public.

The two Guile-related projects I am also hacking on as time permits
are Gano and yvdebug, but neither are useful at the moment.

Gano is a console text editor.  I started hacking on that 15 years ago
and abandoned it, but, I seem to have picked it up again.

And yvdebug hopes to be a Guile program that is a GTK terminal widget
that runs a Guile shell with some debugging features.

-Mike Gran



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile!
  2020-02-16 21:13 ` Happy birthday, Guile! Mike Gran
@ 2020-02-16 21:34   ` sirgazil
  0 siblings, 0 replies; 21+ messages in thread
From: sirgazil @ 2020-02-16 21:34 UTC (permalink / raw)
  To: Mike Gran; +Cc: "Ludovic Courtès", guile-user

 ---- On Sun, 16 Feb 2020 16:13:41 -0500 Mike Gran <spk121@yahoo.com> wrote ----
 > On Sun, Feb 16, 2020 at 03:56:31PM +0100, Ludovic Court??s wrote:
 > > Hello Guilers!
 > > 
 > > Today, it???s been 9 years since Guile 2.0 came out!
 > 
 > > We used to have a ???Guile potluck??? for the anniversary, where people
 > > would bring their own hacks and virtually join for a party.  We missed
 > > it this year, but if there???s a nice hack that you???d like to share, now
 > > is a good time!
 > 
 > I'm still hacking a few things.  Unfortunately I don't have a nice,
 > small, standalone project I can point to that fits the old "guile
 > potluck".
 > 
 > I guess I can point back to guile-gi v0.2.2 from a couple of months
 > ago.  It can be used to make GTK3 and Webkit bindings.  But, I didn't
 > do much of the work on that point release.  I do hope contribute more
 > as we prepare for v0.3.0 which will be, I believe, ready for use by
 > the general public.

I'm rooting for this one.


 > The two Guile-related projects I am also hacking on as time permits
 > are Gano and yvdebug, but neither are useful at the moment.
 > 
 > Gano is a console text editor.  I started hacking on that 15 years ago
 > and abandoned it, but, I seem to have picked it up again.
 > 
 > And yvdebug hopes to be a Guile program that is a GTK terminal widget
 > that runs a Guile shell with some debugging features.

And this one sounds interesting.




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile!
  2020-02-16 14:56 Happy birthday, Guile! Ludovic Courtès
                   ` (3 preceding siblings ...)
  2020-02-16 21:13 ` Happy birthday, Guile! Mike Gran
@ 2020-02-16 21:54 ` Ricardo Wurmus
  2020-02-16 22:14 ` Jeremy Korwin-Zmijowski
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 21+ messages in thread
From: Ricardo Wurmus @ 2020-02-16 21:54 UTC (permalink / raw)
  To: guile-user


Ludovic Courtès <ludo@gnu.org> writes:

> Today, it’s been 9 years since Guile 2.0 came out!
>
>   https://lists.gnu.org/archive/html/guile-devel/2011-02/msg00173.html

Woo!  Happy birthday, Guile!

> It’s impressive how much has been accomplished since 2.0, and how what
> seemed like a pipe dream back then came into reality with 3.0.  I think
> Guile 2.0 started a renaissance of Guile, and it’s in bloom now.  :-)
>
> We used to have a “Guile potluck” for the anniversary, where people
> would bring their own hacks and virtually join for a party.  We missed
> it this year, but if there’s a nice hack that you’d like to share, now
> is a good time!

A while back I wrote a proof-of-concept AWS library for Guile that feeds
the AWS service descriptions in JSON format into a small compiler from
AWS-JSON to Guile, resulting in a big generated DSL for managing EC2
instances (~ Amazon virtual machines) and S3 storage.

The code can be found here:

    https://git.elephly.net/software/guile-aws.git

It took cues from Dave’s Cloudformation library:

    https://git.dthompson.us/guile-cloudformation.git

and was heavily inspired by Mark Witmer’s Guile XCB:

    https://github.com/mwitmer/guile-xcb

--
Ricardo



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile!
  2020-02-16 14:56 Happy birthday, Guile! Ludovic Courtès
                   ` (4 preceding siblings ...)
  2020-02-16 21:54 ` Ricardo Wurmus
@ 2020-02-16 22:14 ` Jeremy Korwin-Zmijowski
  2020-02-16 23:51 ` potluck; " Arne Babenhauserheide
  2020-02-17  0:10 ` Happy birthday, Guile! - grid printing Zelphir Kaltstahl
  7 siblings, 0 replies; 21+ messages in thread
From: Jeremy Korwin-Zmijowski @ 2020-02-16 22:14 UTC (permalink / raw)
  To: Ludovic Courtès, guile-user

Le dimanche 16 février 2020 à 15:56 +0100, Ludovic Courtès a écrit :
> Hello Guilers!
> 
> Today, it’s been 9 years since Guile 2.0 came out!
> 
>   
> https://lists.gnu.org/archive/html/guile-devel/2011-02/msg00173.html
> 
> It’s impressive how much has been accomplished since 2.0, and how
> what
> seemed like a pipe dream back then came into reality with 3.0.  I
> think
> Guile 2.0 started a renaissance of Guile, and it’s in bloom now.  :-)
> 
> We used to have a “Guile potluck” for the anniversary, where people
> would bring their own hacks and virtually join for a party.  We
> missed
> it this year, but if there’s a nice hack that you’d like to share,
> now
> is a good time!
> 
> Happy hacking with Guile!
> 
> Ludo’.

Hello Guilers and happy birthday to Guile !

I am so grateful to be part of this community. I realize I am a baby
hacker here.

I was and still am very inspired by the work, passion and kindness you
all put into Guile and relative projects. Please keep going !

I started to hack in Guile with guile-cybo (work in progress) :
https://framagit.org/Jeko/guile-cybo

Then I start to bridge some fields in which I am interested in (health,
nutrition and environment) with a new web-oriented project:
https://framagit.org/Jeko/guile-ynm (empty haha but on its way)
https://framagit.org/Jeko/guile-ciqual (to convert xml food composition
table into sxml and play with it)

Cheers, hackers !

Jérémy




^ permalink raw reply	[flat|nested] 21+ messages in thread

* potluck; Re: Happy birthday, Guile!
  2020-02-16 14:56 Happy birthday, Guile! Ludovic Courtès
                   ` (5 preceding siblings ...)
  2020-02-16 22:14 ` Jeremy Korwin-Zmijowski
@ 2020-02-16 23:51 ` Arne Babenhauserheide
  2020-02-17  0:10 ` Happy birthday, Guile! - grid printing Zelphir Kaltstahl
  7 siblings, 0 replies; 21+ messages in thread
From: Arne Babenhauserheide @ 2020-02-16 23:51 UTC (permalink / raw)
  To: guile-user

Happy Birthday Guile!

Here’s a small contribution to the potluck:

define : first-encounter
    Enter : Juli Fin
            Melter Lark
            Rooted Breeze

    game-state-set!
        . game-state-initial

    Juli Fin
        Finally we have our own home!

    Melter Lark
        I will dry it out.

    Rooted Breeze :eerie
        My slumber breaks
        my mind awakes
        who are you strangers
        in my home?

    Choose
        : explain
          ,(explain-your-home)
        : fast-talk
          ,(fast-talk-the-dryad)



Enter three witches is progressing from a text-based dialog system to a
game engine which also considers reuse of scenes and game-state.

This is a shortened version I wrote in replay to an email where someone
said that py2guile is a great article about Python :-)
See the full version at https://hg.sr.ht/~arnebab/dryads-wake/

Best wishes,
Arne


Ludovic Courtès <ludo@gnu.org> writes:

> Hello Guilers!
>
> Today, it’s been 9 years since Guile 2.0 came out!
>
>   https://lists.gnu.org/archive/html/guile-devel/2011-02/msg00173.html
>
> It’s impressive how much has been accomplished since 2.0, and how what
> seemed like a pipe dream back then came into reality with 3.0.  I think
> Guile 2.0 started a renaissance of Guile, and it’s in bloom now.  :-)
>
> We used to have a “Guile potluck” for the anniversary, where people
> would bring their own hacks and virtually join for a party.  We missed
> it this year, but if there’s a nice hack that you’d like to share, now
> is a good time!
>
> Happy hacking with Guile!
>
> Ludo’.


--
Unpolitisch sein
heißt politisch sein
ohne es zu merken



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile! - grid printing
  2020-02-16 14:56 Happy birthday, Guile! Ludovic Courtès
                   ` (6 preceding siblings ...)
  2020-02-16 23:51 ` potluck; " Arne Babenhauserheide
@ 2020-02-17  0:10 ` Zelphir Kaltstahl
  2020-02-17  8:01   ` Linus Björnstam
  7 siblings, 1 reply; 21+ messages in thread
From: Zelphir Kaltstahl @ 2020-02-17  0:10 UTC (permalink / raw)
  To: guile-user

Hi Guile Users!

Guile is my go to programming language for my free time projects : )
While it's sometimes not as easy to find answers for problems as in some
other programming languages, usually it is worth the research, as I come
out more knowledgeable on the other side. The documentation is usually
great and people are creating great projects and software in Guile.
Happy to be part of the community!

Some time ago and this weekend I have been working on a thing that
prints grids:

https://notabug.org/ZelphirKaltstahl/guile-grid-printer/src/0.1.0

Basically prints lists as grids in on command line or to string and
allows for configuration of the printed grid, such as padding or which
characters shall be used for representing borders or intersections in
the grid. Personally I think this could be useful for example for
printing a chess board or similar things in pure text form. In the test
cases, there is also an example of printing a grid containing a grid.

It's only one of many projects I try to work on, but since it is not as
complex as the others, it at least is already usable, while most of my
other projects are in the unfinished non-usable state.

Thanks everyone for participating in the Guile community and for sharing
knowledge or providing learning resources!

Zelphir

On 16.02.20 15:56, Ludovic Courtès wrote:
> Hello Guilers!
>
> Today, it’s been 9 years since Guile 2.0 came out!
>
>   https://lists.gnu.org/archive/html/guile-devel/2011-02/msg00173.html
>
> It’s impressive how much has been accomplished since 2.0, and how what
> seemed like a pipe dream back then came into reality with 3.0.  I think
> Guile 2.0 started a renaissance of Guile, and it’s in bloom now.  :-)
>
> We used to have a “Guile potluck” for the anniversary, where people
> would bring their own hacks and virtually join for a party.  We missed
> it this year, but if there’s a nice hack that you’d like to share, now
> is a good time!
>
> Happy hacking with Guile!
>
> Ludo’.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile! - grid printing
  2020-02-17  0:10 ` Happy birthday, Guile! - grid printing Zelphir Kaltstahl
@ 2020-02-17  8:01   ` Linus Björnstam
  2020-02-17 14:58     ` Zelphir Kaltstahl
  0 siblings, 1 reply; 21+ messages in thread
From: Linus Björnstam @ 2020-02-17  8:01 UTC (permalink / raw)
  To: Zelphir Kaltstahl, guile-user

Hi Zelphir!

You should check out SRFI 166 or 159. It has columnar printing built in. I ported it to guile and one implementation is available in guix (under a non-standard module name iirc).

https://srfi.schemers.org/srfi-166/srfi-166.html#Columnar-Formatting

-- 
  Linus Björnstam

On Mon, 17 Feb 2020, at 01:10, Zelphir Kaltstahl wrote:
> Hi Guile Users!
> 
> Guile is my go to programming language for my free time projects : )
> While it's sometimes not as easy to find answers for problems as in some
> other programming languages, usually it is worth the research, as I come
> out more knowledgeable on the other side. The documentation is usually
> great and people are creating great projects and software in Guile.
> Happy to be part of the community!
> 
> Some time ago and this weekend I have been working on a thing that
> prints grids:
> 
> https://notabug.org/ZelphirKaltstahl/guile-grid-printer/src/0.1.0
> 
> Basically prints lists as grids in on command line or to string and
> allows for configuration of the printed grid, such as padding or which
> characters shall be used for representing borders or intersections in
> the grid. Personally I think this could be useful for example for
> printing a chess board or similar things in pure text form. In the test
> cases, there is also an example of printing a grid containing a grid.
> 
> It's only one of many projects I try to work on, but since it is not as
> complex as the others, it at least is already usable, while most of my
> other projects are in the unfinished non-usable state.
> 
> Thanks everyone for participating in the Guile community and for sharing
> knowledge or providing learning resources!
> 
> Zelphir
> 
> On 16.02.20 15:56, Ludovic Courtès wrote:
> > Hello Guilers!
> >
> > Today, it’s been 9 years since Guile 2.0 came out!
> >
> >   https://lists.gnu.org/archive/html/guile-devel/2011-02/msg00173.html
> >
> > It’s impressive how much has been accomplished since 2.0, and how what
> > seemed like a pipe dream back then came into reality with 3.0.  I think
> > Guile 2.0 started a renaissance of Guile, and it’s in bloom now.  :-)
> >
> > We used to have a “Guile potluck” for the anniversary, where people
> > would bring their own hacks and virtually join for a party.  We missed
> > it this year, but if there’s a nice hack that you’d like to share, now
> > is a good time!
> >
> > Happy hacking with Guile!
> >
> > Ludo’.
> 
>



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile!
  2020-02-16 19:30   ` Ricardo Wurmus
@ 2020-02-17  9:16     ` Ludovic Courtès
  2020-02-18 13:38       ` Christopher Lam
  0 siblings, 1 reply; 21+ messages in thread
From: Ludovic Courtès @ 2020-02-17  9:16 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guile-user

Hi!

Ricardo Wurmus <rekado@elephly.net> skribis:

> What do you think about adding these things to
> https://notabug.org/cwebber/guile-webutils/ ?  This was once intended to
> be a collection of useful tools that come in handy when writing web
> applications.

I didn’t know about guile-webutils but consolidating Web tools in this
package sounds like a great idea!

Ludo’.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile! - grid printing
  2020-02-17  8:01   ` Linus Björnstam
@ 2020-02-17 14:58     ` Zelphir Kaltstahl
  2020-02-17 16:21       ` Linus Björnstam
  0 siblings, 1 reply; 21+ messages in thread
From: Zelphir Kaltstahl @ 2020-02-17 14:58 UTC (permalink / raw)
  To: Linus Björnstam; +Cc: guile-user

Hey Linus!

Huh, interesting! This does more than my little tool. I don't understand
all of it right now, but perhaps it can be used to make grids too.

Thanks for the hint. I did not know of its existence!

On 2/17/20 9:01 AM, Linus Björnstam wrote:
> Hi Zelphir!
>
> You should check out SRFI 166 or 159. It has columnar printing built in. I ported it to guile and one implementation is available in guix (under a non-standard module name iirc).
>
> https://srfi.schemers.org/srfi-166/srfi-166.html#Columnar-Formatting
>



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile! - grid printing
  2020-02-17 14:58     ` Zelphir Kaltstahl
@ 2020-02-17 16:21       ` Linus Björnstam
  0 siblings, 0 replies; 21+ messages in thread
From: Linus Björnstam @ 2020-02-17 16:21 UTC (permalink / raw)
  To: Zelphir Kaltstahl; +Cc: guile-user

SRFI 166/159 is like a Swiss army knife of formatting. (ice-9 format) on steroids if you will, running through molasses (it is about 3x slower than format).

It does columnar formatting, which with a bit of coercion could be made to cover your library (from what I gather from the tests). It will probably be slower though, since it uses call/cc to be able to handle streaming data. And it is user extensible which format strings never (?) are 

It is probably my all time favourite SRFI, up there with irregex. Both by the same author, no less :)

-- 
  Linus Björnstam

On Mon, 17 Feb 2020, at 15:58, Zelphir Kaltstahl wrote:
> Hey Linus!
> 
> Huh, interesting! This does more than my little tool. I don't understand
> all of it right now, but perhaps it can be used to make grids too.
> 
> Thanks for the hint. I did not know of its existence!
> 
> On 2/17/20 9:01 AM, Linus Björnstam wrote:
> > Hi Zelphir!
> >
> > You should check out SRFI 166 or 159. It has columnar printing built in. I ported it to guile and one implementation is available in guix (under a non-standard module name iirc).
> >
> > https://srfi.schemers.org/srfi-166/srfi-166.html#Columnar-Formatting
> >
>



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Happy birthday, Guile!
  2020-02-17  9:16     ` Ludovic Courtès
@ 2020-02-18 13:38       ` Christopher Lam
  2020-02-18 13:44         ` Lenses in Guile? Zelphir Kaltstahl
  0 siblings, 1 reply; 21+ messages in thread
From: Christopher Lam @ 2020-02-18 13:38 UTC (permalink / raw)
  Cc: guile-user

A bit late, and perhaps not as sophisticated as some bigger modules here.

Two functions defined as follows: nested-alist-set! nested-alist-get at
https://github.com/Gnucash/gnucash/blob/1f83cfaf64d1cd3c8862b427dd043154f780a772/gnucash/report/html-chart.scm#L37

Consider a nested alist describing unix file system
(define lst
 (list
  (cons 'usr (list
              (cons 'bin "binary files")
              (cons 'games "g4m3s")
              (cons 'include (list
                              (cons 'guile (list
                                            (cons '2.2 "old")))
                              (cons 'linux "da best")))))))

We can access a leaf node via (nested-alist-get lst '(usr include linux))
--> "da best", and set a leaf node via (nested-alist-set! lst '(usr include
python) "boo"). This is probably easy to seasoned schemers, but still a
nice pair of functions to use in modifying nested alists before conversion
into json.

On Mon, 17 Feb 2020 at 09:16, Ludovic Courtès <ludo@gnu.org> wrote:

> Hi!
>
> Ricardo Wurmus <rekado@elephly.net> skribis:
>
> > What do you think about adding these things to
> > https://notabug.org/cwebber/guile-webutils/ ?  This was once intended to
> > be a collection of useful tools that come in handy when writing web
> > applications.
>
> I didn’t know about guile-webutils but consolidating Web tools in this
> package sounds like a great idea!
>
> Ludo’.
>
>


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Lenses in Guile?
  2020-02-18 13:38       ` Christopher Lam
@ 2020-02-18 13:44         ` Zelphir Kaltstahl
  2020-02-18 14:04           ` Alex Sassmannshausen
  0 siblings, 1 reply; 21+ messages in thread
From: Zelphir Kaltstahl @ 2020-02-18 13:44 UTC (permalink / raw)
  To: guile-user

Hi!

This reminds me of something: Is there something like
https://docs.racket-lang.org/lens/index.html for Guile? Or perhaps an
easy to understand tutorial on implementing it?

Regards,
Zelphir

On 2/18/20 2:38 PM, Christopher Lam wrote:
> A bit late, and perhaps not as sophisticated as some bigger modules here.
>
> Two functions defined as follows: nested-alist-set! nested-alist-get at
> https://github.com/Gnucash/gnucash/blob/1f83cfaf64d1cd3c8862b427dd043154f780a772/gnucash/report/html-chart.scm#L37
>
> Consider a nested alist describing unix file system
> (define lst
>  (list
>   (cons 'usr (list
>               (cons 'bin "binary files")
>               (cons 'games "g4m3s")
>               (cons 'include (list
>                               (cons 'guile (list
>                                             (cons '2.2 "old")))
>                               (cons 'linux "da best")))))))
>
> We can access a leaf node via (nested-alist-get lst '(usr include linux))
> --> "da best", and set a leaf node via (nested-alist-set! lst '(usr include
> python) "boo"). This is probably easy to seasoned schemers, but still a
> nice pair of functions to use in modifying nested alists before conversion
> into json.
>
> On Mon, 17 Feb 2020 at 09:16, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> Hi!
>>
>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>
>>> What do you think about adding these things to
>>> https://notabug.org/cwebber/guile-webutils/ ?  This was once intended to
>>> be a collection of useful tools that come in handy when writing web
>>> applications.
>> I didn’t know about guile-webutils but consolidating Web tools in this
>> package sounds like a great idea!
>>
>> Ludo’.
>>
>>



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Lenses in Guile?
  2020-02-18 13:44         ` Lenses in Guile? Zelphir Kaltstahl
@ 2020-02-18 14:04           ` Alex Sassmannshausen
  2020-02-19 14:27             ` Zelphir Kaltstahl
  2020-02-23 17:00             ` Ludovic Courtès
  0 siblings, 2 replies; 21+ messages in thread
From: Alex Sassmannshausen @ 2020-02-18 14:04 UTC (permalink / raw)
  To: guile-user

Heya,

Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> writes:

> Hi!
>
> This reminds me of something: Is there something like
> https://docs.racket-lang.org/lens/index.html for Guile? Or perhaps an
> easy to understand tutorial on implementing it?

Check out https://gitlab.com/a-sassmannshausen/guile-lens

It's an implementation I did for fun a while ago.  Can't remember how
faithfully it implements lenses as compared with racket's…

Best wishes,

Alex

>
> Regards,
> Zelphir
>
> On 2/18/20 2:38 PM, Christopher Lam wrote:
>> A bit late, and perhaps not as sophisticated as some bigger modules here.
>>
>> Two functions defined as follows: nested-alist-set! nested-alist-get at
>> https://github.com/Gnucash/gnucash/blob/1f83cfaf64d1cd3c8862b427dd043154f780a772/gnucash/report/html-chart.scm#L37
>>
>> Consider a nested alist describing unix file system
>> (define lst
>>  (list
>>   (cons 'usr (list
>>               (cons 'bin "binary files")
>>               (cons 'games "g4m3s")
>>               (cons 'include (list
>>                               (cons 'guile (list
>>                                             (cons '2.2 "old")))
>>                               (cons 'linux "da best")))))))
>>
>> We can access a leaf node via (nested-alist-get lst '(usr include linux))
>> --> "da best", and set a leaf node via (nested-alist-set! lst '(usr include
>> python) "boo"). This is probably easy to seasoned schemers, but still a
>> nice pair of functions to use in modifying nested alists before conversion
>> into json.
>>
>> On Mon, 17 Feb 2020 at 09:16, Ludovic Courtès <ludo@gnu.org> wrote:
>>
>>> Hi!
>>>
>>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>>
>>>> What do you think about adding these things to
>>>> https://notabug.org/cwebber/guile-webutils/ ?  This was once intended to
>>>> be a collection of useful tools that come in handy when writing web
>>>> applications.
>>> I didn’t know about guile-webutils but consolidating Web tools in this
>>> package sounds like a great idea!
>>>
>>> Ludo’.
>>>
>>>




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Lenses in Guile?
  2020-02-18 14:04           ` Alex Sassmannshausen
@ 2020-02-19 14:27             ` Zelphir Kaltstahl
  2020-02-23 17:00             ` Ludovic Courtès
  1 sibling, 0 replies; 21+ messages in thread
From: Zelphir Kaltstahl @ 2020-02-19 14:27 UTC (permalink / raw)
  To: alex.sassmannshausen, guile-user

Hi Alex!

Thanks for that!

On 18.02.20 15:04, Alex Sassmannshausen wrote:
> Heya,
>
> Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> writes:
>
>> Hi!
>>
>> This reminds me of something: Is there something like
>> https://docs.racket-lang.org/lens/index.html for Guile? Or perhaps an
>> easy to understand tutorial on implementing it?
> Check out https://gitlab.com/a-sassmannshausen/guile-lens
>
> It's an implementation I did for fun a while ago.  Can't remember how
> faithfully it implements lenses as compared with racket's…
>
> Best wishes,
>
> Alex
>
>> Regards,
>> Zelphir
>>
>> On 2/18/20 2:38 PM, Christopher Lam wrote:
>>> A bit late, and perhaps not as sophisticated as some bigger modules here.
>>>
>>> Two functions defined as follows: nested-alist-set! nested-alist-get at
>>> https://github.com/Gnucash/gnucash/blob/1f83cfaf64d1cd3c8862b427dd043154f780a772/gnucash/report/html-chart.scm#L37
>>>
>>> Consider a nested alist describing unix file system
>>> (define lst
>>>  (list
>>>   (cons 'usr (list
>>>               (cons 'bin "binary files")
>>>               (cons 'games "g4m3s")
>>>               (cons 'include (list
>>>                               (cons 'guile (list
>>>                                             (cons '2.2 "old")))
>>>                               (cons 'linux "da best")))))))
>>>
>>> We can access a leaf node via (nested-alist-get lst '(usr include linux))
>>> --> "da best", and set a leaf node via (nested-alist-set! lst '(usr include
>>> python) "boo"). This is probably easy to seasoned schemers, but still a
>>> nice pair of functions to use in modifying nested alists before conversion
>>> into json.
>>>
>>> On Mon, 17 Feb 2020 at 09:16, Ludovic Courtès <ludo@gnu.org> wrote:
>>>
>>>> Hi!
>>>>
>>>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>>>
>>>>> What do you think about adding these things to
>>>>> https://notabug.org/cwebber/guile-webutils/ ?  This was once intended to
>>>>> be a collection of useful tools that come in handy when writing web
>>>>> applications.
>>>> I didn’t know about guile-webutils but consolidating Web tools in this
>>>> package sounds like a great idea!
>>>>
>>>> Ludo’.
>>>>
>>>>
>



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Lenses in Guile?
  2020-02-18 14:04           ` Alex Sassmannshausen
  2020-02-19 14:27             ` Zelphir Kaltstahl
@ 2020-02-23 17:00             ` Ludovic Courtès
  1 sibling, 0 replies; 21+ messages in thread
From: Ludovic Courtès @ 2020-02-23 17:00 UTC (permalink / raw)
  To: alex.sassmannshausen; +Cc: Guile User

Hello!

Alex Sassmannshausen <alex.sassmannshausen@gmail.com> skribis:

> Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> writes:
>
>> Hi!
>>
>> This reminds me of something: Is there something like
>> https://docs.racket-lang.org/lens/index.html for Guile? Or perhaps an
>> easy to understand tutorial on implementing it?
>
> Check out https://gitlab.com/a-sassmannshausen/guile-lens

Neat!  It’d be nice to make it so that Guile can inline
focus/put/etc. when possible.

Ludo’, who’s seen lots of really cool hacks in this thread!



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-02-23 17:00 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-16 14:56 Happy birthday, Guile! Ludovic Courtès
2020-02-16 16:20 ` Linus Björnstam
2020-02-16 18:36 ` Arun Isaac
2020-02-16 21:08   ` sirgazil
2020-02-16 19:14 ` Roel Janssen
2020-02-16 19:30   ` Ricardo Wurmus
2020-02-17  9:16     ` Ludovic Courtès
2020-02-18 13:38       ` Christopher Lam
2020-02-18 13:44         ` Lenses in Guile? Zelphir Kaltstahl
2020-02-18 14:04           ` Alex Sassmannshausen
2020-02-19 14:27             ` Zelphir Kaltstahl
2020-02-23 17:00             ` Ludovic Courtès
2020-02-16 21:13 ` Happy birthday, Guile! Mike Gran
2020-02-16 21:34   ` sirgazil
2020-02-16 21:54 ` Ricardo Wurmus
2020-02-16 22:14 ` Jeremy Korwin-Zmijowski
2020-02-16 23:51 ` potluck; " Arne Babenhauserheide
2020-02-17  0:10 ` Happy birthday, Guile! - grid printing Zelphir Kaltstahl
2020-02-17  8:01   ` Linus Björnstam
2020-02-17 14:58     ` Zelphir Kaltstahl
2020-02-17 16:21       ` Linus Björnstam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).