<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Babashka on Ken Huang</title>
    <link>https://blog.kenhuang.io/tags/babashka/</link>
    <description>Recent content in Babashka on Ken Huang</description>
    <generator>Hugo</generator>
    <language>en</language>
    <managingEditor>kenhuang512@gmail.com (Ken Huang)</managingEditor>
    <webMaster>kenhuang512@gmail.com (Ken Huang)</webMaster>
    <lastBuildDate>Sun, 19 Apr 2026 12:39:42 +0800</lastBuildDate>
    <atom:link href="https://blog.kenhuang.io/tags/babashka/rss.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Clojure reduce: one case for text processing</title>
      <link>https://blog.kenhuang.io/blog/2021-09-19-clojure-reduce-text-processing/</link>
      <pubDate>Sun, 19 Sep 2021 10:39:23 +0800</pubDate><author>kenhuang512@gmail.com (Ken Huang)</author>
      <guid>https://blog.kenhuang.io/blog/2021-09-19-clojure-reduce-text-processing/</guid>
      <description>&lt;p&gt;&#xA;As a practice, I managed to illustrate &lt;strong&gt;Clojure files&lt;/strong&gt; using &lt;a href=&#34;https://blog.kenhuang.io/blog/2021-08-07-illustrate-clojure-snippet/&#34;&gt;illustrate.clj&lt;/a&gt;, but my original idea was to annotate org-mode files of blogs. It&amp;#39;s not uncommon that a blog post has some code snippets.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;But it missed the feature until last night, as I wasn&amp;#39;t sure how to implement it appropriately before and didn&amp;#39;t have enough time.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;For example, I may have an org-mode like this:&lt;/p&gt;&#xA;&lt;div class=&#34;src src-org&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-org&#34; data-lang=&#34;org&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sum of two numbers:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;#+begin_src &lt;/span&gt;&lt;span class=&#34;cs&#34;&gt;clojure&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;+ &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;#+end_src&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;&#xA;I want to have a result comment (&lt;code class=&#34;verbatim&#34;&gt;(;; =&amp;gt; 3)&lt;/code&gt;) after each top-level form after using &lt;code class=&#34;verbatim&#34;&gt;illustrate.clj&lt;/code&gt;:&#xA;sum of two numbers:&lt;/p&gt;</description>
    </item>
    <item>
      <title>illustrate.clj to Illustrate Clojure Snippet</title>
      <link>https://blog.kenhuang.io/blog/2021-08-07-illustrate-clojure-snippet/</link>
      <pubDate>Sat, 07 Aug 2021 18:49:25 +0800</pubDate><author>kenhuang512@gmail.com (Ken Huang)</author>
      <guid>https://blog.kenhuang.io/blog/2021-08-07-illustrate-clojure-snippet/</guid>
      <description>&lt;p&gt;&#xA;To get my hands dirty with Clojure, I am trying to find or implement Clojure&amp;#39;s string functions in the sense of Python. Python has powerful string APIs, and I also want to see how powerful Clojure could be in this field. That would be interesting.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;As shown in the &lt;a href=&#34;https://clojure.org/api/cheatsheet&#34;&gt;cheatsheet&lt;/a&gt;, Clojure has implemented most of them, and there are some that I have to implement myself, like &lt;a href=&#34;https://blog.kenhuang.io/blog/2021-07-25-clojure-string-title-case/&#34;&gt;title-case&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;Along the way, I found it was a little cumbersome to append the evaluation result and the result of calling them, for example,&lt;/p&gt;</description>
    </item>
    <item>
      <title>A Random Password Generator in Babashka</title>
      <link>https://blog.kenhuang.io/blog/2021-07-11-babashka-random-password-generator/</link>
      <pubDate>Sun, 11 Jul 2021 09:18:41 +0800</pubDate><author>kenhuang512@gmail.com (Ken Huang)</author>
      <guid>https://blog.kenhuang.io/blog/2021-07-11-babashka-random-password-generator/</guid>
      <description>&lt;p&gt;&#xA;I&amp;#39;m used to learning by practicing, so when I learned Clojure, I always kept an eye on chances to write code in it.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;Scripting is an excellent field to practice, but the experience is not so good. On the one hand, it&amp;#39;s too hacky to wrap Clojure code in a shell script with the shell bang. On the other hand, the startup time of JVM is too long to hurt the user experience.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
