the Haskell Platform is deprecated
what the hell should I install in order to read Learn Learn You a Haskell for Great Good ?
I wrote a piece of #Guile code and it gets me confused
I explain the issue here
https://lists.gnu.org/archive/html/guile-user/2022-02/msg00166.html
any hint appreciated
this Blake is the best thing that happened in #guile land since I'm around
And it's been a few years
God preserve him
#Guile can't pretty print dictionary like structures
You need to convert them to alists and only then you can see them pretty printed 😐
What's the relationship between reading a short text file with
ice-9 rdelim
and reading it with
ice-9 textual-ports
in #guile ?
https://gitlab.com/humanitiesNerd/guilecookbook/-/wikis/read-a-file
Because of the recent discussions about the Guile/Guix documentation on the mailing lists, I'm mumbling about starting a #Guile cookbook, along the lines of the #Guix cookbook
https://gitlab.com/humanitiesNerd/guilecookbook/-/wikis/read-a-file
ANY help appreciated
I remember reading, some years ago, about an experimental REPL based on (delimited ?) continuations
I'd love of someone could point me to that article
In the last few days I made some substantial advancements in my understanding of the so called continuations in Guile
Continuations have been elusive for years
FIRST @neetx suggested me this course (that can be interesting for more scheme features) and particularly this lecture about the continuations passing style
In this course a version of map is shown written in continuation passing style
I didn't understand it so I followed the SICP advice for when you don't understand a piece of code
I made the substitutions of the labda calculus by hand
So the lecture is here
https://www.youtube.com/watch?v=_kCa9heo834&list=PL_fXogTdDGQfj5-jLAxtR8-NPM2KNvyBU
and my work with the manual substitutions is here
https://gitlab.com/-/snippets/2189794
BUT the course doesn't illustrate the relationship between cps and the usage of call/cc
So I found another video where an example of usage of call/cc is shown for implementing a cooperative concurrency system
This one
https://www.youtube.com/watch?v=Ju3KKu_mthg&list=WL&index=2
I didn't watch it all yet but the example is very effective and made me do a real breakthrough in understanding
Why din't I do this investigation earlier ?
Because I was discouraged
Thank you again @neetx
I have this procedure
(define (map f '(0 1 2))
(define (map-iter '(0 1 2) accum)
(cond ((null? '(0 1 2)) (accum '(0 1 2)))
(else
(map-iter (cdr '(0 1 2)) (lambda (x) (accum (cons (f (car '(0 1 2))) x)))))))
(map-iter '(0 1 2) (lambda (x) x)))
and then I have
(define (f x)
(+ x 1))
and
(define my-list (list 0 1 2))
I'd LOVE to be able to do an explicit substitution as in the SICP exercises 1.9 and 1.10
Because I need to wrap my head around this continuations thing
I can't
I'm getting confused
Can anyone help me ?
reading about Haskell I was struck by the "on" function (procedure ?)
I wrote something similar in Guile
(define (on f g)
(lambda (x y)
(f (g x) (g y))))
Then I had to write
(define (lessThan4 x)
(< x 4))
And then I found a procedure to eliminate elements from a list accepting a "predicate"
like
(dropblahblah aList (on equal? lessThan4))
It was not as fun as I expected
If there was a groupBy it'd be more fun, I think
Andy Wingo has commited a pretty-printing feature for CPS in #Guile
Just take a look at the git log today 👀
I can't wait to see this
if someone would rewrite
"A better XML parser through functional programming"
translating the Haskell bits in #guile scheme I'd be very grateful 😔
A looser