From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Sent Newsgroups: gmane.lisp.guile.user Subject: Announcing Guile Blocks 0.1 Date: Thu, 01 Aug 2024 17:09:32 -0400 Message-ID: <87ikwkq7ar.fsf@freakingpenguin.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16957"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Thu Aug 01 23:10:26 2024 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sZd46-0004FG-69 for guile-user@m.gmane-mx.org; Thu, 01 Aug 2024 23:10:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZd3Z-0006Or-Lg; Thu, 01 Aug 2024 17:09:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZd3X-0006OU-RW for guile-user@gnu.org; Thu, 01 Aug 2024 17:09:51 -0400 Original-Received: from mail-108-mta57.mxroute.com ([136.175.108.57]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sZd3V-0002Pq-Gc for guile-user@gnu.org; Thu, 01 Aug 2024 17:09:51 -0400 Original-Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta57.mxroute.com (ZoneMTA) with ESMTPSA id 1910fc6f7bc00017a3.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 01 Aug 2024 21:09:43 +0000 X-Zone-Loop: e3d54efee17e8ca5fed3789898bfd3e70310fec33dde X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Type:MIME-Version:Message-ID:Date: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=rPwobmFqQ1xzsJk04JscThJxMKTZ6ySj5JRDqoRJ+Tg=; b=Jn6k95BV6+vMPfS/phvHpuML8f slWaurtrgoycfhCy3L5He3dUlp+hteKyQ4/RuxBgYEPSDY4I6KIk20Lz9+dv9MosGRFAZyiGwnH3P 15xJfHmL3fqW5ERSzNHJROxbe8TEw7ac1veSzwREZ4qKzYFt9QahlBgpe7quT/e3Pn9BVVjFWscfV EDaIzOwYG4hnoq1VwE8icD966kAXotzqGOO6RW5LjshFkldNQU1J1UCyJESLssi9QDGlpKO5zzcrY EtvgYGLDhKeiN9d4IL/AyKiDWaD79+CEQEErk+EbbQ5herBbZ7vlygOU3+ITKOSE6+Ay/XW6r1Xyz DjC9Vqgw==; X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.57; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta57.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19752 Archived-At: 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.