<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Christoph Frick - ofnir.net - Open Source Consultant, Software Developer and System Administrator (Posts about REPL)</title><link>https://ofnir.net/</link><description></description><atom:link href="https://ofnir.net/categories/repl.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2026 &lt;a href="mailto:cf@ofnir.net"&gt;Christoph Frick - ofnir.net&lt;/a&gt; </copyright><lastBuildDate>Tue, 21 Apr 2026 11:44:46 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>WREPL now uses Clojure CLI</title><link>https://ofnir.net/posts/wrepl-now-uses-clojure-cli/</link><dc:creator>Christoph Frick - ofnir.net</dc:creator><description>&lt;p&gt;&lt;a href="https://github.com/christoph-frick/clj-wrepl"&gt;WREPL&lt;/a&gt; no longer is
a standalone program, but since version 0.2 now is integrated into the
&lt;a href="https://clojure.org/guides/deps_and_cli"&gt;Clojure CLI&lt;/a&gt;.  This makes it
easier to use on a regular Clojurist machine.  See the
&lt;a href="https://github.com/christoph-frick/clj-wrepl/tree/master/example"&gt;&lt;code&gt;example&lt;/code&gt;-Folder&lt;/a&gt;
on how to migrate.&lt;/p&gt;
&lt;p&gt;Back when WREPL started there were no official way to quickly spin up
a Clojure REPL any more.  Spec was released, but was not part of the
core.  So before that you could just run a Clojure REPL with the JAR
file in your &lt;code&gt;~/.m2/repository/org/clojure/&lt;/code&gt; directory.  But with the
additional dependencies into the Spec libraries, this was no longer so
easy.&lt;/p&gt;
&lt;p&gt;So WREPL was again a single JAR to run your (standalone) REPL and also
allowed configuration of all the "letters" of REPL and some additional
stuff (e.g. loading dependencies, run some file on startup, ...).
Nowadays, the Clojure CLI is installed on basically every Clojure
developer machine and brings back the entry point to quickly spin up
a REPL.  It brings the facilities to run your own code and pull the
dependencies for it.&lt;/p&gt;
&lt;p&gt;Yet the part to configure a REPL to your liking is still a usable
feature.  Integrating "REPL-ish" tools with each other is not
convenient.  So WREPL remains useful still to e.g. use a different
prompt to denote some other state than the current namespace or
configure a pretty-printer to your liking in your
&lt;a href="https://github.com/bhauman/rebel-readline"&gt;rebel-readline&lt;/a&gt; REPL.&lt;/p&gt;</description><category>Clojure</category><category>REPL</category><guid>https://ofnir.net/posts/wrepl-now-uses-clojure-cli/</guid><pubDate>Thu, 16 Jan 2025 23:00:00 GMT</pubDate></item><item><title>How to start a Clojure REPL since the Specs Alpha change</title><link>https://ofnir.net/posts/how-to-start-a-clojure-repl-since-the-specs-alpha-change/</link><dc:creator>Christoph Frick - ofnir.net</dc:creator><description>&lt;p&gt;With the recent change in Clojure to use dedicated artifacts for &lt;em&gt;Spec&lt;/em&gt; in an
&lt;code class="docutils literal"&gt;alpha&lt;/code&gt; sub-namespace, it is no longer easy to start a simple REPL just with
the regular &lt;code class="docutils literal"&gt;jar&lt;/code&gt; (e.g. &lt;code class="docutils literal"&gt;java &lt;span class="pre"&gt;-jar&lt;/span&gt; $CLOJURE_JAR clojure.main&lt;/code&gt;).  So how to start
it now?&lt;/p&gt;
&lt;p&gt;As of before you are better off to do a &lt;code class="docutils literal"&gt;lein new&lt;/code&gt; somewhere, change the
&lt;code class="docutils literal"&gt;org.clojure/clojure&lt;/code&gt; dependency to the version you like and do a &lt;code class="docutils literal"&gt;lein deps
:tree&lt;/code&gt; to fetch all that is needed and display what things &lt;code class="docutils literal"&gt;org.clojure/core&lt;/code&gt;
now depends on.  E.g.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code clojure"&gt;&lt;a id="rest_code_6ab1ba0c60434cd1a5b5407e75a3f476-1" name="rest_code_6ab1ba0c60434cd1a5b5407e75a3f476-1" href="https://ofnir.net/posts/how-to-start-a-clojure-repl-since-the-specs-alpha-change/#rest_code_6ab1ba0c60434cd1a5b5407e75a3f476-1"&gt;&lt;/a&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;org.clojure/clojure&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"1.9.0-alpha17"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;a id="rest_code_6ab1ba0c60434cd1a5b5407e75a3f476-2" name="rest_code_6ab1ba0c60434cd1a5b5407e75a3f476-2" href="https://ofnir.net/posts/how-to-start-a-clojure-repl-since-the-specs-alpha-change/#rest_code_6ab1ba0c60434cd1a5b5407e75a3f476-2"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;org.clojure/core.specs.alpha&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"0.1.10"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;:exclusions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[[&lt;/span&gt;&lt;span class="nv"&gt;org.clojure/clojure&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;org.clojure/spec.alpha&lt;/span&gt;&lt;span class="p"&gt;]]]&lt;/span&gt;
&lt;a id="rest_code_6ab1ba0c60434cd1a5b5407e75a3f476-3" name="rest_code_6ab1ba0c60434cd1a5b5407e75a3f476-3" href="https://ofnir.net/posts/how-to-start-a-clojure-repl-since-the-specs-alpha-change/#rest_code_6ab1ba0c60434cd1a5b5407e75a3f476-3"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;org.clojure/spec.alpha&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"0.1.123"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;:exclusions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[[&lt;/span&gt;&lt;span class="nv"&gt;org.clojure/clojure&lt;/span&gt;&lt;span class="p"&gt;]]]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;All your artifacts end up in &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;~/.m2/repository&lt;/span&gt;&lt;/code&gt;.  So next you have to build up
your &lt;em&gt;classpath&lt;/em&gt; to call the REPL.  You can either run a &lt;code class="docutils literal"&gt;lein &lt;span class="pre"&gt;with-profile&lt;/span&gt; uberjar cp&lt;/code&gt; in that
dummy project to get the class path Leiningen is using (which often can be
quite long depending on all the plugins you run.  Or you can guess the
locations from the versions above to build up the params for &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;-cp&lt;/span&gt;&lt;/code&gt; for
yourself.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code shell"&gt;&lt;a id="rest_code_604c6454351c4b8887c398107722c23d-1" name="rest_code_604c6454351c4b8887c398107722c23d-1" href="https://ofnir.net/posts/how-to-start-a-clojure-repl-since-the-specs-alpha-change/#rest_code_604c6454351c4b8887c398107722c23d-1"&gt;&lt;/a&gt;&lt;span class="nv"&gt;M2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="s2"&gt;/.m2/repository"&lt;/span&gt;
&lt;a id="rest_code_604c6454351c4b8887c398107722c23d-2" name="rest_code_604c6454351c4b8887c398107722c23d-2" href="https://ofnir.net/posts/how-to-start-a-clojure-repl-since-the-specs-alpha-change/#rest_code_604c6454351c4b8887c398107722c23d-2"&gt;&lt;/a&gt;java&lt;span class="w"&gt; &lt;/span&gt;-cp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$M2&lt;/span&gt;/org/clojure/clojure/1.9.0-alpha17/clojure-1.9.0-alpha17.jar:&lt;span class="nv"&gt;$M2&lt;/span&gt;/org/clojure/spec.alpha/0.1.123/spec.alpha-0.1.123.jar:&lt;span class="nv"&gt;$M2&lt;/span&gt;/org/clojure/core.specs.alpha/0.1.10/core.specs.alpha-0.1.10.jar:.&lt;span class="w"&gt; &lt;/span&gt;clojure.main
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This is a very basic setup to get a basic REPL going, but paired with &lt;code class="docutils literal"&gt;rlwrap&lt;/code&gt;
this is a few times faster to fire up than a &lt;code class="docutils literal"&gt;lein repl&lt;/code&gt;, which makes it
perfect to quickly fool around with some ideas.&lt;/p&gt;
&lt;p&gt;On the horizon to streamline this, there is
&lt;a class="reference external" href="https://github.com/clojure/tools.deps.alpha"&gt;https://github.com/clojure/tools.deps.alpha&lt;/a&gt;.&lt;/p&gt;</description><category>Clojure</category><category>REPL</category><guid>https://ofnir.net/posts/how-to-start-a-clojure-repl-since-the-specs-alpha-change/</guid><pubDate>Tue, 01 Aug 2017 22:00:00 GMT</pubDate></item><item><title>Clojure REST-REPL</title><link>https://ofnir.net/posts/clojure-rest-repl/</link><dc:creator>Christoph Frick - ofnir.net</dc:creator><description>&lt;p&gt;While tools like &lt;cite&gt;httpie&lt;/cite&gt; give you a nice way to query web APIs, they only
give you the means to query data easily and print the results nicely.  Once
you need to modify the results or need to drill down on them, you are on your
own.&lt;/p&gt;
&lt;p&gt;Therefor I wrote my own tool - &lt;a class="reference external" href="https://github.com/christoph-frick/rest-repl"&gt;REST REPL&lt;/a&gt;.  It starts a Clojure REPL
with some state handling (imagine &lt;code class="docutils literal"&gt;cd&lt;/code&gt; from the shell), preloaded libraries,
that make your live easier (&lt;cite&gt;clj-http&lt;/cite&gt;, &lt;cite&gt;specter&lt;/cite&gt;, &lt;cite&gt;clojure.data.xml&lt;/cite&gt;,
&lt;cite&gt;cheshire&lt;/cite&gt;) and make it pretty print (with colors) the results using &lt;cite&gt;puget&lt;/cite&gt;.&lt;/p&gt;
&lt;p&gt;Since this is a (close to) regular Clojure REPL, you can handle the data as
you are used too and you can place reoccurring code into functions.&lt;/p&gt;</description><category>Clojure</category><category>REPL</category><guid>https://ofnir.net/posts/clojure-rest-repl/</guid><pubDate>Fri, 22 Jan 2016 23:00:00 GMT</pubDate></item></channel></rss>