Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I too started by using <code>load-file</code>. According to the <a href="http://clojure.org/libs" rel="nofollow noreferrer">Clojure documentation on libs</a>,</p> <blockquote> <p>Clojure defines conventions for naming and structuring libs:<br/> &nbsp;&nbsp;&nbsp;&nbsp;* A lib name is a symbol that will typically contain two or more parts separated by periods.<br/> &nbsp;&nbsp;&nbsp;&nbsp;* A lib's container is a Java resource whose classpath-relative path is derived from the lib name:<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;o The path is a string<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;o Periods in the lib name are replaced by slashes in the path<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;o Hyphens in the lib name are replaced by underscores in the path<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;o The path ends with ".clj"<br/> &nbsp;&nbsp;&nbsp;&nbsp;* A lib begins with an "ns" form that<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;o creates the Clojure namespace that shares its name, and<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;o declares its dependencies on Java classes, Clojure's core facilities, and/or other libs</p> </blockquote> <p>The Clojure documentation further provides the following example namespace declaration (which I'm sure you already know, but I'm providing it here for completeness):</p> <pre><code>(ns com.my-company.clojure.examples.my-utils (:import java.util.Date) (:use [clojure.contrib.def :only (defvar-)]) (:require [clojure.contrib.shell-out :as shell])) </code></pre> <p>So, my answer would be to use libs for your project -- it'll help simplify all of those folders. To "include" a lib, you'll use require, like this:</p> <pre><code>(require 'clojure.contrib.def 'clojure.contrib.except 'clojure.contrib.sql) (require '(clojure.contrib def except sql)) </code></pre> <p>As long as the documentation is correct and your project is classpath-relative, everything should happily load. Hope that answers your question. :D</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload