My first attempt at a macro: can not recognize symbol

2013-12-10 Thread larry google groups
I am working on web software where admins will be using HTML forms to update data in a MongoDb database. I decided to use Lamina to off-load the work to the background. There are several operations that need to happen: updates, deletions, etc, and I thought I'd put each on a different channel.

Re: My first attempt at a macro: can not recognize symbol

2013-12-10 Thread larry google groups
-case for macros. You'd probably be better defining a map with keys for :worker, :channel, etc. Either that or a protocol. - James On 10 December 2013 17:42, larry google groups lawrenc...@gmail.comjavascript: wrote: I am working on web software where admins will be using HTML forms

Re: My first attempt at a macro: can not recognize symbol

2013-12-10 Thread larry google groups
Thanks much. Your approach is much better than mine. I was looking for a good excuse to use a macro, but I suppose I will postpone that for another day. On Tuesday, December 10, 2013 2:03:07 PM UTC-5, James Reeves wrote: On 10 December 2013 18:24, larry google groups lawrenc

When does clojure.lang.PersistentArrayMap become clojure.lang.PersistentHashMap

2013-12-22 Thread larry google groups
I am surprised that a map literal is clojure.lang.PersistentArrayMap but as soon as I assign it to a var, it becomes clojure.lang.PersistentHashMap. Are there any rules for being able to predict when these conversions occur? user (type {}) clojure.lang.PersistentArrayMap user (type {:what

Re: When does clojure.lang.PersistentArrayMap become clojure.lang.PersistentHashMap

2013-12-22 Thread larry google groups
is that handles the conversion. I don't care if the return type is clojure.lang.PersistentArrayMap or clojure.lang.PersistentHashMap, all I want is it for it be consistently one or the other. On Sunday, December 22, 2013 2:31:45 PM UTC-5, larry google groups wrote: I am surprised

Re: When does clojure.lang.PersistentArrayMap become clojure.lang.PersistentHashMap

2013-12-22 Thread larry google groups
Hmm, I see. get-distinct was returning an empty lazyseq, which apparently made the difference. On Sunday, December 22, 2013 2:56:01 PM UTC-5, larry google groups wrote: Hmm, the different return types seem tied to the 2 different functions being called, but both functions have the same

How do I fix *warn-on-reflextion* warnings in 3rd party libraries?

2013-12-22 Thread larry google groups
I know this has been discussed before but I could not find anything like a canonical answer via Google. I just set to :warn-on-reflection true in my project.clj and now I get the following warnings. How do I fix the warnings that are in 3rd party libraries? How do I add type hints to code

Re: How do I fix *warn-on-reflextion* warnings in 3rd party libraries?

2013-12-23 Thread larry google groups
Sean, Thank you much. I do understand that Clojure is not a *statically typed language, *but it seems like it should be possible to deal with these reflexion issues when someone needs to. In my company we had a Scala versus Clojure debate and there was a vocal crowd that felt we should use

Re: When does clojure.lang.PersistentArrayMap become clojure.lang.PersistentHashMap

2013-12-23 Thread larry google groups
to enforce that a map is returned, enforce that the return is a subtype of java.util.Map rather than checking for a specific concrete class of map. On Sun, Dec 22, 2013 at 3:07 PM, larry google groups lawrenc...@gmail.comjavascript: wrote: Hmm, I see. get-distinct was returning an empty

Re: When does clojure.lang.PersistentArrayMap become clojure.lang.PersistentHashMap

2013-12-23 Thread larry google groups
$fetch.invoke(secretary.clj:327) How else do I find what interfaces the return value might be implementing? On Monday, December 23, 2013 10:04:54 PM UTC-5, larry google groups wrote: enforce that the return is a subtype of java.util.Map rather than checking for a specific concrete class

is there a tutorial about working at the REPL?

2013-12-28 Thread larry google groups
I have been working with Clojure now some of the time for the last 18 months, so I am no longer a complete noob. But I still have many questions about how to work at the REPL. In particular, I don't understand how the REPL interacts with the class path. I have an app that is working. When I

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread larry google groups
What still scars me in terms of incorporating Clojure as a language of choice in more complicated projects I work on in my other life, is the error reporting facility. The errors sometimes might as well just say 'I just cannot run!'. It would be nice if there was some facility to

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-28 Thread larry google groups
I like this: (defmacro dump-locals [] `(clojure.pprint/pprint ~(into {} (map (fn [l] [`'~l l]) (reverse (keys env)) Slingshot also allows one to throw+ an object that is full of local information: https://github.com/scgilardi/slingshot And Michael Drogalis's library Dire

Why is add-watch still in alpha?

2013-12-29 Thread larry google groups
add-watch was alpha in Clojure 1.2: http://clojuredocs.org/clojure_core/1.2.0/clojure.core/add-watch it is still alpha now, in Clojure 1.5: http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/add-watch I am curious what the plan is for add-watch? I was just reading this:

Re: is there a tutorial about working at the REPL?

2013-12-29 Thread larry google groups
If it can't find the file, `clojure.java.io/resource`http://clojure.java.io/resource returns nil; and (slurp nil) throws an IllegalArgumentException, which doesn't seem to be the error you're getting. Thanks for that. But the app has no problem reading the schema.edn file when I start

NoClassDefFoundError after I import with use on the repl?

2014-02-06 Thread larry google groups
I imagine this question has been asked a million times before, but I can not find the answer. I was looking at Raynes/fs library: https://github.com/Raynes/fs/blob/master/src/me/raynes/fs.clj I wanted to check and see if iterate-dir returned a seq of strings (paths) or a seq of File objects

Re: NoClassDefFoundError after I import with use on the repl?

2014-02-07 Thread larry google groups
, 2014 at 9:11 PM, larry google groups lawrenc...@gmail.comjavascript: wrote: I imagine this question has been asked a million times before, but I can not find the answer. I was looking at Raynes/fs library: https://github.com/Raynes/fs/blob/master/src/me/raynes/fs.clj I wanted

What is # doing in #+cljs [cljs.reader :as reader]

2014-02-07 Thread larry google groups
I am looking here: https://github.com/jkk/formative/blob/master/src/formative/parse.cljx and I see this line: #+cljs [cljs.reader :as reader] So I look here to see what the # is doing: http://clojure.org/reader and I read: Dispatch (#) The dispatch macro causes the reader to use a reader

Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
I have no background with Java so I tend to suffer pain when dealing with it. I am trying to create a thumbnail for an image, but my code dies on the :post assertion of this function: (defn get-file-as-image [filename] {:pre [(= (type filename) java.lang.String) (fs/exists?

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
for class java.lang.Class I don't get why ImageIO is java.lang.Class after I imported it. On Thursday, February 27, 2014 3:09:53 PM UTC-5, larry google groups wrote: I have no background with Java so I tend to suffer pain when dealing with it. I am trying to create a thumbnail for an image

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
Ah, I see what happened. There was a Microsoft Word document in my folder of images. It was causing the problems. I had no error handling for non-images. On Thursday, February 27, 2014 3:52:09 PM UTC-5, Aaron Cohen wrote: On Thu, Feb 27, 2014 at 3:44 PM, larry google groups lawrenc

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
:09:10 PM UTC-5, larry google groups wrote: Ah, I see what happened. There was a Microsoft Word document in my folder of images. It was causing the problems. I had no error handling for non-images. On Thursday, February 27, 2014 3:52:09 PM UTC-5, Aaron Cohen wrote: On Thu, Feb 27, 2014

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
to native writeImage at com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeImage(Native Method) which is surprising since the Format string, without the period, should be more correct. On Thursday, February 27, 2014 4:47:31 PM UTC-5, larry google groups wrote: Hmm, I made it a little

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
)); None of those formatting strings have a period in them. And yet when I remove the period from my extension, I get an error. And even with it, nothing happens and nothing gets written to disk. On Thursday, February 27, 2014 5:04:50 PM UTC-5, larry google groups wrote: I wanted to see what

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
, February 27, 2014 4:47:31 PM UTC-5, larry google groups wrote: Hmm, I made it a little further. Now I am trying to write a thumbnail to disk. I have copied the code from StackOverflow. I am using this function: (defn make-thumbnail [filename path-to-new-file-including-file-name width

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
the file you read (before resizing) and make sure that it's actually loaded correctly? On Thu, Feb 27, 2014 at 5:04 PM, larry google groups lawrenc...@gmail.comjavascript: wrote: I wanted to see what Format strings I am allowed, so at the repl: user (import 'javax.imageio.ImageIO

Re: Why do I have to register an ImageReader?

2014-02-27 Thread larry google groups
quality options. As for why your code isn't working, it's hard to say. Can you try just writing out the file you read (before resizing) and make sure that it's actually loaded correctly? On Thu, Feb 27, 2014 at 5:04 PM, larry google groups lawrenc...@gmail.comjavascript: wrote: I

why would I use uberwar instead of uberjar?

2013-01-22 Thread larry google groups
I know very little about the JVM eco-system. I have been using lein uberjar for all of my webapps, and it has worked great (Jetty/Ring). Why would I use uberwar? What are the advantages? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

what does is expect in tests?

2013-01-25 Thread larry google groups
I thought this test would assure me that my test data contains at least one question: (deftest is-there-at-least-one-question (testing We want to see if there is at least one question in memory.] (let [first-question (get-in @um/interactions [:questions])] (println (apply str

SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread larry google groups
I have a small clojure app (maybe 700 lines of code). I start it at the terminal and it runs for 10 minutes or so. Then, sometimes, it produces this error: # A fatal error has been detected by the Java Runtime Environment: # # SIGBUS (0xa) at pc=0x00010e34815e, pid=45108, tid=22787 # #

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread larry google groups
/clojure/MIKccMX9gvk/gZYA_24d0BwJ On Mon, Jan 28, 2013 at 6:59 PM, larry google groups lawrenc...@gmail.comjavascript: wrote: I have a small clojure app (maybe 700 lines of code). I start it at the terminal and it runs for 10 minutes or so. Then, sometimes, it produces this error

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread larry google groups
arg: -XX:-UseCompressedOops more info here: https://groups.google.com/d/msg/clojure/MIKccMX9gvk/gZYA_24d0BwJ On Mon, Jan 28, 2013 at 6:59 PM, larry google groups lawrenc...@gmail.comjavascript: wrote: I have a small clojure app (maybe 700 lines of code). I start it at the terminal

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread larry google groups
Ah, stupid of me. No, I'm not using the 1.5 features. This project is all 1.4. W dniu poniedziałek, 28 stycznia 2013 14:51:02 UTC-5 użytkownik Jim foo.bar napisał: On 28/01/13 18:58, larry google groups wrote: Interesting. My app leans heavily on (reduce). I think in some places I

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread larry google groups
: I've encountered errors like this when running where .jar files for the project were being loaded from an NFS share. Do you have that in your environment? The solution is to load the .jars from a local directory instead. On Monday, January 28, 2013 12:59:12 PM UTC-5, larry google groups

Re: is intellij idea a good ide for clojure development?

2013-01-28 Thread larry google groups
You should keep an eye on LightTable. It is still in very early development, but at some point this year it may well become the best environment to use for Clojure coding: http://www.chris-granger.com/2012/11/05/meet-the-new-light-table/ On Jan 28, 6:37 am, Dennis Haupt d.haup...@gmail.com

Exception in thread Thread-4 java.lang.NoClassDefFoundError:

2013-01-28 Thread larry google groups
Maybe someone can tell me where I went wrong on this one. I have an app. Written with Clojure 1.4. At first the app was very small, so I put all the code into core.clj. When I got to about 500 or 600 lines of code, core.clj was too big, so I started to break it up. There were some

Re: Exception in thread Thread-4 java.lang.NoClassDefFoundError:

2013-01-29 Thread larry google groups
wtorek, 29 stycznia 2013 02:13:20 UTC-5 użytkownik AtKaaZ napisał: On Tue, Jan 29, 2013 at 8:03 AM, larry google groups lawrenc...@gmail.comjavascript: wrote: Maybe someone can tell me where I went wrong on this one. I have an app. Written with Clojure 1.4. At first the app was very

Re: Exception in thread Thread-4 java.lang.NoClassDefFoundError:

2013-01-29 Thread larry google groups
/users/32174/julien-chastang Julien Chastang http://stackoverflow.com/users/32174/julien-chastang On Tue, Jan 29, 2013 at 8:03 AM, larry google groups lawrenc...@gmail.com javascript: wrote: Maybe someone can tell me where I went wrong on this one. I have an app. Written with Clojure 1.4

Re: Exception in thread Thread-4 java.lang.NoClassDefFoundError:

2013-01-29 Thread larry google groups
Chastang http://stackoverflow.com/users/32174/julien-chastang On Tue, Jan 29, 2013 at 8:03 AM, larry google groups lawrenc...@gmail.comjavascript: wrote: Maybe someone can tell me where I went wrong on this one. I have an app. Written with Clojure 1.4. At first the app was very small, so

do background threads sometimes swallow exceptions?

2013-01-29 Thread larry google groups
I think someone on this mailist recently said that an exception that occurs in a thread is sometimes lost? That is, even if I put in a lot of pprint statements or println statements* or (stack/print-stack-trace e) expressions, and I just want it to show up in terminal, so I can debug it, but

Re: do background threads sometimes swallow exceptions?

2013-01-29 Thread larry google groups
Klishin napisał: 2013/1/30 larry google groups lawrenc...@gmail.com javascript: but if the exception happens in a background thread, it gets lost? If this is true, what is the best way to find these errors? They are not lost. Unhandled exceptions cause threads to terminate immediately

why did lein just download Clojure 1.5?

2013-01-29 Thread larry google groups
Very strange. I just switched back to my home computer. I wanted to get all the work I had done at work this last week, so I did git pull origin master to pull it down from github. I have not used my home computer in a week. Then I ran lein uberjar: lein uberjar Retrieving

strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups
I wrote a small Clojure app (1.4) and then bundled it up with lein uberjar. This app uses Ring and Jetty so it handles the webserver itself. On my local machine, a Macintosh, in the terminal, I can start it with: java -jar kiosk.clj 3 This works fine. I also moved to another server,

Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups
with the classpath? In the past, I was always the one to install the jvm, and I ran the uberjars from my directory. But maybe something needs to be made more specific for a sysadmin to run this in any directory they like? W dniu czwartek, 31 stycznia 2013 13:06:26 UTC-5 użytkownik larry google

Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups
More info about my problem: java version 1.7.0_11 Java(TM) SE Runtime Environment (build 1.7.0_11-b21) Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode) W dniu czwartek, 31 stycznia 2013 13:19:34 UTC-5 użytkownik larry google groups napisał: This does not seem to apply

Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups
Any suggestion, no matter how far fetched, will be welcome. I am ignorant about the JVM so I am having trouble debugging this problem. W dniu czwartek, 31 stycznia 2013 13:22:20 UTC-5 użytkownik larry google groups napisał: More info about my problem: java version 1.7.0_11 Java(TM) SE

Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups
) (wrap-keyword-params) (wrap-nested-params) (wrap-params))) W dniu czwartek, 31 stycznia 2013 15:01:07 UTC-5 użytkownik larry google groups napisał: Any suggestion, no matter how far fetched, will be welcome. I am ignorant about the JVM so I am having trouble debugging

Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups
like your idea about the encoding error. He is about to test that idea. W dniu czwartek, 31 stycznia 2013 15:16:37 UTC-5 użytkownik Marshall Bockrath-Vandegrift napisał: larry google groups lawrenc...@gmail.com javascript: writes: Any suggestion, no matter how far fetched, will be welcome

Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups
użytkownik Marshall Bockrath-Vandegrift napisał: larry google groups lawrenc...@gmail.com javascript: writes: Any suggestion, no matter how far fetched, will be welcome. I am ignorant about the JVM so I am having trouble debugging this problem. java -jar kiosk.clj 3

is there a way to get the arguments to a function from outside the function?

2013-02-04 Thread larry google groups
I have an app. I would like to have debug mode and a production mode. In the debug mode, I would like it if the arguments to each function were pprint'ed to the terminal. Is there anyway to do this gracefully. I started adding pprint to all of my functions, and then I thought There has got to

CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-06 Thread larry google groups
I created a web app using Ring, Jetty, Enlive, Compojure. At the end, I bundled everything together by running the command lein uberjar. The resulting file was 21 megs. I scp the file to the server, then I ssh to the server. I start a screen session. Inside the screen session I type : java

Re: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-06 Thread larry google groups
) On Wednesday, February 6, 2013 10:10:25 AM UTC-5, larry google groups wrote: I created a web app using Ring, Jetty, Enlive, Compojure. At the end, I bundled everything together by running the command lein uberjar. The resulting file was 21 megs. I scp the file to the server, then I

Re: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-06 Thread larry google groups
% 2828 98% 2914 99% 3008 100% 3195 (longest request) On Wednesday, February 6, 2013 10:53:50 AM UTC-5, larry google groups wrote: I logged into my personal server (in the Rackspace cloud, what used to be Slicehost) and blasted the CSS file with 10,000 requests. There were 0

Re: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-06 Thread larry google groups
)? On Wednesday, February 6, 2013 11:17:03 AM UTC-5, larry google groups wrote: I hit the app itself with Apache Benchmark. The speed is fairly bad. This is a small app which serves everything from memory -- there is no database to slow things down. I am aware that I made several mistakes

Re: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-07 Thread larry google groups
for your session cookies, which would mean your sessions will time out in 90 seconds. Is that what you want? Also: (GET /foo request (foo request)) Is equivalent to: (GET /foo [] foo) - James On 6 February 2013 15:10, larry google groups lawrenc...@gmail.comjavascript: wrote

Re: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-07 Thread larry google groups
cookies, which would mean your sessions will time out in 90 seconds. Is that what you want? Also: (GET /foo request (foo request)) Is equivalent to: (GET /foo [] foo) - James On 6 February 2013 15:10, larry google groups lawrenc...@gmail.comjavascript: wrote: I created

Re: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-07 Thread larry google groups
Ah, sorry, that does seem to have worked (I think I forgot to recompile). What do you think the problem was? On Thursday, February 7, 2013 10:41:00 AM UTC-5, larry google groups wrote: About this: (defroutes app-routes (ANY / request (index request)) ;; rest of routes (GET /finish

Re: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-07 Thread larry google groups
Any reason this would work on all browsers except IE? On Thursday, February 7, 2013 10:45:02 AM UTC-5, larry google groups wrote: Ah, sorry, that does seem to have worked (I think I forgot to recompile). What do you think the problem was? On Thursday, February 7, 2013 10:41:00 AM UTC-5

Re: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-07 Thread larry google groups
Okay, got all this working. Thank you very much for your tip. Can you say what you think the problem was? On Thursday, February 7, 2013 11:16:46 AM UTC-5, larry google groups wrote: Any reason this would work on all browsers except IE? On Thursday, February 7, 2013 10:45:02 AM UTC-5

Re: CSS sometimes disappears in uberjar web app using wrap-resource

2013-02-07 Thread larry google groups
Fantastic insight. Thanks much, it is working great now on all browsers (the bug had mostly appeared on IE). On Thursday, February 7, 2013 11:48:50 AM UTC-5, James Reeves wrote: On 7 February 2013 16:37, larry google groups lawrenc...@gmail.comjavascript: wrote: Okay, got all

regarding Ring, am I reinventing the wheel?

2013-02-15 Thread larry google groups
I have been working with Clojure for a few months now. I am now more familiar with it then I was even 3 months ago. I am now going back through some of the early code I wrote, and I see a lot of redundancy and mistakes. In particular, I notice this function that I wrote to handle the request map

Can I embed sqlite inside of an uberjar file?

2013-02-15 Thread larry google groups
I am thinking about what they did at Hotelicopter (now renamed RoomKey) -- where they embed a whole snapshot of Solr, and all the data, inside their uberwar files, so that the uberwar file has no outside dependencies, not even a database. The CTO of RoomKey has talked about how you could wait 10

Re: why did lein just download Clojure 1.5?

2013-02-19 Thread larry google groups
:16 PM, larry google groups lawrencecloj...@gmail.com wrote: Very strange. I just switched back to my home computer. I wanted to get all the work I had done at work this last week, so I did git pull origin master to pull it down from github. I have not used my home computer

Re: why did lein just download Clojure 1.5?

2013-02-19 Thread larry google groups
on irc and it was something in your project*s*.clj but I can't remember exactly, if you want you can post its contents... Cheers On Tue, Feb 19, 2013 at 5:49 PM, larry google groups lawrencecloj...@gmail.com wrote: Thanks for the suggestion. I run lein deps :tree but I do not see

Re: why did lein just download Clojure 1.5?

2013-02-19 Thread larry google groups
On Feb 19, 12:25 pm, Phil Hagelberg p...@hagelb.org wrote: larry google groups writes: Thanks for the suggestion. I run lein deps :tree but I do not see Clojure 1.5 listed as a dependency anywhere. But if I run: Some unfortunate dependency is declaring a version range dependency

kerodon tests explode on lazyseq (session app)

2013-02-19 Thread larry google groups
I was trying to follow this video, which adds some nice tests for Friend: http://www.clojurewebdevelopment.com/videos/friend-interactive-form But Kerodon gives me an error, and points to line 13 of my test code: ERROR in (anyone-can-view-frontpage) (impl.clj:73) Uncaught exception, not in

Re: why did lein just download Clojure 1.5?

2013-02-19 Thread larry google groups
]                   [lein-catnip 0.5.0]]} :dev {:dependencies [[clj-ns-browser 1.2.0]                       [org.clojure/tools.trace 0.7.5]]}                       } On Tue, Feb 19, 2013 at 7:55 PM, larry google groups lawrencecloj...@gmail.com wrote: I think we solved this once

Re: kerodon tests explode on lazyseq (session app)

2013-02-19 Thread larry google groups
) On Feb 19, 2:24 pm, larry google groups lawrencecloj...@gmail.com wrote: I was trying to follow this video, which adds some nice tests for Friend: http://www.clojurewebdevelopment.com/videos/friend-interactive-form But Kerodon gives me an error, and points to line 13 of my test code: ERROR

Re: kerodon tests explode on lazyseq (session app)

2013-02-20 Thread larry google groups
clojure.lang.RT.seqFrom (RT.java:505) clojure.lang.RT.seq (RT.java:486) clojure.core/seq (core.clj:133) clojure.core/dorun (core.clj:2780) random.learning.backtick.backtick1/eval2879 (NO_SOURCE_FILE:1) On Tue, Feb 19, 2013 at 11:30 PM, larry google groups lawrenc

Re: kerodon tests explode on lazyseq (session app)

2013-02-20 Thread larry google groups
)     clojure.core$doall.invoke (core.clj:2741)     mpdv_clojure.core_test/fn (core_test.clj:13) On Feb 19, 2:24 pm, larry google groups lawrencecloj...@gmail.com wrote: I was trying to follow this video, which adds some nice tests for Friend: http://www.clojurewebdevelopment.com/videos

how do I reference a var that is in my core namespace?

2013-02-21 Thread larry google groups
I wanted to have some functions run when an app starts, and I wanted this to be configurable, because I plan to use the same architecture for several apps. So I thought I could have the function names as strings inside of maps inside of a set (that I sort), in a config file. And I thought I

Re: how do I reference a var that is in my core namespace?

2013-02-21 Thread larry google groups
trying to do something obvious with it. On Thu, Feb 21, 2013 at 10:30 AM, larry google groups lawrenc...@gmail.com javascript: wrote: I wanted to have some functions run when an app starts, and I wanted this to be configurable, because I plan to use the same architecture for several

how do I include a single class file from someone else's library?

2013-02-22 Thread larry google groups
I am ignorant of the JVM, and of Java, so I am sure this is a dumb question. I need to post to the Omniture API. They offer some sample code here: https://developer.omniture.com/en_US/blog/calling-rest-api-in-java That code depends on a Base64Coder class which they offer in a zip file. I

Re: how do I include a single class file from someone else's library?

2013-02-22 Thread larry google groups
/core.clj:130) On Friday, February 22, 2013 4:18:00 PM UTC-5, larry google groups wrote: I am ignorant of the JVM, and of Java, so I am sure this is a dumb question. I need to post to the Omniture API. They offer some sample code here: https://developer.omniture.com/en_US/blog/calling-rest-api

Re: how do I include a single class file from someone else's library?

2013-02-22 Thread larry google groups
Ah, I see. This is a polygot project, which Leiningen describes here: https://github.com/technomancy/leiningen/blob/stable/doc/MIXED_PROJECTS.md That worked for me. Leiningen saves the day again. On Friday, February 22, 2013 4:25:04 PM UTC-5, larry google groups wrote: When I just do

Re: how do I include a single class file from someone else's library?

2013-02-22 Thread larry google groups
of garbage? On Friday, February 22, 2013 5:01:15 PM UTC-5, larry google groups wrote: Ah, I see. This is a polygot project, which Leiningen describes here: https://github.com/technomancy/leiningen/blob/stable/doc/MIXED_PROJECTS.md That worked for me. Leiningen saves the day again

Re: how do I include a single class file from someone else's library?

2013-02-22 Thread larry google groups
I see this sentence: Having one source root contain another (e.g. src and src/java) can cause obscure problems. but I have: src/ java/ mpdv/ Which I assume is what Leinengen is asking for. On Friday, February 22, 2013 5:23:28 PM UTC-5, larry google groups wrote: Maybe I spoke

Re: how do I include a single class file from someone else's library?

2013-02-22 Thread larry google groups
, February 22, 2013 5:28:17 PM UTC-5, larry google groups wrote: I see this sentence: Having one source root contain another (e.g. src and src/java) can cause obscure problems. but I have: src/ java/ mpdv/ Which I assume is what Leinengen is asking for. On Friday, February 22

Re: how do I include a single class file from someone else's library?

2013-02-22 Thread larry google groups
the Clojure root. Move java to top-level. On Friday, February 22, 2013 11:28:17 PM UTC+1, larry google groups wrote: I see this sentence: Having one source root contain another (e.g. src and src/java) can cause obscure problems. but I have: src/ java/ mpdv/ Which I assume

Re: how do I include a single class file from someone else's library?

2013-02-22 Thread larry google groups
I don't get it. Whats the fully qualified name of a standalone file that i have locally? On Friday, February 22, 2013 6:03:13 PM UTC-5, AtKaaZ wrote: use fully qualified name for that class, I think? On Fri, Feb 22, 2013 at 11:50 PM, larry google groups lawrenc...@gmail.com javascript

Re: how do I include a single class file from someone else's library?

2013-02-22 Thread larry google groups
, February 22, 2013 6:14:42 PM UTC-5, larry google groups wrote: I don't get it. Whats the fully qualified name of a standalone file that i have locally? On Friday, February 22, 2013 6:03:13 PM UTC-5, AtKaaZ wrote: use fully qualified name for that class, I think? On Fri, Feb 22, 2013 at 11

Re: how do I include a single class file from someone else's library?

2013-02-22 Thread larry google groups
Oh, I see, the file declared a package. This worked: (com.omniture.security Base64Coder)) The Java stuff still confuses me. Thanks for all the help. On Friday, February 22, 2013 6:20:15 PM UTC-5, larry google groups wrote: this: (:import (Base64Coder)) gets me: Caused

