* Announcing Guile Blocks 0.1
@ 2024-08-01 21:09 Richard Sent
2024-08-02 9:24 ` Ricardo Wurmus
0 siblings, 1 reply; 2+ messages in thread
From: Richard Sent @ 2024-08-01 21:09 UTC (permalink / raw)
To: guile-user
Hi Guilers!
Over the past few months I've been working on a Guile package I call
Guile Blocks, an Org Mode inspired implementation of source blocks in
Guile Scheme! (My creativity is boundless.)
Here's the repository: https://git.sr.ht/~freakingpenguin/guile-blocks
Guile Blocks allows for creating, running, composing, highlighting, and
printing source code blocks to various output formats. (At present, SXML
and plaintext.) Here's a simple example:
--8<---------------cut here---------------start------------->8---
(block->sxml (make-block*
#:code "print 42"
#:language ruby
#:run? #t))
;; => (div (@ (class "code-block"))
;; (pre (code "print 42"))
;; (pre "Results:\n" (code "42)))
--8<---------------cut here---------------end--------------->8---
I have two posts demonstrating Guile Blocks on my website that showcase
the results of more advanced usage.
https://freakingpenguin.com/blog/guile-blocks-proof-of-concept.html
https://freakingpenguin.com/blog/guile-blocks-fleshing-out-the-concept.html
Documentation is currently provided in the project README.
I find that Guile Blocks integrates well with David Thompson's excellent
static site generator, Haunt. I also utilize his guile-syntax-highlight
package for, well, syntax highlighting. Thanks for both!
At present the following languages are supported in some form:
c, css, elisp, elixir, gnuplot, guile, latex (via latexml), python,
and ruby
For those familiar with Sourcehut I created a project hub at
https://sr.ht/~freakingpenguin/guile-blocks/. You can find a mailing
list and bug tracker there. Feel free to respond directly to this email
if you prefer! :)
This package is provided as a Guix channel. If you want to experiment
with it using Guix you can do so with the following channels.scm file:
--8<---------------cut here---------------start------------->8---
;; $ guix time-machine -C channels.scm -- shell -C guile guile-blocks
(cons*
(channel
(name 'guile-blocks)
(url "https://git.sr.ht/~freakingpenguin/guile-blocks")
(introduction
(make-channel-introduction
"3e0e66504120bce507d3151c9b5319cdcce139d6"
(openpgp-fingerprint
"0BC0 5236 B0DA D691 2F6E 1993 A2D2 1FA4 2A90 8978"))))
%default-channels)
--8<---------------cut here---------------end--------------->8---
My hope is to get feedback on the existing API and workflow so that I
can iterate on it in preparation for a 1.0 release. I'm rather proud of
the code in blocks.scm (creation, composition, and execution) but feel
like the logic and API for printing blocks needs some cleanup.
Fair warning, I'll likely be pretty spartan with API stability before
1.0 is released. :)
Thanks!
--
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Announcing Guile Blocks 0.1
2024-08-01 21:09 Announcing Guile Blocks 0.1 Richard Sent
@ 2024-08-02 9:24 ` Ricardo Wurmus
0 siblings, 0 replies; 2+ messages in thread
From: Ricardo Wurmus @ 2024-08-02 9:24 UTC (permalink / raw)
To: Richard Sent; +Cc: guile-user
Hi Richard,
> Over the past few months I've been working on a Guile package I call
> Guile Blocks, an Org Mode inspired implementation of source blocks in
> Guile Scheme! (My creativity is boundless.)
This looks nice! It reminds me a bit of the code snippets in the Guix
Workflow Language. Do you think there might be a way for the workflow
language to benefit from your work on Guile Blocks?
https://guixwl.org/manual/html_node/Code-Snippets.html#Code-Snippets
--
Ricardo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-02 9:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01 21:09 Announcing Guile Blocks 0.1 Richard Sent
2024-08-02 9:24 ` Ricardo Wurmus
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).