<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions tagged learning</title>
<link>https://ask.clojure.org/index.php/tag/learning</link>
<description>Powered by Question2Answer</description>
<item>
<title>Can you help me choosing a book?</title>
<link>https://ask.clojure.org/index.php/14693/can-you-help-me-choosing-a-book</link>
<description>&lt;p&gt;Greetings,&lt;br&gt;
so I decided to learn Clojure, my background is Erlang. I am not working anymore in the IT industry.&lt;/p&gt;
&lt;p&gt;I want to learn Clojure for fun, in my spare time, and I love to use books for that.&lt;br&gt;
I love to build small projects while learning, not just theory.&lt;br&gt;
I see there are trillions of books, and I know it is a very subjective matter.&lt;/p&gt;
&lt;p&gt;I am looking for one good for beginners, and with a practical approach.&lt;br&gt;
Can you recommend one?&lt;/p&gt;
&lt;p&gt;I love &quot;Clojure for the Brave and True&quot;&#039;s title and cover, and it also seems to build a project.&lt;/p&gt;
&lt;p&gt;Is that book still good in 2025?&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
</description>
<category>Beginner</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14693/can-you-help-me-choosing-a-book</guid>
<pubDate>Tue, 26 Aug 2025 14:58:42 +0000</pubDate>
</item>
<item>
<title>Interest in beginner-friendly variant of (pst)?</title>
<link>https://ask.clojure.org/index.php/13044/interest-in-beginner-friendly-variant-of-pst</link>
<description>&lt;p&gt;Another State of Clojure survey and &quot;error messages&quot; is still the number one priority for improvement.&lt;/p&gt;
&lt;p&gt;A discussion on Slack led to a number of specific pain points for beginners around exceptions and error messages. The one I&#039;d like to focus on here is to provide a beginner-friendly alternative to &lt;code&gt;(pst)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Currently, &lt;code&gt;(pst)&lt;/code&gt; makes a reasonable attempt at demunging names, eliminating &quot;noise&quot;, and shrinking the stack trace some -- but it still leaves a lot to be desired for &lt;em&gt;beginners&lt;/em&gt; who struggle to understand certain exceptions and have difficulty navigating (Java-style) stack traces, especially compared to some other languages that make a big effort to provide user-friendly error messages and stack traces.&lt;/p&gt;
&lt;p&gt;An example from Slack was:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn f [i]
  (fn [j]
    (/ j i)))

(run! #(% 1) (map f (range 3)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The exception printed in the REPL is fine but &lt;code&gt;(pst)&lt;/code&gt; shows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user=&amp;gt; (pst)
ArithmeticException Divide by zero
        clojure.lang.Numbers.divide (Numbers.java:190)
        user/f/fn--16571 (NO_SOURCE_FILE:3)
        user/eval16576/fn--16577 (NO_SOURCE_FILE:1)
        clojure.core/run!/fn--8906 (core.clj:7849)
...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The elided part mentions &lt;code&gt;clojure.lang.ArrayChunk.reduce&lt;/code&gt; and then has multiple references to &lt;code&gt;clojure.core.protocols&lt;/code&gt; stuff (and doesn&#039;t go deep enough by default to show the original call to &lt;code&gt;clojure.core/run!&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;I think there&#039;s an opportunity here for a new &lt;code&gt;clojure.repl/explain&lt;/code&gt; function, taking the same arguments as &lt;code&gt;pst&lt;/code&gt;, that provides both a more detailed explanation of the failure and further reduces the noise in the stack trace that &lt;code&gt;pst&lt;/code&gt; currently displays.&lt;/p&gt;
&lt;p&gt;Ideally, this could be implemented with some basic cleanup in core but with some dynamic hooks that allow other tooling to &quot;install&quot; additional expansion and/or cleanup so that the community can provide libraries and functionality that further improve this aspect of the beginner experience.&lt;/p&gt;
&lt;p&gt;A dynamic hook into &lt;code&gt;ex-str&lt;/code&gt;, for example, would allow community-provided tooling to massage the exception message shown (both for the original REPL input and for both &lt;code&gt;pst&lt;/code&gt; and &lt;code&gt;explain&lt;/code&gt;) so that messages that beginners struggle with, such as &lt;code&gt;class &amp;lt;whatever&amp;gt; cannot be cast to clojure.lang.IFn...&lt;/code&gt; could be rewritten into beginner-friendly language (&lt;code&gt;Expected a function - found a &amp;lt;whatever&amp;gt;&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Similar dynamic hooks to filter stack frames, and to &quot;print&quot; them to strings, would allow much more friendly output for beginners.&lt;/p&gt;
</description>
<category>Errors</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13044/interest-in-beginner-friendly-variant-of-pst</guid>
<pubDate>Sat, 01 Jul 2023 19:19:33 +0000</pubDate>
</item>
<item>
<title>Complete beginner - questions about formatting, structure etc...</title>
<link>https://ask.clojure.org/index.php/12418/complete-beginner-questions-about-formatting-structure-etc</link>
<description>&lt;p&gt;Hello! I&#039;m sorry if this is the wrong forum to start a thread like this, but I am new to Clojure/lisps in general and thought I would take this year&#039;s &lt;a rel=&quot;nofollow&quot; href=&quot;https://adventofcode.com&quot;&gt;Advent of Code (2022)&lt;/a&gt; as an opportunity to challenge myself to learn a bit.&lt;/p&gt;
&lt;p&gt;So I&#039;ve started Day 1 and solved the problem (in essence, &lt;em&gt;Given a long list of double space separated numbers, find the largest sum amongst them&lt;/em&gt;) but with what looks like the most inelegant thrashing of how one might approach the problem in Clojure.&lt;/p&gt;
&lt;p&gt;For example, the answer for the following would be &lt;code&gt;300&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;10
20

100
200
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;My solution is as follows, and I am wondering primarily:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is this a reasonable approach to the problem, as a beginner, what am I missing out on that would be more elegant.&lt;/li&gt;
&lt;li&gt;How does one even format a line like this?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;(Spoiler below, in case anyone else is interested in the challenge)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(require &#039;[clojure.string :as str])

(reduce max (map (fn [x] (reduce + (map #(Integer/parseInt %) (str/split x #&quot;\n&quot;)))) (str/split (slurp &quot;./input-1.txt&quot;) #&quot;\n\n&quot;)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I&#039;m hoping, time permitting, to be able to continue this journey through the month so hopefully I&#039;m able to as the challenges do become quite complicated even for languages I&#039;m familiar with, but I can already say the REPL is really a wonderful thing.&lt;/p&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12418/complete-beginner-questions-about-formatting-structure-etc</guid>
<pubDate>Thu, 01 Dec 2022 11:51:35 +0000</pubDate>
</item>
</channel>
</rss>