You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cookbooks/files_and_directories/index.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ <h2>Working with Files and Directories in Clojure</h2>
109
109
getParent The dirname of the file.
110
110
getPath Filename with directory.
111
111
mkdir Create this directory on disk.
112
-
</code></pre><p>To read about more available methods, see <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/File.html">the <code>java.io.File</code>
112
+
</code></pre><p>To read about more available methods, see <ahref="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/File.html">the <code>java.io.File</code>
113
113
docs</a>.</p><h3id="get-a-list-of-the-files-and-dirs-in-a-given-directory">Get a list of the files and dirs in a given directory</h3><p>As <code>File</code> objects:</p><pre><codeclass="clojure">(.listFiles (io/file "path/to/some-dir"))
114
114
</code></pre><p>Same, but just the <em>names</em> (strings), not File objects:</p><pre><codeclass="clojure">(.list (io/file "path/to/some-dir"))
115
115
</code></pre><p>The results of those calls are seqable.</p><h2id="see-also">See also</h2><ul><li><ahref="https://github.com/clj-commons/fs">https://github.com/clj-commons/fs</a></li><li>the I/O section of the <ahref="https://clojure.org/api/cheatsheet">cheatsheet</a></li></ul>
Copy file name to clipboardExpand all lines: articles/cookbooks/strings/index.html
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -77,13 +77,13 @@ <h2>Strings</h2>
77
77
interoperability.</p><p>This work is licensed under a <arel="license" href="https://creativecommons.org/licenses/by/3.0/">Creative Commons
78
78
Attribution 3.0 Unported License</a> (including images &
79
79
stylesheets). The source is available <ahref="https://github.com/clojure-doc/clojure-doc.github.io">on
80
-
Github</a>.</p><h2id="overview">Overview</h2><ul><li>Strings are <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html">plain Java
80
+
Github</a>.</p><h2id="overview">Overview</h2><ul><li>Strings are <ahref="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/String.html">plain Java
81
81
strings</a>.
82
82
You can use anything which operates on them.</li><li>Java strings are immutable, so they're convenient to use in Clojure.</li><li>You can't add metadata to Java strings.</li><li>Clojure supports some convenient notations:</li></ul><pre><code> "foo" java.lang.String
83
83
#"\d" java.util.regex.Pattern (in this case, one which matches a single digit)
84
84
\f java.lang.Character (in this case, the letter 'f')
85
85
</code></pre><ul><li><strong>Caveat:</strong> Human brains and electronic computers are rather different
86
-
devices. So Java strings (sequences of <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Character.html#unicode">UTF-16
86
+
devices. So Java strings (sequences of <ahref="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Character.html#unicode">UTF-16
87
87
characters</a>)
88
88
don't always map nicely to user-perceived characters. For example, a
89
89
single Unicode "code point" doesn't necessarily equal a user-perceived
@@ -179,7 +179,7 @@ <h2>Strings</h2>
179
179
(read-string "#\"[abc]\""))
180
180
;=> #"[abc]"
181
181
</code></pre><h3id="parsing-complex-strings">Parsing complex strings</h3><h4id="regexes">Regexes</h4><p>Regexes offer a boost in string-matching power. You can express ideas
182
-
like repetition, alternatives, etc.</p><p><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html">Regex
182
+
like repetition, alternatives, etc.</p><p><ahref="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/regex/Pattern.html">Regex
183
183
reference.</a></p><p><strong>Groups:</strong> Regex groups are useful, when we want to match more than
184
184
one substring. (Or refer to matches later.) In the regex <code>#"(group-1) (group-2)"</code>, the 0th group is the whole match. The 1st group is
185
185
started by the left-most <code>(</code>, the 2nd group is started by the
@@ -291,7 +291,7 @@ <h2>Strings</h2>
291
291
(print "...")))
292
292
;=> "We have shrimp-kabobs, shrimp creole, shrimp gumbo..."
293
293
</code></pre><h4id="format-strings">Format strings</h4><p>Java's templating mini-language helps you build many strings
294
-
conveniently. <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Formatter.html">Reference.</a></p><pre><codeclass="clojure">;; %s is most commonly used to print args. Escape %'s with %%.
294
+
conveniently. <ahref="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Formatter.html">Reference.</a></p><pre><codeclass="clojure">;; %s is most commonly used to print args. Escape %'s with %%.
Copy file name to clipboardExpand all lines: articles/ecosystem/community/index.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ <h2>Clojure Community</h2>
63
63
</div>
64
64
65
65
<p>This guide covers:</p><ul><li>Online Communities</li><li>The Official Clojure mailing lists</li><li>IRC channel</li><li>Documentation sites</li><li>Clojure User Groups around the globe</li><li>Conferences about or related to Clojure</li><li>Various Community sites about Clojure (subreddit, etc)</li></ul><p>This work is licensed under a <arel="license" href="https://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>
66
-
(including images & stylesheets). The source is available <ahref="https://github.com/clojure-doc/clojure-doc.github.io">on Github</a>.</p><h2id="online-communities">Online Communities</h2><ul><li><ahref="https://clojurians.slack.com">Clojurians Slack</a> -- currently the most active online community, generously sponsored by Salesforce (owners of Slack) -- <ahref="http://clojurians.net">self-signup at clojurians.net</a> -- <ahref="https://clojurians-log.clojureverse.org/">partial archive of channels</a> (via <code>@logbot</code> on Slack)</li><li><ahref="https://clojurians.zulipchat.com/">Clojurians Zulip</a> -- free, open source community, includes an archive of most channels from the Clojurians Slack (via <code>@zulip-mirror-bot</code> on Slack)</li><li><ahref="https://www.reddit.com/r/Clojure/">Clojure SubReddit</a> -- r/Clojure -- the right-hand sidebar has links to many Clojure resources</li><li><ahref="https://clojureverse.org">ClojureVerse</a> -- online forum</li><li><ahref="https://ask.clojure.org/">Clojure Q&A</a> -- the official Clojure question and answer site</li><li><ahref="https://discord.gg/discljord">Clojurians Discord</a></li><li><ahref="https://clj.social/">clj.social</a> -- a Clojure-specific Mastodon instance</li><li><ahref="https://clojure.camp/">Clojure Camp</a> -- aimed at Clojure beginners, this offers a fun community of mentors and fellow learners, via Discord, Meetup.com, and offers study groups, pairing, and 1:1 mentoring</li><li>See also the <ahref="https://clojure.org/community/resources">Clojure Discussion section on clojure.org</a> for more online communities</li></ul><h2id="clojure-mailing-list">Clojure Mailing List</h2><ul><li><ahref="https://groups.google.com/g/clojure">Clojure users mailing list</a> -- this is the original and still occasionally active mailing list for Clojure users</li></ul><h2id="clojure-irc-channels">Clojure IRC Channels</h2><ul><li><code>#clojure</code> on <ahref="https://libera.chat">Libera.Chat</a></li></ul><h2id="documentation">Documentation</h2><ul><li>Official <ahref="https://clojure.org/guides/getting_started">clojure.org Guides</a></li><li>Official <ahref="https://clojure.org/reference/reader">clojure.org Reference documentation</a></li><li>Official <ahref="https://clojure.org/api/api">clojure.org API documentation</a></li><li><ahref="https://clojuredocs.org/">ClojureDocs</a>: Clojure API reference, with examples</li><li><ahref="https://clojure-doc.org/">Clojure-Doc</a>: Clojure tutorials, cookbooks, etc</li><li><ahref="https://clojure.org/api/cheatsheet">Clojure API Cheatsheet</a> (hosted on clojure.org)</li><li>Community <ahref="https://guide.clojure.style/">Clojure Style Guide</a></li><li><ahref="http://clojurekoans.com/">Clojure Koans</a></li><li><ahref="http://www.getclojure.org">GetClojure</a>: Tens of thousands of searchable Clojure examples mined from all over the internet.</li></ul><h2id="books">Books</h2><ul><li>See the list of <ahref="https://clojure.org/community/books">books on clojure.org</a></li></ul><h2id="courses">Courses</h2><ul><li>See the list of <ahref="https://www.clojure.org/community/training">courses and training on clojure.org</a></li></ul><h2id="user-groups">User Groups</h2><ul><li>The list of <ahref="https://clojure.org/community/user_groups">Clojure User Groups</a> around the world</li><li><ahref="https://clojure.org/community/start_group">How to run your own Clojure User Group</a></li></ul><h2id="videos-about-clojure">Videos About Clojure</h2><p>Videos of talks about Clojure are often made available on <ahref="https://www.infoq.com/clojure">InfoQ</a>, and <ahref="https://www.youtube.com/user/ClojureTV">Clojure YouTube channel</a>. In addition, here are some other video learning resources:</p><ul><li><ahref="https://vimeo.com/channels/fulldisclojure/videos">Full Disclojure</a> is a series of screencasts about Clojure</li><li><ahref="https://pluralsight.com/training/Courses/TableOfContents/clojure-concurrency-tutorial">Clojure Concurrency Tutorial</a></li><li><ahref="https://www.oreilly.com/library/view/clojure-inside-out/9781449368647/">Clojure Inside Out</a> from O'Reilly</li><li><ahref="https://www.youtube.com/playlist?list=PL1p6TgkbKXqyOwq6iSkce_EY5YWFHciHt">Clojure Koans Walkthroughs</a></li><li><ahref="https://ericnormand.me/">Eric Normand</a></li><li><ahref="https://tbaldridge.pivotshare.com/">Clojure Tutorials by Tim Baldridge</a></li><li><ahref="https://www.youtube.com/practicalli">Practicalli YouTube Channel</a> -- including <ahref="https://www.youtube.com/playlist?list=PLpr9V-R8ZxiDjyU7cQYWOEFBDR1t7t0wv">Learning Clojure with Practicalli</a></li></ul><h2id="podcasts-about-clojure">Podcasts About Clojure</h2><ul><li><ahref="https://cognitect.com/cognicast/">Cognicast</a> by Craig Andera often discusses topics relevant to Clojure and ClojureScript.</li><li><ahref="https://clojuredesign.club/">Clojure Design Club</a> by Christoph Neumann and Nate Jones -- Functional Design in Clojure: Group therapy for recovering object-oriented developers.</li><li><ahref="https://clojure.stream/podcast">ClojureStream</a> by Jacek Schae -- Explore unusually expressive programming language with Lisp roots that runs on JavaScript, Java Virtual Machine, and CLR.</li><li><ahref="https://www.therepl.net/episodes/">The REPL</a> by Daniel Compton -- A weekly newsletter and podcast diving into Clojure programs and libraries.</li><li><ahref="https://podcasters.spotify.com/pod/show/lostinlambduhhs/">Lost In Lambduhhs</a> by Jordan Miller -- Featuring interviews with a myriad of guests from all sectors of tech with a special focus on the languages Clojure and Clojurescript</li><li><ahref="https://www.parens-of-the-dead.com/">Parens of the Dead</a> by Magnar Sveen and Christian Johansen -- A screencast series of zombie-themed games written with Clojure and ClojureScript</li></ul><h2id="code-repositories">Code Repositories</h2><p>Most folks host their projects at
66
+
(including images & stylesheets). The source is available <ahref="https://github.com/clojure-doc/clojure-doc.github.io">on Github</a>.</p><h2id="online-communities">Online Communities</h2><ul><li><ahref="https://clojurians.slack.com">Clojurians Slack</a> -- currently the most active online community, generously sponsored by Salesforce (owners of Slack) -- <ahref="http://clojurians.net">self-signup at clojurians.net</a> -- <ahref="https://clojurians-log.clojureverse.org/">partial archive of channels</a> (via <code>@logbot</code> on Slack)</li><li><ahref="https://clojurians.zulipchat.com/">Clojurians Zulip</a> -- free, open source community, includes an archive of most channels from the Clojurians Slack (via <code>@zulip-mirror-bot</code> on Slack)</li><li><ahref="https://www.reddit.com/r/Clojure/">Clojure SubReddit</a> -- r/Clojure -- the right-hand sidebar has links to many Clojure resources</li><li><ahref="https://clojureverse.org">ClojureVerse</a> -- online forum</li><li><ahref="https://ask.clojure.org/">Clojure Q&A</a> -- the official Clojure question and answer site</li><li><ahref="https://discord.gg/discljord">Clojurians Discord</a></li><li><ahref="https://clj.social/">clj.social</a> -- a Clojure-specific Mastodon instance</li><li><ahref="https://clojure.camp/">Clojure Camp</a> -- aimed at Clojure beginners, this offers a fun community of mentors and fellow learners, via Discord, Meetup.com, and offers study groups, pairing, and 1:1 mentoring</li><li>See also the <ahref="https://clojure.org/community/resources">Clojure Discussion section on clojure.org</a> for more online communities</li></ul><h2id="clojure-mailing-list">Clojure Mailing List</h2><ul><li><ahref="https://groups.google.com/g/clojure">Clojure users mailing list</a> -- this is the original and still occasionally active mailing list for Clojure users</li></ul><h2id="clojure-irc-channels">Clojure IRC Channels</h2><ul><li><code>#clojure</code> on <ahref="https://libera.chat">Libera.Chat</a></li></ul><h2id="documentation">Documentation</h2><ul><li>Official <ahref="https://clojure.org/guides/getting_started">clojure.org Guides</a></li><li>Official <ahref="https://clojure.org/reference/reader">clojure.org Reference documentation</a></li><li>Official <ahref="https://clojure.org/api/api">clojure.org API documentation</a></li><li><ahref="https://clojuredocs.org/">ClojureDocs</a>: Clojure API reference, with examples</li><li><ahref="https://clojure-doc.org/">Clojure-Doc</a>: Clojure tutorials, cookbooks, etc</li><li><ahref="https://clojure.org/api/cheatsheet">Clojure API Cheatsheet</a> (hosted on clojure.org)</li><li>Community <ahref="https://guide.clojure.style/">Clojure Style Guide</a></li><li><ahref="http://clojurekoans.com/">Clojure Koans</a></li><li><ahref="http://www.getclojure.org">GetClojure</a>: Tens of thousands of searchable Clojure examples mined from all over the internet.</li></ul><h2id="books">Books</h2><ul><li>See the list of <ahref="https://clojure.org/community/books">books on clojure.org</a></li></ul><h2id="courses">Courses</h2><ul><li>See the list of <ahref="https://clojure.org/community/training">courses and training on clojure.org</a></li></ul><h2id="user-groups">User Groups</h2><ul><li>The list of <ahref="https://clojure.org/community/user_groups">Clojure User Groups</a> around the world</li><li><ahref="https://clojure.org/community/start_group">How to run your own Clojure User Group</a></li></ul><h2id="videos-about-clojure">Videos About Clojure</h2><p>Videos of talks about Clojure are often made available on <ahref="https://www.infoq.com/clojure">InfoQ</a>, and <ahref="https://www.youtube.com/user/ClojureTV">Clojure YouTube channel</a>. In addition, here are some other video learning resources:</p><ul><li><ahref="https://vimeo.com/channels/fulldisclojure/videos">Full Disclojure</a> is a series of screencasts about Clojure</li><li><ahref="https://pluralsight.com/training/Courses/TableOfContents/clojure-concurrency-tutorial">Clojure Concurrency Tutorial</a></li><li><ahref="https://www.oreilly.com/library/view/clojure-inside-out/9781449368647/">Clojure Inside Out</a> from O'Reilly</li><li><ahref="https://www.youtube.com/playlist?list=PL1p6TgkbKXqyOwq6iSkce_EY5YWFHciHt">Clojure Koans Walkthroughs</a></li><li><ahref="https://ericnormand.me/">Eric Normand</a></li><li><ahref="https://tbaldridge.pivotshare.com/">Clojure Tutorials by Tim Baldridge</a></li><li><ahref="https://www.youtube.com/practicalli">Practicalli YouTube Channel</a> -- including <ahref="https://www.youtube.com/playlist?list=PLpr9V-R8ZxiDjyU7cQYWOEFBDR1t7t0wv">Learning Clojure with Practicalli</a></li></ul><h2id="podcasts-about-clojure">Podcasts About Clojure</h2><ul><li><ahref="https://cognitect.com/cognicast/">Cognicast</a> by Craig Andera often discusses topics relevant to Clojure and ClojureScript.</li><li><ahref="https://clojuredesign.club/">Clojure Design Club</a> by Christoph Neumann and Nate Jones -- Functional Design in Clojure: Group therapy for recovering object-oriented developers.</li><li><ahref="https://clojure.stream/podcast">ClojureStream</a> by Jacek Schae -- Explore unusually expressive programming language with Lisp roots that runs on JavaScript, Java Virtual Machine, and CLR.</li><li><ahref="https://www.therepl.net/episodes/">The REPL</a> by Daniel Compton -- A weekly newsletter and podcast diving into Clojure programs and libraries.</li><li><ahref="https://podcasters.spotify.com/pod/show/lostinlambduhhs/">Lost In Lambduhhs</a> by Jordan Miller -- Featuring interviews with a myriad of guests from all sectors of tech with a special focus on the languages Clojure and Clojurescript</li><li><ahref="https://www.parens-of-the-dead.com/">Parens of the Dead</a> by Magnar Sveen and Christian Johansen -- A screencast series of zombie-themed games written with Clojure and ClojureScript</li></ul><h2id="code-repositories">Code Repositories</h2><p>Most folks host their projects at
67
67
<ahref="https://github.com/search?l=Clojure&q=clojure&type=Repositories">GitHub</a>, and most pure Clojure
68
68
library distributions (with the exception of Contrib) are available at
69
69
<ahref="https://clojars.org/">Clojars</a>.</p><h2id="websites">Websites</h2><ul><li><ahref="https://clojure.org/">Clojure.org</a>: the official website</li><li><ahref="https://planet.clojure.in/">Planet Clojure</a>: aggregator of selected Clojure-related blog posts</li><li><ahref="https://www.clojure-toolbox.com/">The Clojure Toolbox</a>: a categorized directory of libraries and tools for Clojure</li><li><ahref="https://4clojure.oxal.org/">4Clojure</a>: Clojure exercise problems</li><li><ahref="https://exercism.io/">Exercism.io</a>: Peer-reviewed Clojure exercises</li></ul><h2id="conferences">Conferences</h2><p>See <ahref="https://clojure.org/community/resources#_conferences">Community > Resources > Conferences on clojure.org</a>.</p><h2id="email-newsletters">Email Newsletters</h2><ul><li><ahref="http://www.clojuregazette.com/">Clojure Gazette</a></li><li><ahref="http://defnewsletter.com/">(def newsletter)</a></li></ul><h2id="workshops">Workshops</h2><ul><li><ahref="http://www.clojurebridge.org/">ClojureBridge</a></li></ul><h2id="core-development">Core development</h2><p>See the <ahref="https://clojure.org/dev/dev">Clojure > Development on clojure.org</a> for full details on
0 commit comments