The as- macro doesn't work with destructuring. This is invalid code:
(- [1 2]
(as- [a b]
[a (inc b)]
[(inc a) b]))
Because it is expanded to:
(let [[a b] [1 2]
[a b] [a (inc b)]
[a b] [(inc a) b]]
[a b]) ;; this last expression will not
Alexandru Nedelcu a...@bionicspirit.com writes:
On Wed, May 7, 2014 at 5:57 PM, Phillip Lord
phillip.l...@newcastle.ac.ukwrote:
In general, though, if I write some code like
(if (instance? Cons x)
(pass-to-another-thread-without-synchronisation x))
I cannot guarantee the result of
Guys, you really are into the Literate part, those emails are huge! let me
catch up and then I'll reply...
Interesting discussion!
On Thu, May 8, 2014 at 4:59 PM, Mark Engelberg mark.engelb...@gmail.comwrote:
On Thu, May 8, 2014 at 11:02 AM, Mark Engelberg
mark.engelb...@gmail.comwrote:
The multi-if was a typo it should be iif. I know if I am passing in a even
pairs :then 'dosomething :else 'dosomethingelse works fine with {:keys}.
What I think I should be doing is somehow grab whats in :then/:else and
wrap in a (do). At this point I was just wondering how to solve for this
In the past I've used a java tool to write acceptance tests. Concordion [
http://concordion.org/]. The idea is simple yet effective. You write your
documentation in HTML, and later you can run your code that will interact
with that documentation and generate a new documentation, marking the
On Fri, May 9, 2014 at 8:33 AM, Erlis Vidal er...@erlisvidal.com wrote:
In the past I've used a java tool to write acceptance tests. Concordion [
http://concordion.org/]. The idea is simple yet effective. You write your
documentation in HTML, and later you can run your code that will interact
Thanks Alexandru! That was insightful. :)
Even the JLS's (non-normative?) text is confusing IMHO. Section 17.5 ends
with this paragraph:
The usage model for final fields is a simple one. Set the final fields for
an object in that object's constructor. Do not write a reference to the
object
I've always seen this to document what the system does, as a way to gather
requirements. And the name used is similar to what you propose. Live
Specification or Specification by Example among other names.
It never occurred to me that this could be used for API documentation, and
I'm a completely
puzzler and Tim,
Well said, gentlemen. As someone who has been using LP heavily for the
past two years, I have certainly reaped many if not most of the benefits
regularly argued in its favor (and of course, I've wrestled with all the
usual tooling issues as well). While I agree with puzzler
With respect to documentation of open source software...
You keep using that word. I don't think it means what you think it
means. -- The Princess Bride
The notion that reading the code is the ultimate truth for
documentation is based on a misunderstanding at so many levels it is
hard to
I try to make this assigment :
Write the function (contains-duplicates? sequence) that takes a sequence as
a parameter and returns true if sequence contains some element multiple
times. Otherwise it returns false.
So I did this :
(defn contains-duplicates? [a-seq]
(let [element (fn
Hi,
What should my approach be, if I want my headless server to run a client
program that uses the client GUI?
How can my server provide the same resources as a local client, to use GUI
objects?
I have a Clojure program that opens a file dialog on the client. It works
fine, until I try to
Although still in pre-1.0, I'm happy enough with a library I've been
working on to make an official release.
Hermod is a network-aware message passing library built on core.async. The
details are best explained by the project's README:
https://github.com/halgari/com.tbaldridge.hermod
There are
There is a 3rd part to this series. Enjoy...
Robert Lefkowitz -- The Semasiology of Open Source (part 3)
http://daviding.wordpress.com/2007/10/22/robert-lefkowitz-the-semasiology-of-open-source-part-iii-oscon-2007-it-conversations-20060726/
Tim
--
You received this message because you are
This sounds more like a problem with remote access to X-Windows (the Unix
graphical back-end) than a Clojure-specific problem. You might find some
helpful answers in Ubuntu docs, forums, or chat rooms.
-S
On Friday, May 9, 2014 6:57:26 AM UTC-4, stiffyrabbit jr wrote:
Hi,
What should my
I'm not exactly clear what you're trying to do, but I had similar problems
with running Seesaw tests on Travis CI. Here's the settings I used to work
around it:
https://github.com/daveray/seesaw/blob/develop/.travis.yml
Hope this helps,
Dave
On Fri, May 9, 2014 at 10:52 AM, Stuart Sierra
Your function is essentially:
(= (map count coll) 1)
So you're applying the function count to each element in the collection.
Let's say your collection is:
[1 2 3]
Then you're trying to evaluate:
[(count 1) (count 2) (count 3)]
Clojure is raising an exception that says I can't
oke,
Then I have to fnd another way to see how many times a number is present in
a collection.
I thought count could do that.
Roelof
Op vrijdag 9 mei 2014 20:24:29 UTC+2 schreef James Reeves:
Your function is essentially:
(= (map count coll) 1)
So you're applying the function
I just released version 0.3.1 of lein-modules [1]. I've fixed a lot of
bugs, added one feature, and slightly changed the behavior since the last
time I announced a release.
What is it?
It's a Leiningen plugin that lets you treat a set of related projects
stored in a single SCM repository as
Hi all,
I've noticed there's no Clojure library for doing XML Digital signatures.
So I'll probably put one out there, if I can completely solve this problem.
Using Java's *XML Digital Signature API
http://docs.oracle.com/javase/7/docs/technotes/guides/security/xmldsig/XMLDigitalSignature.html*,
Sorry, just reading this now.
I've pivoted on that project, and that code is no longer around. We were
going to store analytics data in that atom, but instead are going to do JVM
and other kinds of profiling.
But if you look at my first message, component *:a* would have had the
atom. The
Is this behavioral change in Clojure 1.6.0 expected? Under 1.6.0, a set and
a map seem to treat a java.util.ArrayList differently with respect to its
equivalence to a vector.
https://gist.github.com/duelinmarkers/7c9f84cfc238e5d37a09
user= (- {} (assoc [1 2] vec) (assoc (java.util.ArrayList. [1
Perhaps this is a consequence of the hashing changes in 1.6.
(http://dev.clojure.org/display/design/Better+hashing)
--
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
Thanks Herwig. I take it
test_namespace.cljhttps://github.com/bendlas/data.xml/blob/master/src/test/clojure/clojure/data/xml/test_namespace.cljis
the interesting file. Given the example in my previous message, is
there
a more idiomatic way of defining namespaces with this proposal?
Thanks again
Indeed. The OP contacted me offlist and I suggested running a virtual
framebuffer for X11 and sent them a link.
Sean
On May 9, 2014, at 10:52 AM, Stuart Sierra the.stuart.sie...@gmail.com wrote:
This sounds more like a problem with remote access to X-Windows (the Unix
graphical back-end)
If you only created the atom once, the value of the atom would be the same
no matter where you dereferenced it. If you're seeing two different atoms,
then the code that created the atom must have been executed more than once.
Without seeing your code it's impossible to know for sure how that
Mike is correct. This change in behavior is due to the hashing changes in
Clojure 1.6. See the comments on ticket
http://dev.clojure.org/jira/browse/CLJ-1372 for some discussion of whether
this is considered a bug. It appears that perhaps the hash consistency is
not promised for mutable
I can see this being the case. Nominally, my component looks like this.
Before I log a bug however, let's see first, if anyone is seeing this
behaviour.
(ns a
(:require [com.stuartsierra.component :as component]
[taoensso.timbre :as timbre]))
(defrecord A [env]
This refheap link https://www.refheap.com/85304 is, so far, the Clojure
code that generates the XML in fig.3.
Tim Washington
Interruptsoftware.com http://interruptsoftware.com
On Fri, May 9, 2014 at 5:29 PM, Timothy Washington twash...@gmail.comwrote:
Hi all,
I've noticed there's no
Literacy, Programming, and Open Source by Robert M Lefkowitz
http://www.youtube.com/watch?v=JxjTsQtxn8A
--
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
I am new to functional programming and caught myself reading “reduce” as “the
reduction of.”
Do you experienced Clojure programmers find yourselves thinking in terms of
nouns instead of verbs? (Non-temporal expressions as opposed to actions?)
Some of the operations reinforce this way of
And I thank you both. I was advised to set the display:
*export DISPLAY=:99.0*I'm just wrestling with the line
*sh -e /etc/init.d/xvfb start*
which returns:
sh: 0: Can't open /etc/init.d/xvfb
My machine reports that *xvfb is already the newest version but, *I get the
same response. I
Are you running this as a superuser? (su or sudo)
On Sat, May 10, 2014 at 1:03 AM, stiffyrabbit jr
deliverebay...@googlemail.com wrote:
And I thank you both. I was advised to set the display:
*export DISPLAY=:99.0*I'm just wrestling with the line
*sh -e /etc/init.d/xvfb start*
which
Never thought of it that way, I always verb the noun.
Did you learn about reductions, yet? It's clear that the name corresponds
to the intended output at least in that case.
On Friday, May 9, 2014, Mike Fikes mikefi...@me.com wrote:
I am new to functional programming and caught myself reading
34 matches
Mail list logo