Adding additional domains for remote javadocs

2009-05-18 Thread b
I was attempting to add an additional remote javadoc source for 'javax.servlet.', but found that the entry for 'javax.' wasn't allowing the domain to be searched. Someone in #clojure mentioned changing line 70 of clojure.contrib.repl- utils/javadoc.clj to return a rseq of *remote-javadocs*. In t

Re: Will Clojure work on AppEngine?

2009-03-27 Thread Robin B
Google will officially announce Java support for AppEngine at the end of May at Google IO: http://ru.ly/T6 Clojure web apps will have access to BigTable and be able to auto-scale based on load. Clojure in the cloud! Robin On Feb 2, 2:35 pm, Mark Derricutt wrote: > I wonder if the Classloader

Re: Will Clojure work on AppEngine?

2009-04-07 Thread Robin B
Tonight Google officially announced JVM support for AppEngine: http://ru.ly/Z2 JRuby on Rails is working and Clojure/Compojure works too: http://ru.ly/74 Unfortunately threading is restricted on GAE/J. Robin On Mar 27, 9:44 am, Robin B wrote: > Google will officially announce Java support

First day with Macros

2013-06-17 Thread Hussein B.
Hi, My target is to have something like this: (servlet "ArticlesServlet" (do-get [this request response] (println "Get Request")) (do-post [this request response] (println "Post Request"))) I started with this: (defmacro servlet [servlet-name meths] `(reify Servlet (for [met

Re: First day with Macros

2013-06-17 Thread Hussein B.
, reify isn't going to work if you need a named class to actually wire > up your servlet, for example with a web.xml. Also, consider that you'll > need some AOT compilation for the container to actually see the servlet > class. > > > On Mon, Jun 17, 2013 at 4:38 PM, Huss

What the recommended way now to create an instance and override its methods?

2013-06-18 Thread Hussein B.
Hi, I know we usually use 'proxy' macro when we want to create an instance of a concrete class and override some of its methods. But do we have now a recommended approach? AFAIK, reify only works with protocols and interfaces, can't be used to create an instance and override its methods. I'

Re: First day with Macros

2013-06-18 Thread Hussein B.
gt; Macros certainly take some getting used to. > > > On Tue, Jun 18, 2013 at 8:12 AM, Hussein B. > > wrote: > >> Here is my fourth attempt: >> >> (defmacro servlet [servlet-name & meths] >> `(reify Servlet >> (for [meth ~m

Re: What the recommended way now to create an instance and override its methods?

2013-06-18 Thread Hussein B.
08:45, Hussein B. wrote: > > I know we usually use 'proxy' macro when we want to create an instance > > of a concrete class and override some of its methods. But do we have > > now a recommended approach? > > 'proxy' is the recommended approach unless y

Re: What the recommended way now to create an instance and override its methods?

2013-06-18 Thread Hussein B.
Hmm, then why Clojure docs http://clojuredocs.org/clojure_core/clojure.core/reify mentions 'object': protocol-or-interface-or-Object (methodName [args+] body)* On Tuesday, June 18, 2013 1:41:57 PM UTC+2, Jim foo.bar wrote: > > On 18/06/13 12:34, Hussein B. wrote: > >

Re: Clojure in production

2013-06-18 Thread Hussein B.
According to their "Jobs" page, Doo is using Clojure to implement their backend and web application: https://doo.net/en/ On Monday, June 10, 2013 11:47:25 PM UTC+2, Plinio Balduino wrote: > > Hi there > > I'm writing a talk about Clojure in the real world and I would like to > know, if possible

Re: Clojure in production

2013-06-19 Thread Hussein B.
I mentioned that! :D On Wednesday, June 19, 2013 9:40:57 AM UTC+2, Florian Over wrote: > > Hi, > we at doo.net are using clojure and clojurescript for all our backend and > web development. > We are also still in need for clojure developers. :) > > Florian > > > 2013/6/19 Nikita Prokopov > > >> W

Is it possible to parameterize proxy macro with defmacro?

2013-06-23 Thread Hussein B.
Hi, After I got your help last week to get my Macro working :) I tried to expand it more: I'm trying to parameterizing my object creation (I'm using clojure.core.match). Source class offers multiple constructors: (defmacro source [source-name constructor-args & meths] (match [constructor-args

How to implement a distributed and concurrent system in Clojure?

2013-07-03 Thread Hussein B.
Hi, I read recently on the internet that Clojure concurrency tools make it easy to implement a highly concurrent system but on a single machine. But how to implement a highly concurrent system that runs on a multiple machines? Erlang, Elixir and Scala have the Actors model. Please correct me

How core.async compares to agents, future and promise?

2013-07-04 Thread Hussein B.
Hi, How core.async compares to agents, future and promise? When to use core.async and when to use agents, future and promise? Thanks for help and time. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure

Re: [ANN] Pedestal-app Tutorial has been released

2013-07-09 Thread Hussein B.
O, Yeah! Thanks! On Tuesday, July 9, 2013 6:03:58 PM UTC+2, Ryan Neufeld wrote: > > Hey there, Clojurians/Pedestallions! > > I'm pleased to announce the release of a comprehensive tutorial for > pedestal-app: http://bit.ly/pedestal-app-tutorial. In this tutorial we > finally *dive deep* int

Help to start creating this DSL in Clojure

2013-08-17 Thread Hussein B.
Hi, I'm trying to create this Domain Specific Language: (query "clojure" (directory "/usr/texts") (group-by :creation-date)) What it should do is to search for all files in a specific directory using a regexp and then group the result by some of files attributes. The idea is t

Re: Entwined STM V1.0

2013-08-18 Thread Hussein B.
Great ! Congratulations! How it does compare with Clojure's builtin STM? Thanks. On Sunday, August 18, 2013 10:24:48 AM UTC+2, Ivan Koblik wrote: > > Hi All, > > Almost 4 years ago I developed STM with semantic concurrency control for > my project at CERN. Main feature of this STM is the Transa

Help to morph this imperative snippet into a functional one

2013-08-18 Thread Hussein B.
Hi! Would you please help me transforming this imperative code into functional one? The code is a typical snippet in imperative style. A lot of mutations that I don't even know how to start morphing it to Clojure. class Container { Map children; String letter; List value; } void insert(

Re: Help to morph this imperative snippet into a functional one

2013-08-18 Thread Hussein B.
it in Clojure. On Sunday, August 18, 2013 4:27:43 PM UTC+2, Chris Ford wrote: > > Can you explain what the code is supposed to do in English? Java is a > little hard to read. :-) > > Are you doing Huffman coding or similar? > > > On 18 August 2013 16:51, Hussein B. >w

Why (eval (list (quote (println "Clojure")))) is throwing a Null Pointer Exception?

2013-08-24 Thread Hussein B.
Hi, Why the following snippet: (eval (list (quote (println "Clojure" is throwing a null pointer exception? Thanks for help and time. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups

Re: Current state of automatic generation of externs file for CLJS Advanced Compilation?

2015-03-24 Thread Nathan B
We use https://github.com/ejlo/lein-externs for this and it seems to work pretty well for our purposes. On Monday, March 23, 2015 at 10:42:40 PM UTC-4, james borden wrote: > > Is there a way to automatically generate externs files for js libraries > for use with the cljs advanced compilation mod

Streaming Media East NYC Mini-Meetup 5/10

2015-05-02 Thread Nathan B
If any Clojurians will be at Streaming Media East or just local to NYC and would like to do a mini-meetup at the New York Hilton Midtown on 5/10 in the evening let me know. Would be nice to meet up and have a few drinks and talk Clojure. I can organize if there is some interest. -- You receive

How to know if an agent throw an exception?

2014-06-20 Thread Hussein B.
Hi, When using send-off of an Agent, how to know if any exception is happened? Since AFAIK, agents are executed in different thread. Currently, I'm calling (agent-error) but nothing is logged. Maybe nothing went wrong but some how I'm sure something went wrong. Thank you. -- You received thi

How to tackle this concurrency problem?

2014-06-20 Thread Hussein B.
Hi, I have a ref that saves the ID of last processed event. Of course, I'm using Clojure STM facility. The problem now is I can't control the value of the ref. Due massive concurrency, it is updated and my logic is broken. How to guard, and really guard the update of that ref? Should I do (lo

Understanding how a collection reduce itself

2014-09-23 Thread Hussein B.
Hi, I spent a considerable time trying to understand reducers. I got the concept of how the map/filter function will return a function and it is not going to iterate over a sequence and it is not going to create a new sequence. The missing part though, who is creating the sequence? They say a

Re: Understanding how a collection reduce itself

2014-09-24 Thread Hussein B.
When the collection is reducing itself, it is going to create a sequence and call cons, conj or something like. If this is true, then I'm not sure what reducers is bringing to the table. Because according to what I read, by using reducers, map/filter functions aren't going to create and allocate

Re: Understanding how a collection reduce itself

2014-09-24 Thread Hussein B.
To elaborate more, I know that with reducers, map for example isn't going to create the resulting sequence by using cons. That is clear to me. But, if the collections is going to call cons while reducing itself, then I'm not sure what is the benefit of reducers (besides it makes sense and makes

Re: Understanding how a collection reduce itself

2014-10-09 Thread Hussein B.
me as ((comp f g) x): > > ((comp (filterer even?) (mapper inc)) conj)) > > Now we can can finally create our efficient map/filter in a clean way: > > (let [f (comp (filterer even?) > (mapper inc))] > (reduce (f conj) [] xs)) > > The reducer library goes one

As framework creator, how would you get user defined specific functions/macros?

2014-11-20 Thread Hussein B.
Hi, Lets say that you are framework creator and to use your framework, you defined a macro called defcontroller where the users of your framework add their logic. You -as framework creator- how would you load user defined source code files and collect their defcontroller definitions? Thanks f

What I'm missing in my Instaparse rules?

2016-06-12 Thread Hussein B.
Hello, I'm playing around Instaparse library, starting very simple. For input like : { player } I created the following parser: (def ast (ist/parser "TEST = OBJECT = <#'\\s+'> = <'{'> = <'}'> ITEM = #'[^\"]+' OBJECT = CURLY_OPEN WHITESPACE* ITEM WHITESPACE* CURLY_C

Re: What I'm missing in my Instaparse rules?

2016-06-13 Thread Hussein B.
requirement. > > => (re-seq #"[^\"]+" "Harden }") > ("Harden }") > > A solution would be to make the regex for ITEM more restrictive. > > On Sun, Jun 12, 2016 at 12:52 PM, Hussein B. > wrote: > >> He

Re: What I'm missing in my Instaparse rules?

2016-06-13 Thread Hussein B.
Oh my ... You saved my hair! :) Thanks a lot for your help and time. On Monday, June 13, 2016 at 12:03:54 PM UTC+2, puzzler wrote: > > Looks like you left off a + in your regular expression for String. > > On Mon, Jun 13, 2016 at 2:59 AM, Hussein B. > wrote: > >> Thank

Re: [JOB] CLJ/CLJS Developer(FL/Remote) - Swarmify putting an end to video buffering

2017-03-09 Thread Nate B
// , I have an acquaintance who has done some prototyping and dynamic applications with Heroku, Clojure, and ClojureScript if you're interested. His name's Jason, and he's pretty active on his Github: https://github.com/rjb25?tab=repositories If you have a specific pain point you can aim him

Re: Benefits to partial functions.

2019-10-22 Thread b w
When I was putting together lessons to teach Clojure, I was analyzing texts from Gutenberg and doing things like counting the number of words, and the frequency and distribution of words, and things like that, and "partial" was noticeably slower. FWIW. On Sun, Oct 20, 2019 at 11:23 PM Alex Engelbe

How to transform this structure idiomaticlly in Clojure?

2015-08-18 Thread Hussein B.
Hi, I have the following structure. Node has a string properly and a vector nodes and of course, each node has a string a property and a vector of nodes. So I created the following record: (defrecord Node [title childs]) And I have the following JSON response: node string [ node1 [ nn1

How can find something inside heavily nested data structure ?

2015-08-19 Thread Hussein B.
Hi, I have transformed JSON response into the equivalent data structure using Cheshire library. The result is a huge nested data structure , mostly vectors and maps. It is actually a tree. How to find a property that is nested deep inside the tree ? For example I'm search for the node that ha

Re: How can find something inside heavily nested data structure ?

2015-08-19 Thread Hussein B.
tween your conceptual nodes and your data structures (vectors and > maps)? > > On 19 August 2015 at 17:26, Andy- > > wrote: > > I have yet to evaluate it myself but this might do help you: > > > > https://github.com/nathanmarz/specter > > &g

Re: How can find something inside heavily nested data structure ?

2015-08-19 Thread Hussein B.
Here is more concrete example (def s [{"n" {"id" "a"} "d" 2 "children" [{"n" {"id" "c"} "d" 4 "children" nil}]} {"n" {"id" "b"} "d" 3 "children"

Re: How can find something inside heavily nested data structure ?

2015-08-21 Thread Hussein B.
Yes, that does the job. Thanks for your help and time. On Thursday, August 20, 2015 at 12:21:47 AM UTC+2, Alan Forrester wrote: > > On 19 Aug 2015, at 18:08, Hussein B. > > wrote: > > > Here is more concrete example > > > > (def s [{"n" {"

Why I'm getting NPE with zipper/next?

2015-08-21 Thread Hussein B.
Hi, I have this structure: (def s [{"n" {"id" "a"} "d" 2 "children" [{"n" {"id" "c"} "d" 4 "children" []}]} {"n" {"id" "b"} "d" 3 "children" [

Re: Why I'm getting NPE with zipper/next?

2015-08-21 Thread Hussein B.
> > On Fri, Aug 21, 2015 at 4:35 PM, Hussein B. > wrote: > > Hi, > > > > I have this structure: > > > > (def s [{"n" {"id" "a"} "d" 2 "children" [{"n" {"id" "c"} "d"

Re: Why I'm getting NPE with zipper/next?

2015-08-21 Thread Hussein B.
a zipper you omitted from your post, zipping over maps, > in particular, may not be as convenient as you're imagining. > https://clojuredocs.org/clojure.zip/zipper has helpful examples in it. > > Take care, > Moe > > On Fri, Aug 21, 2015 at 5:06 PM, Hus

Re: Why I'm getting NPE with zipper/next?

2015-08-24 Thread Hussein B.
Hi Moe, I have this structure: [{"a" {"b" 1 "c" 2} "children" [{"a" {"b" 3 "c" 4} "children" []}]} {"a" {"b" 5 "c" 6} "children" []} {"a" {"b" 7

Re: Why I'm getting NPE with zipper/next?

2015-08-24 Thread Hussein B.
loc)) (defn predicate [x] (and (vector? x) (some #(= 10 (get-in % ["a" "b"])) x))) (defn operation [x] (update x "children" reverse)) (edit-parents predicate operation (z/seq-zip {"children" z})) But I'm still getting the same data.

Re: Why I'm getting NPE with zipper/next?

2015-08-24 Thread Hussein B.
x) {"children" z})) On Monday, August 24, 2015 at 4:08:17 PM UTC+2, Moe Aboulkheir wrote: > > Went off half-cocked there. The remainder: > > (edit-parents > #(= 10 (get-in % ["a" "b"])) > #(update % "children" reverse), > data-z

Re: Why I'm getting NPE with zipper/next?

2015-08-24 Thread Hussein B.
The result now is as desired: ({"a" {"b" 1, "c" 2}, "children" [{"a" {"b" 3, "c" 4}, "children" []}]} {"a" {"b" 5, "c" 6}, "children" []} {"a" {"b" 7, &q

Re: Why I'm getting NPE with zipper/next?

2015-08-24 Thread Hussein B.
Thanks a lot for your time and your helpful answers. Now I started to understand zippers, thanks to you. On Monday, August 24, 2015 at 7:36:17 PM UTC+2, Moe Aboulkheir wrote: > > Hussein, > > > On Mon, Aug 24, 2015 at 5:40 PM, Hussein B. > wrote: > > > But n

How to move an element within a vector?

2015-08-25 Thread Hussein B.
Hi, For a vector like [A B C D E], how to remove an element to a specific location? For example [A D B C E] ? I thought about converting the vector into array but I would feel bad if I did that. What would be the idiomatic way to do that in Clojure? Thanks for help and time. -- You

My Zipper isn't deleting what I thought is going to delete

2015-08-27 Thread Hussein B.
Hi, I'm trying to remove an element from nested data structure (nesting in unknown, so I'm trying to come up with a generic solution: (def z [ {"a" {"b" 1 "c" 2} "children" [{"a" {"b" 3 "

Re: My Zipper isn't deleting what I thought is going to delete

2015-08-27 Thread Hussein B.
The modify function (defn modify [loc] (-> loc z/remove)) On Thursday, August 27, 2015 at 11:58:31 AM UTC+2, Hussein B. wrote: > > Hi, > > I'm trying to remove an element from nested data structure (nesting in > unknown, so I'm trying to come up with a g

Re: My Zipper isn't deleting what I thought is going to delete

2015-08-27 Thread Hussein B.
ion: > > (z/zipper #(get % "children") #(get % "children") (fn [p c] (assoc p > "children" c)) {"children" z}) > > looks like it'll do the right thing here. > > Take care, > Moe > > On Thu, Aug 27, 2015 at 11:03 AM, Hus

Re: ANN: ClojureScript 1.7.145

2015-10-13 Thread Nathan B
On Tuesday, October 13, 2015 at 8:02:07 AM UTC-7, David Nolen wrote: > ClojureScript, the Clojure compiler that emits JavaScript source code. > > > README and source code: https://github.com/clojure/clojurescript > > > Leiningen dependency information: > > >     [org.clojure/clojurescript "1.

Re: ANN: ClojureScript 1.7.170, Enhanced Build Pipeline

2015-11-06 Thread Nathan B
Just some early results on our builds show a roughly 30% decrease in compile time when using cljsbuild auto. That helps a lot during development. Awesome work as usual, thanks! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

Re: Interest in a Full Featured Clojure Blog Engine

2016-03-23 Thread Nate B
// , What ended up happening with this? My company and I could really use a full featured blogging engine in Clojure. https://groups.google.com/forum/#!topic/clojure/rCmPYa0Vw-4 On Thursday, July 18, 2013 at 7:24:06 AM UTC-7, frye wrote: > > Hello, > > I'm thinking of how to build a composa

Dealing with edn for the first time

2014-04-20 Thread Hussein B.
Hi, I want to save the configuration of my application in edn file. Lein is used (of course). I want to pub my config.edn under /resources directory. But honestly, I don't know the format of edn. I tried to google it, but I didn't get anything helpful. The format is in its early stages. So, m

Why this Clojure part is working in Korma and no exception is thrown?

2014-04-21 Thread Hussein B.
Hi, I'm trying to study the source code of Korma project. (insert users (values {:first "john" :last "doe"})) This will resolve to (defmacro insert) https://github.com/korma/Korma/blob/master/src/korma/core.clj#L143 Will call (defn- make-query-then-execute) https://github.com/korma/Korma/

Idiomatic Clojure for iterating all items of a map

2014-04-21 Thread Hussein B.
Hi, For a data structure such as: (def langs {:langs [ {:lang "Clojure" :version 1.6} {:lang "Erlang" :version 17} ] } ) How to iterate all the items of the maps? I tried this but it is too imperative to me: (doseq [lang (:langs langs) (doseq [k (keys lang)]

In Lein, is it possible to run a specific test suite?

2014-05-06 Thread Hussein B.
Hi, I'm using clojure.test and Lein. Is it possible to run a specific test suit ? I don't want to run the whole test each time. Thanks for help and time. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@g

How to convert this list into map?

2014-05-10 Thread Hussein B.
Hi, I have this list: (:= :language "Clojure") And I want to convert it to the following map data structure: {:op := , :language "Clojure"} I can't really think of a clear way how to do it. Would you please help? Thanks for help and time. -- You received this message because you are subscr

Re: How to convert this list into map?

2014-05-10 Thread Hussein B.
That is beautiful! Thanks a lot! On Sunday, May 11, 2014 12:33:51 AM UTC+2, Mike Fikes wrote: > > Here is how you can derive that expression: > > {:op :=, :language "Clojure"} > > is the same as > > (hash-map :op := :language "Clojure") > > > which is the same as > > (apply hash-map '(:op := :lang

What is going wrong in my code?

2014-05-11 Thread Hussein B.
Hi, I'm trying to learn how to make DSL in Clojure and Korma project is a really good place to learn from. I'm trying this very simple stuff (inspired by Korma, not Korma code): (def predicates {'and :and 'or :or 'not :not '> :gt

How to iterate over maps and drop one specific element each time?

2014-06-11 Thread Hussein B.
Hi, I have a seq of maps: [ {:op :e :v 1} {:op :n :b 2} {:op :m :z 2.3} ] How to iterate over the sequence and extracting only the non-op entries? Desired result is: [ {:v 1} {:b 2} {:z 2.3} ] Thanks for help and time. -- You received this message because you are subscribed to the Google

Re: Clojure on iOS devices - Swift as a host?

2014-06-11 Thread Hussein B.
The idea of having lisp on iOS (and OS X) is really awesome but there is a huge downside: That won't integrate with Xcode "Interface Builder" out of the box. That would be the deal breaker. On Wednesday, June 4, 2014 3:20:22 PM UTC+2, Greg Knapp wrote: > > The recent release of Swift made me re

How to unit test (defn-) functions?

2014-06-12 Thread Hussein B.
Hi, I like to use (defn-) when it comes to internal implementation functions. But since they aren't exposed, how to unit test them? Of course, I'm using Lein and clojure.test Thanks. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: Clojure:Lisp :: LSD:Meditation

2014-06-12 Thread Hussein B.
Thanks. Now, I have a clue how to skip some posts here. On Thursday, June 12, 2014 3:41:13 PM UTC+2, Divyansh Prakash wrote: > > I compare Clojure to acid in this > > rant. > -- You received this message because you ar

How to add elements to a vector that is the value of a map key?

2014-06-17 Thread Hussein B.
Hi, This is a very basic question, so be patient please! :) I have an empty map where key is an integer and the value is a vector. How I can add an element to the vector of a specific key? For example: {1 [11]} Then {1 [ 11 22]} Thanks for help and time. -- You received this message becau

Re: How to add elements to a vector that is the value of a map key?

2014-06-17 Thread Hussein B.
s, then add the value to the existing vector. On Tuesday, June 17, 2014 7:21:43 PM UTC+2, Hussein B. wrote: > > Hi, > > This is a very basic question, so be patient please! :) > > I have an empty map where key is an integer and the value is a vector. > > How I can add an

Re: How to add elements to a vector that is the value of a map key?

2014-06-17 Thread Hussein B.
Thanks, it works. In case, my initial map is a ref type (def m (ref { } )) Why this isn't working? (dosync (alter m #(update-in @v [1] (fnil conj [ ])) 11)) On Tuesday, June 17, 2014 7:55:14 PM UTC+2, Mauricio Aldazosa wrote: > > For updating the value of a map given a key you can use upd

Re: How to add elements to a vector that is the value of a map key?

2014-06-17 Thread Hussein B.
Oh, this works (dosync (alter v #(update-in %1 [1] (fnil conj [ ]) %2) 33)) On Tuesday, June 17, 2014 8:05:10 PM UTC+2, Hussein B. wrote: > > Thanks, it works. > > In case, my initial map is a ref type > > (def m (ref { } )) > > Why this isn't working? > > (

Re: How to add elements to a vector that is the value of a map key?

2014-06-17 Thread Hussein B.
Nice! :) Thanks all for help. On Tuesday, June 17, 2014 9:00:06 PM UTC+2, Thomas Heller wrote: > > > > On Tuesday, June 17, 2014 8:16:36 PM UTC+2, Hussein B. wrote: >> >> Oh, this works >> >> (dosync (alter v #(update-in %1 [1] (fnil conj [ ]) %2) 33)) >

Doing Socket IO inside STM transaction

2014-06-17 Thread Hussein B.
Hi, I have a ServerSocket that stores the client ID and the client socket object into a ref type. And I also have a thread that is running in the background that checks if a specific condition is met, then it will start send notifications to the clients (it will use the client-id-ref and messa

Re: Doing Socket IO inside STM transaction

2014-06-17 Thread Hussein B.
June 17, 2014 11:45:52 PM UTC+2, Gary Trakhman wrote: > > Agent send operations inside a transaction get queued up and don't > actually get sent until the transaction commits, that's probably what you > want, it's meant for side-effects. > > > On Tue, Jun

Re: Doing Socket IO inside STM transaction

2014-06-17 Thread Hussein B.
difference in terms of how it looks from STM. > > 2 agents will have 2 independent queues, even though they might share > threadpools, if you want to guarantee order, you need one queue. > > > On Tue, Jun 17, 2014 at 5:54 PM, Hussein B. > wrote: > >> I think sen

When to use (ensue) ?

2014-06-19 Thread Hussein B.
Hi, When dealing with Clojure ref types, when to use (ensure) ? Thanks. -- 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

nrepl-ritz setup (missing dependency "dynapath")

2013-02-18 Thread Dima B
Hi, I've been going through all the instruction on the nrepl-ritz page (https://github.com/pallet/ritz/tree/develop/nrepl) as well as nrepl-ritz threads and I can't seem to get it working due to a mysterious dependency problem on dynapath. M-x nrepl-ritz-jack-in results in Starting nREPL ritz

Re: nrepl-ritz setup (missing dependency "dynapath")

2013-02-18 Thread Dima B
Duncan wrote: > > Dima B > writes: > > > I've been going through all the instruction on the nrepl-ritz page > > (https://github.com/pallet/ritz/tree/develop/nrepl) as well as > nrepl-ritz > > threads and I can't seem to get it working due to a mysterious &

Re: nrepl-ritz setup (missing dependency "dynapath")

2013-02-18 Thread Dima B
I confirm that the issue is fixed. Thank you, guys! On Monday, February 18, 2013 3:39:37 PM UTC-8, Hugo Duncan wrote: > > Toby Crawley > writes: > > > Hugo Duncan writes: > >> > >> The latter is fine by me. It is about time we had another ritz release > for > >> nrepl.el 1.6 anyway. > >

Clojure's n00b attraction problem

2010-06-28 Thread gary b
See http://gregslepak.posterous.com/clojures-n00b-attraction-problem and http://news.ycombinator.com/item?id=1466288 for recent discussion on the Clojure newbie experience. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send em

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread gary b
re: memory use If the number of concurrent requests is small, then the memory used by thread per request is usually not an issue. When implementing long polling, the number of concurrent requests can be very large. Sharing threads between requests in a long polling server can result in significa

Re: ANN: Aleph, an asynchronous web server

2010-07-09 Thread gary b
On Jul 8, 2:26 pm, Antoni Batchelli wrote: > Also, in some instances with NIO you can even work directly > with kernel buffers, and so the network data doesn't even need > to be copied from the kernel space into the user space. I assume that you are referring to NIO direct byte buffers. A thread

Re: Aleph and Conjure

2010-07-20 Thread gary b
Conjure cannot be used with Aleph. Conjure is based on Ring. Ring does not currently support the evented programming model used by Aleph. You can build a scalable app with Conjure on Jetty. You don't need an evented server like Aleph or node.js to build a scalable app. On Jul 18, 5:26 pm, Vict

Re: Aleph and Conjure

2010-07-20 Thread gary b
By scalable, I mean that the capacity of the application can be increased by adding resources. Conjure and Compojure are scalable under this definition. If a web app does have a large number of concurrent requests, then you need a model where requests share threads. A full blown event based progr

Re: Aleph and Conjure

2010-07-21 Thread gary b
On Jul 21, 7:11 am, Marko Kocić wrote: > Something like ring-aleph-adapter, however trivial it might be to > implement, will help in seamlessly switching existing applications to > aleph/netty. There is a Ring adapter for Netty: http://github.com/datskos/ring-netty-adapter. -- You received this

Re: Aleph and Conjure

2010-07-21 Thread gary b
On Jul 21, 10:40 am, Zach Tellman wrote: > I don't think anything in the Ring utilities are thread-aware, so they're > all okay to use.   The flash and session middleware in Ring core are two examples where Ring assumes the thread per request model. http://github.com/mmcgrana/ring/blob/master/ri

Re: Aleph and Conjure

2010-07-21 Thread gary b
On Jul 21, 11:42 am, Zach Tellman wrote: > Both of those seem to be about persisting data across requests.  I > apologize if I'm being dense, but how does the threading model affect > how they work? The flash and session middleware functions update the response returned from the handler function.

Re: I understand metadata now!

2011-03-25 Thread Ambrose B
On Fri, Mar 25, 2011 at 11:48 PM, James Reeves wrote: > > (defprotocol Identifiable >(id [self] "Return an object's unique id")) > > (deftype DBRef [db-id data] >Identifiable >(id [_] db-id) >clojure.lang.IDeref >(deref [_] data)) > > (defn db-ref [id data] >(DBRef. id d

Re: fixing web docs

2011-03-30 Thread Ambrose B
On Wed, Mar 30, 2011 at 5:28 PM, Nick Zbinden wrote: > > Dare I mention the idea of an official (or semi-official) Clojure > documentation project that ties together the disparate sources that > currently exist? What say you, community? > > I was thinking about something. This is just an idea spi

Re: Adding jar to classpath in REPL

2011-03-31 Thread Ambrose B
One alternative to this would be to start a Nailgun server. You can add to the classpath quite easily. That said, this looks pretty interesting. Ambrose On Thu, Mar 31, 2011 at 8:19 PM, Vitaly Peressada wrote: > Wanted to add jar to classpath without restarting REPL. Recalled java > reflection

Re: Midje 1.1 released (testing tool)

2011-04-05 Thread Ambrose B
Great work Brian! One thing I was confused about in the 1.1-betas was the boolean return value of tests seemed random. ie. tests that pass don't always return true. Is this still the case? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to t

Rich Hickey up for deletion

2011-07-10 Thread Michal B
Rich Hickey's article in Wikipedia is up for deletion again. Does anyone have links to solid articles about Hickey? -- 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

Libraries and build management hell

2011-07-28 Thread Michal B
Why does it have to be so complicated to use libraries? To use libraries, you need to learn how to operate half a dozen build tools and git because each library author distributes their library differently. If figuring out how to install an IDE with clojure wasn't bad enough, now you need to fi

Re: Libraries and build management hell

2011-07-28 Thread Michal B
The situation you describe clearly requires a build tool. But I'm not talking about this case. -- 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 moderate

Re: Libraries and build management hell

2011-07-29 Thread Michal B
Leiningen definitely alleviates the hairiness of library management. But I wish people won't settle for a lein like solution for simple projects. As much as it helps, it is still an unnecessary burden and an obstacle to adoption, in my opinion and experience. -- You received this message becau

Re: Libraries and build management hell

2011-07-30 Thread Michal B
This discussion is getting a lot of "What are you talking about? Leiningen is what you're looking for!" replies. I know. I'm a happy lein user, and use it and clojars frequently with some of my larger projects. I'm very grateful for the work Phil and the other contributors

Re: Libraries and build management hell

2011-07-30 Thread Michal B
On Saturday, July 30, 2011 6:24:50 PM UTC+3, puzzler wrote: > > The issue I have with the build tools is that they all presume > you want to *build* something. 95% of the time, I just want to open a > file, write some Clojure code, and interactively test it in a REPL. > Exactly what I'm talking ab

Immutability rules when it comes to Ref type

2012-08-10 Thread Hussein B.
Hi, I have a ref type that wraps a map, this map is going to embed many nested other maps. According to immutability rules, what happens when: A new nested map is updated (entry is removed or update) or even a new nested map is added to the master map that is wrapped by ref type? Thanks for help

Re: Immutability rules when it comes to Ref type

2012-08-10 Thread Hussein B.
mmutable map, to pointing at a different immutable map. > Neither of the two maps becomes mutable as a result of this. > > Andy > > On Aug 10, 2012, at 9:21 AM, Hussein B. wrote: > > > Hi, > > I have a ref type that wraps a map, this map is going to embed many

Better ideas how to collect analytics data

2012-08-10 Thread Hussein B.
Hi, I'm collecting analytics data. I used a master map that holds many other nested maps. Considering maps are immutable, many new maps are going to be allocated. (Yes, that is efficient in Clojure). Basic operation that I'm using is update-in , very convenient. Do you have a better idea how to c

Why Clojure map literal creates an instance of array map?

2012-08-10 Thread Hussein B.
Hi, Why Clojure map literal creates an instance of array map but not hash map? What are the advantages of array map over hash map? Thanks. -- 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 No

How to measure pieces of Clojure code?

2012-08-10 Thread Hussein B.
Hi, I want to measure how much space an algorithm is taking and then trying to change some aspects to see how things are going to differ. I also want to measure how much time it takes to complete an operation. What tools can I use? Thanks. -- You received this message because you are subscribe

  1   2   3   >