I'm not sure what your point is.
I rely quite a bit on randomly generated tests, and of course, any
multithreaded app has nondeterministic elements that can be hard to
replicate.
For that matter, if you are simply experimenting with new code at the REPL,
it might not always be clear what
On Mon, May 27, 2013 at 9:50 PM, Kevin Downey redc...@gmail.com wrote:
doall doesn't recurse, so you are not realizing the lazy-seq, you want
something like [msg (doall sig-strs)]
Thank you Kevin! When Elango said my suggestion didn't work, I was
puzzled. Now it makes sense!
--
Sean A Corfield
And yep, Kevin's change works. Looking into reducers + I/O sounds
interesting, I'll definitely check it out, thanks!
On Mon, May 27, 2013 at 11:21 PM, Sean Corfield seancorfi...@gmail.comwrote:
On Mon, May 27, 2013 at 9:50 PM, Kevin Downey redc...@gmail.com wrote:
doall doesn't recurse, so
Hello, Clojurians.
I was selected during GSoC process to implement a core.matrix-compatible
NDArray in Clojure. More info about this project can be found at [1] and
[2]. However, I would be really happy to know if there are any comments,
wishes or feature requests regarding that proposals
First of all, congrats on the project!
Could you elaborate on your mention of QuickCheck, I couldn't find it in
the proposal.
Thanks,
Ambrose
On Tue, May 28, 2013 at 4:25 PM, Dmitry Groshev lambdadmi...@gmail.comwrote:
Hello, Clojurians.
I was selected during GSoC process to implement a
Sorry, I wasn't clear enough in my proposal.
I've mentioned clojurecheck [1] in it and the possibility of extending it,
because in my Erlang experience property-based testing is extremely helpful
for things that operates on something pure in complicated way — exactly
like core.matrix. But
Dear clojure-users,
Loading a file with such content:
(ns ru.rules
(:use
protege.core
rete.core :exclude [rutime])
...
I get this error message:
java.lang.Exception: Unsupported option(s) supplied: :exclude
at clojure.core$load_libs.doInvoke(core.clj:5408)
at
Oskar Kvist oskar.kv...@gmail.com writes:
Stuart Halloway said in his video Clojure in the Field (
http://www.infoq.com/presentations/Clojure-tips) from March 1, 2013 (I
think): I don't feel the absence of a debugger because I've learnt enough
that I don't ever need a debugger. I am very
Patrick Logan patrickdlo...@gmail.com writes:
Patrick Logan patric...@gmail.com javascript: writes:
OWL has several levels of increasingly expressive but general
inferences.
Much of the domain could be represented in OWL (classes (i.e. sets),
instances (i.e. set membership),
I think it is :exclusions not :exclude...
example:
[uk.ac.gate/gate-core 7.1 :exclusions
[[org.springframework/spring-beans]]]
Jim
On 28/05/13 10:42, ru wrote:
Dear clojure-users,
Loading a file with such content:
(ns ru.rules
(:use
protege.core
rete.core :exclude [rutime])
...
Thank you Jim. But, I mean this piece of API doc:
usefunction
Usage: (use args)
Like 'require, but also refers to each lib's namespace using
clojure.core/refer. Use :use in the ns macro in preference to calling
this directly.
'use accepts additional options in libspecs: :exclude, :only,
Jim, that is in project.clj right?
OP can use :refer and :exclude but can't pass two namespaces to :refer,
just one
some examples from clojure code:
(ns foo.bar
(:refer-clojure :exclude [ancestors printf])
(:require (clojure.contrib sql combinatorics))
(:use (my.lib this that))
2013/5/28 ru soro...@oogis.ru
Thank you Jim. But, I mean this piece of API doc:
It should be
(ns ru.rules
(:use protege.core
[rete.core :exclude [rutime]])
Unless you use Clojure 1.3, there is absolutely no reason to use :use. Use
:require with :refer:
(ns ru.rules
(:require
On 28/05/13 11:10, atkaaz wrote:
Jim, that is in project.clj right?
aaa yes :exclusions is for project.clj! I've still not fully waken up...
Jim
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
Michael,
Does (:require [protege.core :refer :all]) is equivalent to (:require
protege.core)?
вторник, 28 мая 2013 г., 13:42:25 UTC+4 пользователь ru написал:
Dear clojure-users,
Loading a file with such content:
(ns ru.rules
(:use
protege.core
rete.core :exclude [rutime])
...
2013/5/28 ru soro...@oogis.ru
Does (:require [protege.core :refer :all]) is equivalent to (:require
protege.core)?
No. (:require [protege.core :refer :all]) does roughly the following
* Loads and compiles proteger.core
* Stores it in the namespace map as proteger.core, so fn1 in it can be
The guys on the SPDY dev list said Jetty and Netty now have standalone SPDY
client libraries:
- Jetty: http://wiki.eclipse.org/Jetty/Feature/SPDY
[org.eclipse.jetty.spdy/spdy-core 9.0.3.v20130506]
[org.eclipse.jetty.spdy/spdy-client 9.0.3.v20130506]
On Tuesday, May 28, 2013 2:51:51 AM UTC-7, Phillip Lord wrote:
Given a secret key and encrypted nonce for that key, assert the
unencrypted nonce.
What I mean is that there is no way to express this in OWL alone. This
could be expressed in core.logic, in clojure, in java, in
There's not much you can do to retrieve the locals around an exception with
adding a Java Agent. REDL is able to get the locals around uses of
redl.core/break, since it's a macro and that's an ability of macros.
On Monday, May 27, 2013 10:10:39 PM UTC-4, Lee wrote:
On May 27, 2013, at 9:54
Thank you, Michael, for the detailed and comprehensive answer.
вторник, 28 мая 2013 г., 13:42:25 UTC+4 пользователь ru написал:
Dear clojure-users,
Loading a file with such content:
(ns ru.rules
(:use
protege.core
rete.core :exclude [rutime])
...
I get this error message:
Patrick Logan patrickdlo...@gmail.com writes:
On Tuesday, May 28, 2013 2:51:51 AM UTC-7, Phillip Lord wrote:
Given a secret key and encrypted nonce for that key, assert the
unencrypted nonce.
What I mean is that there is no way to express this in OWL alone. This
could be
On May 28, 2013, at 8:43 AM, dgrnbrg wrote:
There's not much you can do to retrieve the locals around an exception with
adding a Java Agent. REDL is able to get the locals around uses of
redl.core/break, since it's a macro and that's an ability of macros.
In Common Lisp exceptions are
On May 27, 2013, at 8:31 PM, Charles Harvey III wrote:
If you haven't tried out Light Table, it shows you the values of local
variables. It is a pretty nice feature.
I love the ideas behind LightTable and I check it out from time to time.
Checking it out now, though, regarding this issue,
On Tuesday, May 28, 2013 5:48:08 AM UTC-7, Phillip Lord wrote:
One of the things that I am sort of interested in with tawny is whether
there is any value to the overlap of Clojure and OWL in the same
syntax. It would be, for example, possible to annotate a Clojure
function with the OWL;
This might not be the proper example: If (/ 2 n) throws Divide by
zero then n == zero
On 28 May 2013 15:40, Lee Spector lspec...@hampshire.edu wrote:
On May 27, 2013, at 8:31 PM, Charles Harvey III wrote:
If you haven't tried out Light Table, it shows you the values of local
variables. It is
On May 28, 2013, at 10:32 AM, Rostislav Svoboda wrote:
This might not be the proper example: If (/ 2 n) throws Divide by
zero then n == zero
Well yes of course it's obvious what the problem is in this case!
The point is that if the bad function was more complicated then might help to
know
On Tue, May 28, 2013 at 9:36 AM, Lee Spector lspec...@hampshire.edu wrote:
On May 28, 2013, at 8:43 AM, dgrnbrg wrote:
There's not much you can do to retrieve the locals around an exception
with adding a Java Agent. REDL is able to get the locals around uses of
redl.core/break, since it's a
Huh. I just solved it. The debug exception handler has to do something a
bit fancier, that's all:
1. Dig up the bytecode of the method executing the throw and copy it
somewhere.
2. Unwind by one call.
3. Take the bytecode in 1, alter it to wrap the throw site in
redl.core/break's macro expansion
Hi everyone,
sometimes I feel really stupid!
I am currently looking at a well-known java library's tests and found this:
Assert.assertArrayEquals(arrayOutput[0], arrayOutput[1], 0.01);
//arrayOutput is a 2d double-array btw
since I've basically wrapped this lib, I'd like to port the java
It doesn't seem to be in the published javadoc, but this is an array
comparison with an epsilon tolerance, which was likely added after the
published javadoc was generated. 0.01 here is the maximum permitted
absolute difference between each compared number.
ooo thanks Chris! I was suspecting the exact same thing because I tried
this:
(is (= (seq (aget ready 0))
(seq (aget ready 1
and got this:
expected: (= (seq (aget ready 0)) (seq (aget ready 1)))
actual: (not (= (-0.5345224838248488 0.2672612419124244
0.801783725737273*1*)
(defn acmp [a1 a2 tolerance]
(every? #( % tolerance)
(map #(Math/abs (- %1 %2)) (seq a1) (seq a2
user= (acmp (double-array [0.01 0.7 2.2])
(double-array [0.011 0.695 2.199])
0.01)
true
user= (acmp (double-array [0.01 0.7 2.2])
(double-array [0.011
aww cool! thanks Cedric :)
On 28/05/13 18:02, Cedric Greevey wrote:
(defn acmp [a1 a2 tolerance]
(every? #( % tolerance)
(map #(Math/abs (- %1 %2)) (seq a1) (seq a2
user= (acmp (double-array [0.01 0.7 2.2])
(double-array [0.011 0.695 2.199])
0.01)
true
YW.
Though, you might want to refine it a bit to support BigDecimal and avoid
reflection.
(defn abs [x]
(cond
(instance? BigDecimal x)
(let [^BigDecimal x x]
(.abs x))
(instance? Double x)
(let [^Double x x]
(Math/abs x))
(instance? Float x)
(let [^Float x
May I suggest that as useful as your strategies are, they cannot replace a
debugger? Let's be clear about our logic before claiming it is not much
needed. Maybe YOU really don't need it, but that is different from
claiming it is not needed.
A debugger as good as it is cannot replace the 4
Are there any existing libs for the evaluation of math expressions? For
example, if the user enters x + sin(y), parse and evaluate the
expression, given vectors of floats for x and y.
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to
On 5/28/13 10:37 AM, Cedric Greevey wrote:
Huh. I just solved it. The debug exception handler has to do something
a bit fancier, that's all:
1. Dig up the bytecode of the method executing the throw and copy it
somewhere.
2. Unwind by one call.
3. Take the bytecode in 1, alter it to wrap the
On May 28, 2013, at 12:37 PM, Cedric Greevey wrote:
I think locals clearing is simply incompatible with ever having full debug
info at an error site without anticipation of an error at that site, and with
anticipation you can put debug prints, logging, watchers, and suchlike at the
site.
I did a fair amount of programming in C# before switching to Clojure. I
noticed an interesting fact: the more lazy (as in using lazy-seqs) and
functional my code became, the more erratic the was the flow of execution.
It's my personal opinion, that as these features are used more and more in
a
Still miss the Elisp debugger, which is great. It's right there, in your
editing environment. It's good for debugging my own code. It's really
good for working out someone elses code. I wish I debug clojure in the
same way. It's not essential, of course. But nice.
Phil
I miss the
What about logging aggressively but also aggressively dumping older log
entries? Keep only, say, the last 100 or 1000 entries. Something like:
(def logger (atom nil))
(def max-log-entries 1000)
(def log-file whatever)
(defn log [msg]
(swap! logger
(fn [oldlog]
(let [newlog (doall
On 5/28/13 12:19 PM, Lee Spector wrote:
On May 28, 2013, at 2:16 PM, Ben Mabey wrote:
You can disable locals clearing with a compiler flag. nrepl-ritz even has
helper function that will compile the given form using that flag. If you want
to disable locals clearing on a project wide basis
On May 28, 2013, at 2:16 PM, Ben Mabey wrote:
You can disable locals clearing with a compiler flag. nrepl-ritz even has
helper function that will compile the given form using that flag. If you
want to disable locals clearing on a project wide basis you can do so with
lein's JVM opts.
On May 28, 2013, at 2:40 PM, Ben Mabey wrote:
The flag is a system property:
-Dclojure.compiler.disable-locals-clearing=true. So you can add that
string to your project.clj's :jvm-opts if you are using lein. This will, of
course, slow down your program but when I've used it in the past
Incanter has some stuff that does this:
http://data-sorcery.org/2010/05/14/infix-math/
this looks even closer to what you're looking for:
https://github.com/tristan/clojure-infix
On Tue, May 28, 2013 at 2:19 PM, Brian Craft craft.br...@gmail.com wrote:
Are there any existing libs for the
On 5/28/13 1:05 PM, Lee Spector wrote:
On May 28, 2013, at 2:40 PM, Ben Mabey wrote:
The flag is a system property:
-Dclojure.compiler.disable-locals-clearing=true. So you can add that string
to your project.clj's :jvm-opts if you are using lein. This will, of course, slow down
your program
Quite a few views but no bites ... what have I done wrong in asking this
question? If you can't help with the problem would you please take a moment
to help me understand what has put you off?
Too much code not enough data?
Problem too complex to grasp with the supplied info?
Too dull?
Am
Thanks, I'd seen those. Incanter is jvm only, I think, which is less useful
to me. clojure-infix looks dead, but maybe I can adapt it.
On Tuesday, May 28, 2013 12:42:11 PM UTC-7, travis vachon wrote:
Incanter has some stuff that does this:
http://data-sorcery.org/2010/05/14/infix-math/
Aw, come on. No need to squander value back out of the world.
On Monday, May 27, 2013 8:02:28 PM UTC-5, Kelker Ryan wrote:
I wrote it for fun and deleted after no one took interest. There was no
real purpose other than to see if it could be done.
28.05.2013, 08:33, Plínio Balduino
Could you include the code in client/get? Not sure where that comes
from and it would be helpful to run the code to see what happensno
guarantees though =)
On May 28, 1:05 pm, Mond Ray mondraym...@gmail.com wrote:
Quite a few views but no bites ... what have I done wrong in asking this
I maintain the strategies summarized by Stuart are a better alternative
than repetitive debugging sessions because they change the core of how you are
thinking about design and coding, forcing you to have a broader view
about how you are doing things and preventing problems before
they appear.
I
I started a project with lein new. I had a jar file I needed to include
in this project (a recommended class from a company that has an API that we
are using -- it would be pointless for me to re-write their code, so I
simply grabbed the class they offered and compiled it as a jar). I ended up
Ah ... client/get is part of the standard httpclient library so it's not my
code - it fetches from a url. Sorry I should have included the libraries
that I used.
On Tuesday, May 28, 2013 10:33:52 PM UTC+2, nchurch wrote:
Could you include the code in client/get? Not sure where that comes
On Tuesday, May 28, 2013 1:01:46 PM UTC-7, Ben Mabey wrote:
On 5/28/13 1:05 PM, Lee Spector wrote:
On May 28, 2013, at 2:40 PM, Ben Mabey wrote:
The flag is a system property:
-Dclojure.compiler.disable-locals-clearing=true. So you can add that
string to your project.clj's :jvm-opts
On May 28, 2013, at 15:05 , Mond Ray mondraym...@gmail.com wrote:
Quite a few views but no bites ... what have I done wrong in asking this
question? If you can't help with the problem would you please take a moment
to help me understand what has put you off?
It would help to post less
And, of course, Engelberg's objection then applies again: you have to have
the bug, disable locals clearing, and then try to reproduce the bug again
in order to have the otherwise-cleared locals available in the debug
session.
Clojure just doesn't make what he asked for easy, by its nature.
Thanks - I wasn't sure how much to assume so that's appreciated. I will
definitely check for the correctness of the predicate vs the date - that
would really be a face palm!
OTOH I feel good that I'm actually writing sane Clojure code even if it is
broken with my data ;-)
Ray
On Tuesday, 28
On Tue, May 28, 2013 at 1:35 PM, Softaddicts
lprefonta...@softaddicts.ca wrote:
I came to the same conclusion as Stuart after 30+ years of coding in various
languages/assemblers and architectures.
Interesting thread and I find myself in agreement with Luc here. I've
been programming
You could just write this yourself.
It's easier than it looks.
First start with an evaluator for rpn (reverse polish notation) expressions.
x + sin(y) in rpn would be y sin x +.
First you split that string and make it into a list.
Then you can evaluate that with a few lines of code using a stack.
Found this: http://www.objecthunter.net/exp4j/
Might be useful.
Jonathan
On Wed, May 29, 2013 at 12:45 AM, SpiderPig spiderpi...@googlemail.comwrote:
You could just write this yourself.
It's easier than it looks.
First start with an evaluator for rpn (reverse polish notation)
expressions.
On May 28, 2013, at 5:10 PM, Alan Malloy wrote:
The principal problem of disabling locals-clearing is not slowing things
down, but rather causing perfectly reasonable code to consume unbounded
memory. For example, consider: ((fn [xs] (nth xs 1e8)) (range)). With locals
clearing, the
Hi all!
I recently began learning Clojure, and I like it a lot; then I found this
group on google. Is there any particular reason that it's not called
comp.lang.clojure? :-) But anyway, this is the official user group for
Clojure, right?
Many thanks! :-)
Best,
Seven Hong
--
--
You
I have managed to create a function that will read an ATOM feed
indefinitely and now need a way to stop it ;-)
(defn fetch-atom-chunk
Returns an ATOM chunk from the feed-url
[feed-url]
(:ATOM_FEED (:body (client/get feed-url {:as :json}
(defn fetch-atom-feed
Returns a list of ATOM
Hi All,
I want to use clojure to write map reduce tasks on Hadoop version 0.22. I
was wondering if this is possible with Stuart Sierra's clojure hadoop
https://github.com/stuartsierra/clojure-hadoop
If not, are there other libraries which allow me to write map-reduce jobs
in clojure?
-ramesh
Names like comp.lang.clojure are used only for groups accessible outside
of Google, using the NNTP protocol (Usenet). Google-local groups (which are
instead mailing lists) don't follow that naming convention.
On Tue, May 28, 2013 at 7:39 PM, Seven Hong sir.seven.h...@gmail.comwrote:
Hi all!
I'll re-write it, but I have my doubts as to why anyone would use it. It was
just an experiment to see if it could be done.
29.05.2013, 05:22, Dan Neumann danrod...@gmail.com:
Aw, come on. No need to squander value back out of the world.
On Monday, May 27, 2013 8:02:28 PM UTC-5, Kelker Ryan
A couple more replies to comments on this thread:
On May 28, 2013, at 5:50 PM, Cedric Greevey wrote:
Clojure just doesn't make what he asked for easy, by its nature. Designing to
minimize difficulty with reproducing any observed behavior seems to be
indicated (and desirable for other
There is also cascalog: https://github.com/nathanmarz/cascalog
On 2013-5-29, at 上午7:55, Ramesh ramesh10dul...@gmail.com wrote:
Hi All,
I want to use clojure to write map reduce tasks on Hadoop version 0.22. I
was wondering if this is possible with Stuart Sierra's clojure hadoop
On Wednesday, 29 May 2013 02:19:41 UTC+8, Brian Craft wrote:
Are there any existing libs for the evaluation of math expressions? For
example, if the user enters x + sin(y), parse and evaluate the
expression, given vectors of floats for x and y.
You can evaluate expressions like this right
Here is some example code
http://pastebin.com/HG2bWWms
This allows you to evaluate infix or rpn expressions. It also demonstrates
the use of eval to turn the expression into a clojure function which should
give more performance.
It is very simple though, so all the elements in the expressions
On Tue May 28 02:40:33 2013, Dmitry Groshev wrote:
Sorry, I wasn't clear enough in my proposal.
I've mentioned clojurecheck [1] in it and the possibility of extending
it, because in my Erlang experience property-based testing is
extremely helpful for things that operates on something pure in
One technique I've used in the past for debugging is to open a UDP
port as a log stream and print messages to that stream. These messages
can be read at any time by a telnet connection to that port.
Since UDP packets that are not read just get dropped this is equivalent
to writing to /dev/null
Try:
(defn fetch-atom-feed
Returns a list of ATOM chunks from the feed-url going back to the
from-date
[feed-url]
(if-let [chunk (fetch-atom-chunk feed-url)]
(cons chunk (lazy-seq (fetch-atom-feed (:HREF (:PREVIOUS_LINK
chunk)))
On Tue, May 28, 2013 at 6:30 AM, mond
On Saturday, May 18, 2013 11:54:55 AM UTC+7, Murtaza Husain wrote:
Hi,
Thanks for the project , the language extensions are fantastic !
One of the problems I have had in working with cljs is the compatibility
and awkward syntax in working with external js libs. This goes a long long
You can give ChlorineJS a try:
http://plnkr.co/edit/gist:5469561?p=preview
Please note there's currently a bug with Plunker and some versions of
Firefox so in the mean time you should check it with other browsers.
--
--
You received this message because you are subscribed to the Google
75 matches
Mail list logo