unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Threading / Pipe Macro
@ 2019-07-07 10:42 Zelphir Kaltstahl
  2019-07-07 18:32 ` Chris Vine
  2019-07-08  0:49 ` Erik Edrosa
  0 siblings, 2 replies; 13+ messages in thread
From: Zelphir Kaltstahl @ 2019-07-07 10:42 UTC (permalink / raw)
  To: guile-user

Hi Guile Users!

I recently looked at some online course about Elixir and saw an elegant
use of pipes (the operator `|>` in Elixir). Then I remembered, that in
Racket there are so called threading macros, which seem to accomplish
the same:

https://github.com/lexi-lambda/threading/blob/master/threading-lib/threading/main.rkt

I also searched around for tutorials or explanations on how to write
these macros. Sometimes I found excellent documenation in the Chicken
Scheme wiki, so I checked there:

https://wiki.call-cc.org/eggref/5/pipes

However, I would like to use a threading macro or pipes in Guile. I am
seeing these options:

(1) I could start trying to translate the Racket version to Guile, maybe
it would work easily, maybe it uses Racket specific macro stuff, I don't
know. However, I am not sure I would learn how the macros actually work.
Maybe I would.

(2) I could start from zero and try to implement the pipes I saw in the
online course about Elixir.

(3) Maybe something already exists in Guile, that I am unaware of and
could not find through searching. Maybe there are even more names for pipes.

So my questions are:

(1) Does something already exist?

(2) Would translating the Racket version be an easy thing to do, or is
there something in there, that cannot so easily be achieved with
syntax-parse, syntax-case and the likes? (For someone who rarely touches
macros and does not have a lot experience writing them.)

Regards,

Zelphir




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

end of thread, other threads:[~2019-07-08 21:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-07 10:42 Threading / Pipe Macro Zelphir Kaltstahl
2019-07-07 18:32 ` Chris Vine
2019-07-07 18:39   ` Chris Vine
2019-07-07 19:30   ` Mark H Weaver
2019-07-07 20:16     ` Chris Vine
2019-07-07 22:24       ` Mark H Weaver
2019-07-08  0:10         ` Chris Vine
2019-07-07 22:25       ` Chris Vine
2019-07-07 22:46         ` Mark H Weaver
2019-07-08  1:09           ` Mark H Weaver
2019-07-08  0:49 ` Erik Edrosa
2019-07-08  7:39   ` Linus Björnstam
2019-07-08 21:26   ` Zelphir Kaltstahl

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