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

and my work with the manual substitutions is here

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

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

how is call/cc used in reality ?

All the examples I see make no sense

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)))
(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))


(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"


(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

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 scheme I'd be very grateful 😔​

Some days ago I wrote this thread about GNU Guile

Yesterday I saw the news of the new release of Pharo

Pharo is awesome

If Guile could have an IDE like the one Pharo has, it would be awesome

I feel that my video channel doesn't get the views it deserves 😐​


This talk gave me a glimpse of how to implement functional maps a la Clojure

because I never met this kind of trees before

Hi @mdallastella

I always find 3 notifications when I load but I saw those interactions again and again

tooling is more important than the language per se

Ah so nerds like "normal" people ?

I guess you have a lot of gay friends too 😂

Kudos for blocking me

So much for "democracy" 😂

Playing with a toy project in

I'd like to use the lsp server

How do I do that ?

Should I require it from my project code ?

Or is it meant to be installed "globally" ?

And after that, how do I connect to it ?

I found this talk in the symposium 2020:
"Privilege as a technical debt"

and I think it's awesome

It's a true gem

I wonder if there's a footage if it anywhere ?

Functional Café

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!