skribilo-users
[Top][All Lists]
Advanced

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

Re: Literate Programming


From: Phil
Subject: Re: Literate Programming
Date: Sat, 29 Oct 2022 18:07:22 +0100
User-agent: mu4e 1.4.15; emacs 27.2

Hi Arun,

Arun Isaac writes:

> We could write a new skribilo engine (similar to the HTML engine, LaTeX
> engine, etc.) that tangles the source code blocks into a separate
> file. That would be an interesting feature to have, and relatively
> straightforward to implement. WDYT?

Thanks for your reply, and apologies for my lateness is getting back to
you!

This would be a neat idea.  For my actual use-case after some testing,
I've decided I that the following feature - actually suits my case better: 

(source :language [:tab 8] [:definition] [:stop] [:start] [:file])

I'm documenting a Guix Channel inside the channel itself, which has some
moderately fancy enhancements in it that are worthy of more than a few
code comments - I figured there were 2 ways of doing this:

Either have a separate skb file co-located with in the channel repo,
which can then reference the channel scm files in order to refer to them
through the documentation.

Or write the actual Channel itself in an skb file and then tangle the
package definitions into scm files - which is the enhancement you're
proposing, I think?

Because I want the channel to "just work" with Guix, after some testing
I've found the former is easier to accomplish as it keeps the repo
looking exactly like Guix expects, just with an addition Skibilo file
that Guix will just ignore.  However, I think their is a wider use-case
for having a tangle like function in Skribilo.

One thing I did notice was when using the (source ....) function was
that :definition would not pick-up definitions of the form (define-public
....) only (define ....).  I'm yet to look at the source code in
details, but I'm hoping this work be a fairly trivial and useful
addition to :definition's current functionality?

Cheers,
Phil.



reply via email to

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