Re: Examples in Guile documentation

2022-02-12 Thread Zelphir Kaltstahl
On 2/12/22 18:32, Eli Zaretskii wrote: From: Ricardo Wurmus Date: Sat, 12 Feb 2022 14:49:20 +0100 Cc: guile-user@gnu.org The argument of lack of examples in the Guile/Guix documentation has been made several times now, or at least, I've seen it being made several times The Guix documentation

Re: timestamp

2022-02-12 Thread Eli Zaretskii
> From: Ricardo Wurmus > Date: Sat, 12 Feb 2022 14:49:20 +0100 > Cc: guile-user@gnu.org > > > The argument of lack of examples in the Guile/Guix documentation has > > been made several times now, or at least, I've seen it being made > > several times > > The Guix documentation contains examples,

Re: Guile cookbook ?

2022-02-12 Thread Zelphir Kaltstahl
On 2/12/22 15:01, adriano wrote: Il giorno sab, 12/02/2022 alle 14.55 +0100, adriano ha scritto: Hint taken :-) Actually, I was thinking about a Guile cookbook, rather than the Guix cookbook Can the Guix cookbook also contain examples of how o do things in Guile ? Even things that are no rela

Re: Guile cookbook ?

2022-02-12 Thread Olivier Dion via General Guile related discussions
On Sat, 12 Feb 2022, adriano wrote: > Il giorno sab, 12/02/2022 alle 14.55 +0100, adriano ha scritto: >> > >> Hint taken :-) > > Actually, I was thinking about a Guile cookbook, rather than the Guix > cookbook > > Can the Guix cookbook also contain examples of how o do things in Guile > ? > > Eve

Re: timestamp

2022-02-12 Thread adriano
Il giorno sab, 12/02/2022 alle 14.50 +0200, Eli Zaretskii ha scritto: > > Date: Sat, 12 Feb 2022 10:01:25 +0100 > > From: > > > >   (strftime "%Y-%m-%d %H:%m:%s" (localtime 1607841890)) > >   => "2020-12-13 07:12:1607845490" > > I guess you meant %H:%M:%S, not %H:%m:%s... > this could end up i

Re: Guile cookbook ?

2022-02-12 Thread adriano
Il giorno sab, 12/02/2022 alle 15.15 +0100, Ricardo Wurmus ha scritto: > > adriano writes: > > > Il giorno sab, 12/02/2022 alle 14.55 +0100, adriano ha scritto: > > > > > > > > Hint taken :-) > > > > Actually, I was thinking about a Guile cookbook, rather than the > > Guix > > cookbook > > >

Re: Guile cookbook ?

2022-02-12 Thread Ricardo Wurmus
adriano writes: > Il giorno sab, 12/02/2022 alle 14.55 +0100, adriano ha scritto: >> > >> Hint taken :-) > > Actually, I was thinking about a Guile cookbook, rather than the Guix > cookbook > > Can the Guix cookbook also contain examples of how o do things in Guile > ? > > Even things that are

Guile cookbook ?

2022-02-12 Thread adriano
Il giorno sab, 12/02/2022 alle 14.55 +0100, adriano ha scritto: > > Hint taken :-) Actually, I was thinking about a Guile cookbook, rather than the Guix cookbook Can the Guix cookbook also contain examples of how o do things in Guile ? Even things that are no related to Guix ?

Re: timestamp

2022-02-12 Thread adriano
Il giorno sab, 12/02/2022 alle 14.49 +0100, Ricardo Wurmus ha scritto: > > adriano writes: > > > The argument of lack of examples in the Guile/Guix documentation > > has > > been made several times now, or at least, I've seen it being made > > several times > > The Guix documentation contains e

GNU Guile 3.0.8 released

2022-02-12 Thread Andy Wingo
[A resend, as original mail accidentally had two From headers; apologies for any duplicates!] We are delighted to announce GNU Guile release 3.0.8, the latest in the 3.0 stable release series. The Guile 3.0.8 release mixes maintenance and optimizations that were landed since the previous 3.0.7 st

Re: timestamp

2022-02-12 Thread Ricardo Wurmus
adriano writes: > The argument of lack of examples in the Guile/Guix documentation has > been made several times now, or at least, I've seen it being made > several times The Guix documentation contains examples, but it’s already very long and intimidating, so we started the Cookbook for more

Re: timestamp

