Re: boot(2) question

2015-06-18 Thread Haim Ashkenazi
Or: > > (dorun (map deref results)) > > - James > > On 18 June 2015 at 12:57, Haim Ashkenazi wrote: > >> Thanks Luc, >> >> This was a simplification if what I really have :) I actually need the >> result. The actual code was something like: >> &g

Re: boot(2) question

2015-06-18 Thread Haim Ashkenazi
one > > On Jun 18, 2015, at 07:51, Haim Ashkenazi > wrote: > > Hi, > > I'm trying boot scripting capabilities so I have the following file: > > #!/usr/bin/env boot > (set-env! > :dependencies '[[org.clojure/clojure "1.6.0"]]) > >

boot(2) question

2015-06-18 Thread Haim Ashkenazi
Hi, I'm trying boot scripting capabilities so I have the following file: #!/usr/bin/env boot (set-env! :dependencies '[[org.clojure/clojure "1.6.0"]]) (defn -main [] (println "before") (for [s ["one" "two" "three"]] (do (spit "output" s :append true) (println s))) (print

Re: Namespace metadata

2014-10-29 Thread Haim Ashkenazi
HOT but the correct metadata when using master w/ > clj-130 patch. > > Haim Ashkenazi writes: > > > Thanks Nicola, > > > > I don't think this is the reason. clojure.test is also explicitly adding > > docs. Also I encountered it in riemann in a namespace that is not

Re: Namespace metadata

2014-10-29 Thread Haim Ashkenazi
wse/CLJ-130 > > Haim Ashkenazi writes: > > > Sorry, I pressed "send" too soon :) Here it is from the start: > > > > > > When I first wrote ayler <https://github.com/babysnakes/ayler/wiki> (a > > simple namespace browser) I used to get the doc for

Re: Namespace metadata

2014-10-29 Thread Haim Ashkenazi
ure.test source does contain metadata doc. Did something change in the way we access namespace metadata? Thanks in advance Haim Ashkenazi On Wed, Oct 29, 2014 at 2:38 PM, Haim Ashkenazi wrote: > Hi > > When I first wrote ayler <https://github.com/babysnakes/ayler/wiki> (a > simple

Namespace metadata

2014-10-29 Thread Haim Ashkenazi
Hi When I first wrote ayler (a simple namespace browser) I used to get the doc for namespace by running something like this: (:doc (meta (find-ns 'some.namespace))) It used to work on all namespaces (IIRC I was working on clojure 1.4). Lately I noticed

How can I mimic load testing

2014-09-30 Thread Haim Ashkenazi
Hi I’m trying to mimic *ab* load testing (I want to see the actual errors, not just the error count) so I created the following script: (ns test-recycle.core (:require [clj-http.client :as http]) (:import (java.util.concurrent Executors))) (def url "http://somehost/test.js";) (def errors (at

Re: How would I write it with concurrency

2014-02-10 Thread Haim Ashkenazi
s > happening below. > > > On Mon, Feb 10, 2014 at 4:15 PM, Haim Ashkenazi > wrote: > >> Hi JIm, >> >> The reason I don't use repeatedly is because (unless I'm mistaken) I >> would get a list of 5 outputs of session (file lists of between one

Re: How would I write it with concurrency

2014-02-10 Thread Haim Ashkenazi
, why don't you just do `(take 5 (repeatedly > session))` ??? > with regards to concurrency I am not sure what you're asking...you want to > do the same thing from multiple threads and accumulate a global result? > > Jim > > > > On 10/02/14 18:46, Haim Ashkenazi w

Re: How would I write it with concurrency

2014-02-10 Thread Haim Ashkenazi
k[0] > to generate test data. > > [0] https://github.com/reiddraper/simple-check > > Aaron > > On Mon, Feb 10, 2014 at 08:46:59PM +0200, Haim Ashkenazi wrote: > > Hi > > > > I have a simple code that generates a list of maps: > > > > (defn

How would I write it with concurrency

2014-02-10 Thread Haim Ashkenazi
Hi I have a simple code that generates a list of maps: (defn test-data [nsamples] (loop [acc []] (if (>= (count acc) nsamples) acc (recur (concat acc (session)) The session function returns a list of one to five generated maps. The idea is to get a list of (not much more

Re: Need help interfacing with ruby digest(hmac-sha256)

2014-02-07 Thread Haim Ashkenazi
Thanks. This solved the problem :) Bye On Fri, Feb 7, 2014 at 12:57 PM, Thomas Heller wrote: > Just a quick guess but it seems like the ruby version base64 encodes the > BINARY version of the digest, while the clojure version encodes the HEX > version of the digest. > > The sign function also

Need help interfacing with ruby digest(hmac-sha256)

2014-02-07 Thread Haim Ashkenazi
Hi I'm trying to interface with a web service that expects a base64 code produced as followed (I included both the direct output of digest and the base64 encoding): require 'openssl' digest = OpenSSL::Digest::Digest.new('sha256') OpenSSL::HMAC.digest(digest, "key", "string") => "\x97\xD1[\xEA\xBA

Re: Annoying Emacs Problem

2013-11-14 Thread Haim Ashkenazi
Hi Alexandru, I believe emacs-starter-kit displays all your “(fn” as “(ƒ”. This has no effect on the program. If you’ll open the file in a different text editor you’ll see it with regular “(fn”. It’s just a nicer display. HTH Haim On Thu, Nov 14, 2013 at 10:29 AM, Alexandru Nedelcu wrote: > H

Re: [ANN] Ayler - A simple namespace/documentation browser

2013-09-12 Thread Haim Ashkenazi
Thanks. On Fri, Sep 13, 2013 at 12:55 AM, Joel Holdbrooks wrote: > This is really cool! Nice work! > > > On Wednesday, September 11, 2013 8:35:31 AM UTC-7, babysnakes wrote: >> >> Hi >> >> As a clojure noob I constantly find myself browsing through various API >> docs to see what's available in

[ANN] Ayler - A simple namespace/documentation browser

2013-09-11 Thread Haim Ashkenazi
Hi As a clojure noob I constantly find myself browsing through various API docs to see what's available in a library. While this data is available in a REPL it's not easy to look for it if you don't know what you're looking for. I first saw a namespace browser concept in Relevance's labrepl

Re: run-jetty not working in a virtualbox vm?

2013-07-13 Thread Haim Ashkenazi
Hi Sorry if it's obvious, but I don't know your skill level (system administration wise). On one terminal ssh to the virtual box vm, start the repl and run jetty as above. On a different terminal ssh to the same virtual box vm and run: curl -v http://localhost:8080/ What do you get? Haim On

Re: how can I count lines of code?

2013-03-27 Thread Haim Ashkenazi
Hi I know of two tools. Both of them however count docstrings as code: - cloc - http://cloc.sourceforge.net - lein-vanity - A leiningen plugin ( https://github.com/dgtized/lein-vanity). HTH On Wed, Mar 27, 2013 at 9:36 PM, larry google groups < lawrencecloj...@gmail.com> wrote: > I a

Re: Clojure Conj Videos

2013-01-03 Thread Haim Ashkenazi
Actually there are a lot of videos available: http://www.infoq.com/strange_loop_2012/ Bye On Thu, Jan 3, 2013 at 10:43 AM, kinleyd wrote: > I've been waiting forever for the recent Strange Loop Clojure talks to be > made available as well. So far I've only seen two, Amit Rathore's "Clojure > +

Re: New Clojure user group in Israel

2012-12-18 Thread Haim Ashkenazi
Finally! I'm in :) On Mon, Dec 17, 2012 at 12:58 PM, Daniel Szmulewicz < daniel.szmulew...@gmail.com> wrote: > Hi everybody, > > Happy to announce that Israel has its first Clojure user group. > > http://www.meetup.com/Clojure-**Israel/ > > Sincerely, > > Da

Re: Interactive form workflow with Friend, can't log in

2012-11-13 Thread Haim Ashkenazi
Hi On Mon, Nov 12, 2012 at 9:23 PM, Thorsten Wilms wrote: > On 11/12/2012 03:20 PM, Chas Emerick wrote: > >> Looks like you're not using the keyword-params middleware, which >> Friend requires (among others). Please check the last paragraph in >> the 'Authentication' section here: >> >> https:/

Re: ANN Drip: A fast JVM launcher

2012-09-10 Thread Haim Ashkenazi
Hi I seem to have a problem running it with leiningen: After setting LEIN_JAVA_CMD I run 'lein test' 3 times and 'lein repl' 2 times. Here's the output of 'drip ps': 37826 org.flatland.drip.Main clojure.main /Users/haim/.drip/0.1.4/7f5d7985a3c16a2f30c1614767d09d71c419b13e/37801-1 -XX:+TieredComp

Re: doubt about clojure.test output

2012-08-18 Thread Haim Ashkenazi
Hi Vencent, On Sat, Aug 18, 2012 at 3:49 PM, Vincent wrote: > Dear , > > I am using clojure.test for test > > in one 'deftest , i had used 3 'is function to assert > and in another 'deftest , i had used 5 'is function to assert > > It ran all test with sucess , but output is > > Ran 4 test

Extracting all the strings of a web app to resource files

2012-08-05 Thread Haim Ashkenazi
Hi I'm new here :) I have a web app which I want to extract all the text out of the hiccup templates. In my very limited java experience I remember there is a good support for i18n resource files, but I don't really need the overhead of i18n. What would be a good way to do it (except for making a

Re: newer versions

2012-07-16 Thread Haim Ashkenazi
Hi I've never used it but there is a plugin to pull git dependencies: https://github.com/tobyhede/lein-git-deps HTH On Sun, Jul 15, 2012 at 5:58 PM, cej38 wrote: > I know that this might be more of a question for elsewhere, but I have > been playing with core.logic from time to time when I am