How does clj-http work regarding https?

2013-02-23 Thread larry google groups
This might be a dumb How does the Internet work kind of question. I have been asked to pull data from Omniture, using the Omniture API. I thought this would take me an hour, but I've been working on this for 3 days now. I keep getting authentication errors. I became curious about exactly what

Re: How does clj-http work regarding https?

2013-02-23 Thread larry google groups
=\UsernameToken\,   xserver www336,   content-length 46,   content-type application/json,   connection close},  :body {\error\:\Unable to validate authentication.\}} nil Request: org.apache.http.entity.StringEntity On Feb 23, 4:18 pm, larry google groups lawrencecloj...@gmail.com wrote: This might

Re: How does clj-http work regarding https?

2013-02-23 Thread larry google groups
...@jonah.com wrote: Try adding :insecure? true to the map. Charles dynamically generates a cert pretending to be the target host when acting as an ssl proxy, and clj-http probably has to be told to accept it. On Sat, Feb 23, 2013 at 4:18 PM, larry google groups lawrencecloj...@gmail.com

Re: How does clj-http work regarding https?

2013-02-23 Thread larry google groups
Any idea why a single call to clj-http/post causes 4 transactions to appear in Charles? On Feb 23, 5:47 pm, larry google groups lawrencecloj...@gmail.com wrote: Try adding :insecure? true to the map. Charles dynamically generates a cert pretending to be the target host when acting

