Hi,
we use Jemmy for this purpose (https://jemmy.dev.java.net/)
Regards
Roger
--
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
there would be no match. Or
have I misunderstood the API description ?
Regards
Roger
why
Am 02.01.2010 um 22:47 schrieb Meikel Brandmeyer:
Hi,
Am 02.01.2010 um 15:23 schrieb Roger Gilliar:
I'm just trying to understand why I would use : in a condp expression. The
followjg code shows
As I understand it, the Clojure reader expects to be able to resolve
namespace references as soon as it sees them. Since alias is a
function, the c alias doesn't exist until sometime after the reader
has already run. I think you will encounter a similar problem with
the import macro.
Ok,
Hi !
Now that you understand it, can you explain it me? :)
-
I said it makes sense not that I understand it ;-)
The make sense part is:
Calling alias inside a do is something I probably won't do in production code.
It would make more sense to
Hi,
I'm just trying to understand why I would use : in a condp expression. The
followjg code shows how I tried to write a test for condp, but the question
remains. Why would I want to use : ?
Regards
Roger
(defn foo [x]
(println x)
(condp = x
true 1
Hi !
Given the code below, I'm wondering why I get
No such namespace: c
It would be nice if some could explain to me what I'm doing wrong.
Regards
Roger
(ns coretest
(:use [clojure.test])
)
(defn foo [x]
(condp = x
true 1
false 2
Hi,
the import syntax for the java libs in the correspondig clojure
contrib source is wrong. Just change them to the correct syntax and it
works.
At least that worked for me.
Regards
Roger
Am 06.10.2009 um 11:14 schrieb dan.pomoh...@gmail.com:
Hi,
I have a maven project with java
I want to write a simple socket server in Clojure. I want to perform
some action when a client disconnects.
---
The following code works for me. read-input returns nil if the socket
is closed (the client disconnects)
Regards
Roger
(defn read-input
Am 01.10.2009 um 21:28 schrieb ngocdaothanh:
Roger, your code is not event based.
What do you mean by not event based ?
Regards
Roger
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to
Thanks for the answer.
Wrapping a mutable thing like an output stream in an agent seems
dubious to me.
It was intended to use an agent here since I need to control the
access to the write object. But what I forgot was
' the validator succeeds or if no validator was given, the return
And even then, ensure is often not needed and overkill. Make sure you
have a real business requirement that the predicate remain true (or
value fixed) on transaction completion. We need to move to a world in
--
It seems that my problem falls exactly in this category. Ensuring
I have the following code:
(defn handle-client [in out]
(binding [
*in* (reader in)
]
(with-connection db
(let [outstream (agent (writer out))]
(loop []
What I want is some way to schedule tasks to be executed by some set
of worker threads, and then be able to control the number of worker
threads on a server. What I'm interested in is other people's
opinions on how I should architect this app.
This
Hi,
thanks a lot. Your code looks much better than mine. But there is one
part that I don't understand:
(defn producer []
(if (dosync (if (not @consuming)
(alter data conj 1)))
(recur)))
How can I be sure that no more data is added to data after @consuming
was set to
thanks a lot. Your code looks much better than mine. But there is one
part that I don't understand:
(defn producer []
(if (dosync (if (not @consuming)
(alter data conj 1)))
(recur)))
After rereading the docs several times It seems that I begin to
understand how this
.. It waits until the value is actually needed. For
more details on this, see http://ociweb.com/mark/stm/article.html.
.
Great article.Thanks !
Roger
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Clojure
Am 21.09.2009 um 06:50 schrieb Roger Gilliar:
2.) I modify the code like this:
(if cache
(cache-message content)
(if (mesage-cache-agent-is-running)
(send-of *message-cache-agent* send-last-message-with
content
I still have some problems to correctly understand the dosync
semantic. What happens exaclty if two threads try to modify the same
list:
Example
thread 1:
(dosync
append an item to a list
...
)
thread 2:
(dosync
remove an item from a list
..
)
Is it true that If thread 1 is
Hi !
Am 21.09.2009 um 15:55 schrieb Jarkko Oranen:
In any case, the synchronisation guarantees that if you have a
starting list A, either the remove or the append operation will be
applied to it, producing A', and the remaining operation will be
applied to A', producing the final value of
I call test.clj like this:
java -cp /Users/roger/Library/clojure/clojure-1.0.0.jar clojure.main
test.clj
The script is:
(defn syncnow []
(println Hello World)
)
(dorun (pcalls syncnow syncnow syncnow))
But this script doesn't terminate. I have to press ctr-c to
This is some sort of repost from yesterday. But I hope that this one
describes my problem more precisely.
I have n threads that produce something. At some point in time a
consumer starts and if the consumer starts, no more data should be
produced. Right now I can only come up with the
Nothing leaps out at me as a likely cause of a dropped message.
-
The only reason I can think of: It could be a problem when the loading
of the JDBC driver is happening inside a thread. At least that would
explain why calling
(with-connection db
nil
)
before
Hi,
im not sure how to solve the following problem:
(defn parse [outstream-agent xml]
(let [content (clojure.xml/parse (ByteArrayInputStream. (. xml
getBytes)))
first-element (:tag content) ]
(try
(if @*is-syncing*
Not from my code.
Regards
Roger
Am 19.09.2009 um 12:11 schrieb Christophe Grand:
is db dynamically rebound?
On Sat, Sep 19, 2009 at 7:07 AM, Roger Gilliar ro...@gilliar.de
wrote:
Hi,
re you opening something, using it to return a lazy sequence, and
then closing it before
You mention threading in the subject and you have a (binding
[...] ...) form. Are you starting a thread, or communicating with
one, or using pmap, future, an agent, or etc. inside the binding,
and expecting the binding to affect the code that runs in the thread/
map/future/agent?
Hi,
re you opening something, using it to return a lazy sequence, and
then closing it before consuming the sequence?
No. I started with just opening the database connection in the handler
function.
Regards
Roger
--~--~-~--~~~---~--~~
You received
26 matches
Mail list logo