[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

code review request

From: adriano
Subject: code review request
Date: Sat, 26 Feb 2022 11:31:40 +0100

I wrote a brief piece of Guile code and it got me confused, I'd like to
ask for a code review

The code is here

A few words about it

I have a folder with 2 small files in it (included in the repo)

I'd like to "browse" it programmatically and come up with a dictionary
like structure like this

((domenica 13 dicembre 2020
                #(2049 2627145 33204 1 1000 1000 0 443230 1645865577
1607841890 1645864904 4096 872 regular 436 596285075 248104000
      (martedì 15 febbraio 2022
               #(2049 4195086 33204 1 1000 1000 0 53 1645865577
1644926631 1645864925 4096 8 regular 436 700286391 687497000

The keys are
domenica 13 dicembre 2020
martedì 15 febbraio 2022

these are dates expressed in a human readable format

the values are supposed to be lists of stat objects (for now)

The dates are the files mtimes

The idea is to group the files based on their mtimes

I think I want to use "file-system-fold" from (ice-9 ftw) for this

I wrote a "leaf" procedure to be passed to file-system-fold and I
tested it in the REPL, it seems to work

But when I call

(file-system-fold enter? my-leaf-procedure down up skip error result

I get a result I don't understand: this return 2 values

One is expected, it's the one I wanted to produce

The other one is totally unexpected, it's a vhash and I don't
understand where it gets created, why it gets returned, what it

In the file "notes" I pasted what I got by evaluating the last
expression in my code file

"palestra.scm" is the file containing the code

Thanks for any help

reply via email to

[Prev in Thread] Current Thread [Next in Thread]