require library from inside the REPL

2013-12-18 Thread Nicholas Wieland
https://gist.github.com/ngw/f8ef003532c8d712dd9b
I'm having troubles using the create function from inside the REPL.

I think I should require it directly without defining a ns, right?

user= (:require [theshire.models.element :as model])

CompilerException java.lang.ClassNotFoundException:
theshire.models.element,
compiling/private/var/folders/r_/8jpc8nbx6x1g6gq3r1djmr90gp/T/form-init3432138121469073363.clj:1:1)

what am I doing wrong?


TIA,

  ngw

-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: require library from inside the REPL

2013-12-18 Thread Thomas Heller
The (:require ...) form is specific to the (ns) macro, in the REPL you'd 
invoke the require function directly.

(require '[theshire.models.element :as model])

HTH,
/thomas

On Wednesday, December 18, 2013 3:14:14 PM UTC+1, Nicholas Wieland wrote:

 https://gist.github.com/ngw/f8ef003532c8d712dd9b
 I'm having troubles using the create function from inside the REPL.
  
 I think I should require it directly without defining a ns, right?

 user= (:require [theshire.models.element :as model])

 CompilerException java.lang.ClassNotFoundException: 
 theshire.models.element, 
 compiling/private/var/folders/r_/8jpc8nbx6x1g6gq3r1djmr90gp/T/form-init3432138121469073363.clj:1:1)

 what am I doing wrong? 


 TIA,

   ngw


-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: require library from inside the REPL

2013-12-18 Thread Nicholas Wieland
Damn, you are right :)
Still, it's no good, and I don't understand why...

user= (require '[theshire.models.element :as model])

Exception lib names inside prefix lists must not contain periods
 clojure.core/load-lib (core.clj:5359)


  ngw




On Wed, Dec 18, 2013 at 3:21 PM, Thomas Heller th.hel...@gmail.com wrote:

 The (:require ...) form is specific to the (ns) macro, in the REPL you'd
 invoke the require function directly.

 (require '[theshire.models.element :as model])

 HTH,
 /thomas


 On Wednesday, December 18, 2013 3:14:14 PM UTC+1, Nicholas Wieland wrote:

 https://gist.github.com/ngw/f8ef003532c8d712dd9b
 I'm having troubles using the create function from inside the REPL.

 I think I should require it directly without defining a ns, right?

 user= (:require [theshire.models.element :as model])

 CompilerException java.lang.ClassNotFoundException:
 theshire.models.element, compiling/private/var/folders/r_/
 8jpc8nbx6x1g6gq3r1djmr90gp/T/form-init3432138121469073363.clj:1:1)

 what am I doing wrong?


 TIA,

   ngw

  --
 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: require library from inside the REPL

2013-12-18 Thread Tim Visher
You have a `'` in your ns macro that shouldn't be there.

You're ns form should be:

```
(ns theshire.models.element
  (:require [clojurewerkz.welle.core :as wc]
[clojurewerkz.welle.buckets :as wb]
[clojurewerkz.welle.kv :as kv]
[ring.util.codec :refer [url-encode]]))
```

There's nothing technically wrong with the `use` section, but it's
discouraged at this point.

On Wed, Dec 18, 2013 at 9:28 AM, Nicholas Wieland n...@nofeed.org wrote:
 Damn, you are right :)
 Still, it's no good, and I don't understand why...

 user= (require '[theshire.models.element :as model])

 Exception lib names inside prefix lists must not contain periods
 clojure.core/load-lib (core.clj:5359)


   ngw




 On Wed, Dec 18, 2013 at 3:21 PM, Thomas Heller th.hel...@gmail.com wrote:

 The (:require ...) form is specific to the (ns) macro, in the REPL you'd
 invoke the require function directly.

 (require '[theshire.models.element :as model])

 HTH,
 /thomas


 On Wednesday, December 18, 2013 3:14:14 PM UTC+1, Nicholas Wieland wrote:

 https://gist.github.com/ngw/f8ef003532c8d712dd9b

 I'm having troubles using the create function from inside the REPL.

 I think I should require it directly without defining a ns, right?

 user= (:require [theshire.models.element :as model])

 CompilerException java.lang.ClassNotFoundException:
 theshire.models.element,
 compiling/private/var/folders/r_/8jpc8nbx6x1g6gq3r1djmr90gp/T/form-init3432138121469073363.clj:1:1)

 what am I doing wrong?


 TIA,

   ngw

 --
 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


 --
 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.