Re: How does clj-http work regarding https?

2013-02-23 Thread larry google groups
)                                                     (if ( try-count 4) false true))}) from https://github.com/dakrone/clj-http On Sat, Feb 23, 2013 at 5:57 PM, larry google groups lawrencecloj...@gmail.com wrote: Any idea why a single call to clj-http/post causes 4 transactions

Re: How does clj-http work regarding https?

2013-02-23 Thread larry google groups
in Charles, you'll need to do that, tell it to ssl proxy the domain api2.omniture.com Described in a little more detail here: http://www.charlesproxy.com/documentation/proxying/ssl-proxying/ On Sat, Feb 23, 2013 at 5:47 PM, larry google groups lawrencecloj...@gmail.com wrote: Try

Re: How does clj-http work regarding https?

2013-02-23 Thread larry google groups
:52 pm, larry google groups lawrencecloj...@gmail.com wrote: Described in a little more detail here: http://www.charlesproxy.com/documentation/proxying/ssl-proxying/ Thank you, that is a huge help. I am finding it is a real headache to use several new technologies, all at once. On Feb 23

how can I ensure a dosync is finished?

2013-02-26 Thread larry google groups
I would like to connect to MongoDb with the following code, but I am worried about the side-effecting code that comes right after the dosync: (def which-database-to-use (ref false)) (def which-collection-to-use (ref false)) (defn connect-to-server [] (mg/connect!)) (defn set-database-to-use

how to get SHA1 of a string?

2013-03-04 Thread larry google groups
I have been having problems making an API call to Omniture. I have exchanged a dozen emails with a developer at Omniture, and he gave me the impression that I was constructing my security codes incorrectly. So now I am confronting my ignorance over how Java handles certain conversions. The

Re: how to get SHA1 of a string?

2013-03-04 Thread larry google groups
: (org.apache.commons.codec.binary Base64) (org.apache.commons.codec.digest DigestUtils) If I am doing something fundamentally wrong, then I doubt I'll make progress simply by using a different library. --- lawrence On Mar 4, 10:53 am, Michael Klishin michael.s.klis...@gmail.com wrote: 2013/3/4 larry google

Re: how to get SHA1 of a string?

2013-03-04 Thread larry google groups
...@gmail.com wrote: 2013/3/4 larry google groups lawrencecloj...@gmail.com Any suggestions? You can usehttps://github.com/clojurewerkz/support/blob/master/src/clojure/cloju... note that you need to concatenate a byte array and bytes from a string first. -- MK http://github.com

Re: how to get SHA1 of a string?

2013-03-04 Thread larry google groups
/getInstance sha1) (.getBytes digest-as-string)) So the SHA1 is given a Byte array. This fails to give me a correctly formatted digest. On Mar 4, 11:04 am, Michael Klishin michael.s.klis...@gmail.com wrote: 2013/3/4 larry google groups lawrencecloj...@gmail.com I appreciate your suggestion, but I