2022-02-12 Thread adriano
I brought up these arguments up today because the recent discussions about Guile/Guix documentation encouraged me Those make me feel that not all is lost :-)

Re: timestamp

2022-02-12 Thread adriano
Hi Ricardo, thank you for chiming in :-) Il giorno sab, 12/02/2022 alle 12.49 +0100, Ricardo Wurmus ha scritto: > > Hi adriano, > > I’ve got no good answers as to “why” things are the way they are, but > the manual explains the range of these values: You're right, the manual does explain the r

Re: timestamp

2022-02-12 Thread tomas
On Sat, Feb 12, 2022 at 02:50:34PM +0200, Eli Zaretskii wrote: > > Date: Sat, 12 Feb 2022 10:01:25 +0100 > > From: > > > > (strftime "%Y-%m-%d %H:%m:%s" (localtime 1607841890)) > > => "2020-12-13 07:12:1607845490" > > I guess you meant %H:%M:%S, not %H:%m:%s... Good catch, Eli. Bad tomas:

Re: timestamp

2022-02-12 Thread Eli Zaretskii
> Date: Sat, 12 Feb 2022 10:01:25 +0100 > From: > > (strftime "%Y-%m-%d %H:%m:%s" (localtime 1607841890)) > => "2020-12-13 07:12:1607845490" I guess you meant %H:%M:%S, not %H:%m:%s...

Re: timestamp

2022-02-12 Thread Eli Zaretskii
> From: Ricardo Wurmus > Date: Sat, 12 Feb 2022 12:49:10 +0100 > Cc: guile-user@gnu.org > > > Hi adriano, > > I’ve got no good answers as to “why” things are the way they are, but > the manual explains the range of these values: > > > It seesm to be > > > > (tm:mon %3) > > > > This returns > >

Re: timestamp

2022-02-12 Thread tomas
On Sat, Feb 12, 2022 at 12:49:10PM +0100, Ricardo Wurmus wrote: > > Hi adriano, > > I’ve got no good answers as to “why” things are the way they are, but > the manual explains the range of these values: > > > It seesm to be > > > > (tm:mon %3) > > > > This returns > > > > 11 > > > > I expected 1

Re: timestamp

2022-02-12 Thread Ricardo Wurmus
Hi adriano, I’ve got no good answers as to “why” things are the way they are, but the manual explains the range of these values: > It seesm to be > > (tm:mon %3) > > This returns > > 11 > > I expected 12 but ok, I recognize this kind of weirdness -- Scheme Procedure: tm:mon tm -- Scheme Proc

Re: timestamp

2022-02-12 Thread adriano
Il giorno sab, 12/02/2022 alle 10.01 +0100, to...@tuxteam.de ha scritto: > On Sat, Feb 12, 2022 at 09:37:17AM +0100, adriano wrote: > > This > > > > scheme@(guile-user)> (stat:ctime (stat "cat.jpg")) > > $5 = 1607841890 > > > > How do I get a timedate from that number ($5) ? > > The traditional

Re: timestamp

2022-02-12 Thread adriano
Vivien, thank you ! Il giorno sab, 12/02/2022 alle 09.52 +0100, Vivien ha scritto: > > (use-modules (srfi srfi-19)) ;; Time and date stuff > (time-utc->date (make-time time-utc 0 1607841890))  > ;; Zero for nanoseconds comes before the seconds > > Vivien I also found this scheme@(guile-user)

Re: timestamp

2022-02-12 Thread tomas
On Sat, Feb 12, 2022 at 09:37:17AM +0100, adriano wrote: > This > > scheme@(guile-user)> (stat:ctime (stat "cat.jpg")) > $5 = 1607841890 > > How do I get a timedate from that number ($5) ? The traditional POSIX-ish functions are built in: (localtime 1607841890) => #(50 44 7 13 11 120 0 347

Re: timestamp

2022-02-12 Thread Vivien
Hello, Le samedi 12 février 2022 à 09:37 +0100, adriano a écrit : > scheme@(guile-user)> (stat:ctime (stat "cat.jpg")) > $5 = 1607841890 > > How do I get a timedate from that number ($5) ? (use-modules (srfi srfi-19)) ;; Time and date stuff (time-utc->date (make-time time-utc 0 1607841890))  ;;

timestamp

2022-02-12 Thread adriano
This scheme@(guile-user)> (stat:ctime (stat "cat.jpg")) $5 = 1607841890 How do I get a timedate from that number ($5) ? Thanks