Hello,
I came across the Clojure group via a blog and didn't want to spam it and
decided to contact you directly.
I'm wondering if this can be posted to the group:
#Metricata makes the software engineering process measurable and repeatable.
ses.newventurewebsites.com
Looking forward,
Hello,
I'm trying to implement some business model in Clojure. I have several
years of experience developing OO systems in Java. So it's still very hard
to wrap my head to functional thinking. I hope you can help me with
following questions.
I need a domain model for customers, contracts and
On Fri, Jul 5, 2013 at 8:53 PM, Carlo Zancanaro
carlozancan...@gmail.com wrote:
Is there a
reason you don't use the database's table/column name quoting? It means that
keywords like :first-name cannot be used as table names without a fair bit
of trouble.
The DSL in java.jdbc supports
If it uses clojure or is for clojure and with more information about the
product I think there speak nothing agianst it, if you post it.
It is not so good to register before you can get any information about
the product, so more infos are needed.
VG
Marcus
Am 05.07.2013 19:37, schrieb
I find the modelling Clojure data structures very similar to working out
what your aggregates roots are for domain-driven design or using a document
data store.
I would suggest avoiding using refs in a customer map. In this case, it
sounds like customer is your natural aggregate root, so you
Hi Marc,
But the domain model I'm thinking of has lots of mutable things that
change over time when I execute the business actions.
In your case, you don't need any STM to model any of your domain. I'd go
so far as to say that to use refs for this is almost certainly a mistake.
Of course the
Got an out of memory when experimenting with core.async channels in go
blocks. The following is a simple example.
(defn go-loop
[]
(let [c0 (chan)]
(while true
(go
(! c0 1))
(go
(println (! c0))
;(.start (Thread. go-loop))
Clojure 1.5.1, Java 1.7.0_25 32-bit running under
Hi all,
I wrote a small site using compojure and friend and naturally I used ring's
own wrap-session to handle sessions. My code looks like this:
(def app
(- app-routes
(friend/authenticate {:credential-fn (partial
creds/bcrypt-credential-fn
Composing queries is done via compose.
Take a look here:
https://github.com/r0man/sqlingvo/blob/master/test/sqlingvo/test/core.clj#L16
On Saturday, July 6, 2013 5:46:06 AM UTC+2, Carlo wrote:
Hey Roman,
The issue that I see with `sqlingvo`, and the thing which I was trying to
solve for
So far, I really like Garden.
There's one thing though that's making it difficult. It's hard to see that
nested rules are nested.
;; hard to see nesting[:footer {:color red
:background-color blue}
[:a {:color green}]]
;; much easier(:footer {:color red
:background-color
This is a fairly restricted composition, though:
(def triangles (compose (select [:color :num_sides] (from :shapes))
(where '(= :num_sides 3
(def green-triangles (compose triangles
(where '(= :color green
(sql green-triangles)
;=
Good morning everyone!
I have a problem that I have been struggling with for a few days now. I
have a directed acyclic graph that I am trying to walk, and can't seem to
figure out a to prevent my walking already visited branches. Here is the
code
(def values
[{:v a :parent [b]}
{:v b
On Jul 6, 2013, at 9:33 AM, looselytyped raju.gan...@gmail.com wrote:
Good morning everyone!
I have a problem that I have been struggling with for a few days now. I have
a directed acyclic graph that I am trying to walk, and can't seem to figure
out a to prevent my walking already
Sorry, my second method should have been:
$ curl -L https://github.com/clojure/clojure/archive/gh-pages.tar.gz | tar
xvzf -
Enjoy!
Tom
On Sunday, June 30, 2013 7:44:17 PM UTC-4, David Pollak wrote:
Folks,
Is there an offline package of Clojure docs (the full core.* api docs,
cheat
Oh, two more things.
First, it would be really cool to have a tool to convert CSS to GardenCSS.
MichaĆ Marczyk suggested using Instaparse with the CSS3 grammar, which
sounds like a really easy way to make this happen. Unfortunately I don't
have the time or skill to do it, but if anyone else does,
Give this a go:
(defn ^:private walk-tree* [all seen to-do]
(when-let [[curr others] to-do]
(if (contains? seen curr)
(recur all seen others)
(lazy-seq
(when-let [node (first (filter #(= (:v %) curr) all))]
(println node)
(cons curr
Dear Stanislav,
Thank you. You got me going down the right path. Upon looking around for a
BFS solution, I came across this blog post
http://hueypetersen.com/posts/2013/06/25/graph-traversal-with-clojure/that
had me going down the right direction. Which leads me to Carlo's response
-- You
You can do this with the second argument to the where function. I added an
example here:
https://github.com/r0man/sqlingvo/blob/master/test/sqlingvo/test/core.clj#L24
On Saturday, July 6, 2013 4:02:23 PM UTC+2, Carlo wrote:
This is a fairly restricted composition, though:
(def triangles
Hi,
Does there exist a Hudson/Jenkins plugin for leiningen to trigger a build
when a SNAPSHOT dependency gets updated?
Warmest regards,
Trevor
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
This isn't a bug, you're in a infinite loop constructing go blocks. You
should probably move the loops into the go blocks.
David
On Sat, Jul 6, 2013 at 7:31 AM, MikeM michael.messini...@invista.comwrote:
Got an out of memory when experimenting with core.async channels in go
blocks. The
On Saturday, July 6, 2013 11:46:51 AM UTC-4, David Nolen wrote:
This isn't a bug, you're in a infinite loop constructing go blocks. You
should probably move the loops into the go blocks.
I assumed go blocks are garbage collected when they go out of scope, but
maybe I don't understand
On Fri, Jul 5, 2013 at 1:06 PM, David Rocamora dro...@gmail.com wrote:
I'm trying to use featurec to describe some relationships within a nested
map. When I try to use it to find some keys in the map it returns nothing.
Here is an example:
I don't believe you can match on the keys in a map
I have a plain text file containing an English-language essay that I'd like
to split into sentences, based on the presence of punctuation.
I wrote this function to determine if a given character is an English
punctuation mark:
(defn ispunc? [c]
( (count (filter #(= % c) '(. ! ? ;))) 0))
I
I have a plain text file containing an English-language essay I want to
split into sentences, based on common punctuation.
I wrote this function, which examines a character and determines if it's an
end of sentence punctuation mark:
(defn ispunc? [c]
( (count (filter #(= % c) '(. ! ? ;)))
On Sat, Jul 6, 2013 at 11:42 AM, Denis Papathanasiou
denis.papathanas...@gmail.com wrote:
(def my-text (slurp mytext.txt))
(def my-sentences (partition-by ispunc? my-text))
Unfortunately, this returns a sequence of 1, whose first and only element
contains the entire text, since ispunc?
I use this regex usually it's been a while since I last used it so I
odn't remember how it performs...
#(?=[.!?]|[.!?][\\'\])(?!e\.g\.|i\.e\.|vs\.|p\.m\.|a\.m\.|Mr\.|Mrs\.|Ms\.|St\.|Fig\.|fig\.|Jr\.|Dr\.|Prof\.|Sr\.|[A-Z]\.)\s+)
and as Lars said all you need is clojure.string/split
Jim
On
Hey,
cookie-store does not expect a string but a map like (cookie-store {:key
your-key}) otherwise it will generate a random new key each restart, which
you observed.
You can also set some options for the cookie itself, see :cookie-attrs
It's so cool,great job!
But i don't find any way to do io blocking operations such as socket.read
in 'go'.
Is there a roadmap to make alts! working with java NIO selector that waits
on socket channels?
Then we can read/write data with socket/file channel in go without blocking.
Thanks,it's really
Go blocks are GC'd but not until they complete running. The problem is that
you're creating go blocks faster than they can run. Creating go blocks is
very cheap, taking/putting into channels is also cheap but not quite as
cheap. Therefore the outer loop will eventually allocate so many blocks
that
On Sat, Jul 6, 2013 at 10:07 PM, Thomas Heller th.hel...@gmail.com wrote:
Hey,
cookie-store does not expect a string but a map like (cookie-store {:key
your-key}) otherwise it will generate a random new key each restart, which
you observed.
You can also set some options for the cookie
Monger (http://clojuremongodb.info) is a Clojure MongoDB client for a more
civilized
age.
1.6.0 is a minor release that that makes it easier to work with multiple
databases.
Release notes:
http://blog.clojurewerkz.org/blog/2013/07/06/monger-1-dot-6-0-is-released/
--
MK
2013/7/6 MikeM michael.messini...@invista.com:
Got an out of memory when experimenting with core.async channels in go
blocks. The following is a simple example.
(defn go-loop
[]
(let [c0 (chan)]
(while true
(go
(! c0 1))
(go
(println (! c0))
;(.start (Thread.
Hi,
I wanted to use featurec to generate hash-map,
similarily to a way I use membero when generating lists.
i.e
= (run 1 [q]
#= (membero :a q))
((:a . _0))
Unfortunately when I try to do something \w it, it throws exception
= (first *1)
(1 . _0)
= (first *1)
IllegalArgumentException Don't
Validateur (http://clojurevalidations.info) is a data validation library
inspired by Ruby's ActiveModel.
1.5 is a minor release that introduces error message customization.
Release notes:
http://blog.clojurewerkz.org/blog/2013/07/06/validateur-1-dot-5-0-is-released/
--
MK
On Saturday, July 6, 2013 1:22:32 PM UTC-4, Lars Nilsson wrote:
[snip]
If that kind of splitting is really all you require,
(clojure.string/split my-text #[.!?;]) or (re-seq #[^.!?;]+
my-text)
Thanks!
Is there any way to preserve the actual punctuation? That's why I was
looking at
On Saturday, July 6, 2013 1:54:49 PM UTC-4, Jim foo.bar wrote:
I use this regex usually it's been a while since I last used it so I
odn't remember how it performs...
#
On Sat, Jul 6, 2013 at 3:16 PM, Adam Saleh adamthecam...@gmail.com wrote:
= (run 1 [q]
#= (membero :a q))
((:a . _0))
Unfortunately when I try to do something \w it, it throws exception
= (first *1)
(1 . _0)
= (first *1)
IllegalArgumentException Don't know how to create ISeq from:
On Sat, Jul 6, 2013 at 12:27 PM, Norman Richards o...@nostacktrace.comwrote:
On Fri, Jul 5, 2013 at 1:06 PM, David Rocamora dro...@gmail.com wrote:
I'm trying to use featurec to describe some relationships within a nested
map. When I try to use it to find some keys in the map it returns
On 6 July 2013 20:07, Thomas Heller th.hel...@gmail.com wrote:
You can also set some options for the cookie itself, see :cookie-attrs (
http://clojuredocs.org/ring/ring.middleware.session/wrap-session) which
should fix your expiration issues.
In this case it doesn't matter much, but note
On Sat, Jul 6, 2013 at 5:02 PM, Denis Papathanasiou
denis.papathanas...@gmail.com wrote:
On Saturday, July 6, 2013 1:22:32 PM UTC-4, Lars Nilsson wrote:
[snip]
If that kind of splitting is really all you require,
(clojure.string/split my-text #[.!?;]) or (re-seq #[^.!?;]+
my-text)
Is there
On Saturday, July 6, 2013 4:01:31 PM UTC-4, tbc++ wrote:
Go blocks are GC'd but not until they complete running. The problem is
that you're creating go blocks faster than they can run. Creating go blocks
is very cheap, taking/putting into channels is also cheap but not quite as
cheap.
The obvious approach is to use a future or other thread as an intermediary
between the blocking I/O read and a channel, then use ! on the channel in
a go; something like:
(go
(let [c (chan)]
(future (!! c (my-blocking-io-read some-stream)))
(let [thingy (! c)
(do-something-with
I have doubts about the assertion that it can make software engineering
... repeatable, on firm theoretical ground and additionally backed by
experience. Programming is not a kind of manufacturing; the manufacturing
is done by way if right-drag copy files here, uploading to Github and
Sourceforge,
Hi Steven,
I know that readability is a bit of an issue for some people. Unfortunately
there isn't much I can do other than point folks to the defrule macro and some
of the other suggestions I've made. As I work with the Garden I see problem
areas too and am working to find solutions that will
I am not aware of one that does that. I end up using a pom style project. As
a prebuild step I generate the pom using lein. Then my maven step does a lein
validate (basically a dummy step) and then do post build steps that do the lein
commands like lein test. It is not a perfect solution
Right, I understand how defrule works. But I actually do have 27 [i.e.
O(n)] distinct rules, so it's not a feasible solution.
Because when I write CSS, I only style domain-specific class names (.cart,
.license), never mentioning the elements they just so happen to use at the
moment (h1, p, a).
Cool. I'm glad you like the library. Thanks for sharing your kind words and
thoughts. :)
I admit it's weird that it just vector-izes its arguments, and does nothing
else.
In that case I don't think you need a macro, just alias rule to vector and
you'll achieve the same end.
I think it should
47 matches
Mail list logo