why do I get Null pointer on this GMT SimpleDateFormat?

2013-03-04 Thread larry google groups
I need to get a GMT date. I found this page on StackOverflow: http://stackoverflow.com/questions/308683/how-can-i-get-the-current-date-and-time-in-utc-or-gmt-in-java It gives this example: SimpleDateFormat dateFormatGmt = new SimpleDateFormat(-MMM-dd HH:mm:ss);

Re: datomic question

2013-03-04 Thread larry google groups
This page: http://clojure.org/reader Offers this explanation of what the # character does: Dispatch (#) The dispatch macro causes the reader to use a reader macro from another table, indexed by the character following #: #{} - see Sets above Regex patterns (#pattern) A regex pattern is read

Re: Interesting Light Table post

2013-03-04 Thread larry google groups
I was thinking a lot after reading the thread Why is this so difficult that maybe what we need is a dedicated IDE, something that's built with the clojure workflow in mind, The Clojure workflow, as it has evolved in this community, has mostly been repl combined with a text editor. And that is

Re: Interesting Light Table post

2013-03-04 Thread larry google groups
to the clojure community to create the better experience, at this point I'm just very happy to have something like this, great job guys! On Mon, Mar 4, 2013 at 12:02 PM, larry google groups lawrencecloj...@gmail.com wrote: I was thinking a lot after reading the thread Why is this so

Re: how to get SHA1 of a string?

2013-03-04 Thread larry google groups
, larry google groups lawrencecloj...@gmail.com wrote: expects its argument to be a byte array: http://docs.oracle.com/javase/6/docs/api/java/security/MessageDigest which can be obtained from a string using String#getBytes. I appreciate your suggestion. For most of the attempts

Re: how to get SHA1 of a string?

2013-03-04 Thread larry google groups
, 2013 at 11:12 AM, larry google groups lawrencecloj...@gmail.com wrote: expects its argument to be a byte array: http://docs.oracle.com/javase/6/docs/api/java/security/MessageDigest which can be obtained from a string using String#getBytes. I appreciate your suggestion. For most

  1   2   3   4   >