If you're willing to dig into another language, 'Erlang and OTP in
Action' gives a great overview of Erlang and the distributed
principles underlying that language. Though different from the
approach of distributed STM, the concepts of distributed applications
are baked into the core of Erlang.
On
Consider the following:
(ns my.namespace.here)
(use 'my.namespace.here :reload)
(require '[my.namespace.here :as something])
(import [my.package MyClass1 MyClass2])
1. Why (at least!) 4 different ways of noting namspaces/domains: With
or without the escape-mark (') and with or withou
In Clojure in Action (still in MEAP i think) there's a chapter about
using (Erlang/OTP-based) RabbitMQ message queue server for making
Clojure scalable in a Hadoopish map-reduce-way.
Avout seems to solve many of the problems that easily could occur in
such an approach by not needing a centralized
Also in a REPL you can do the following:
user> (use 'example.core)
nil
user>
But in a source file you have to do:
(ns stuff.core
(:use 'example.core))
I think I've seen the reason for this difference once before but can
someone more learned *please* explain :)
Thanks
Nelo
Ps: this exact
On Wed, Nov 30, 2011 at 12:24 AM, Ambrose Bonnaire-Sergeant
wrote:
> Byrd, Friedman, Byrd, Friedman, Byrd, Friedman :)
Was their presentation actually recorded? I don't recall confreaks
being there, but then again, I was too busy watching an excellent
presentation...
--
You received this messag
Yes!
On Wed, Nov 30, 2011 at 8:12 PM, Doug South wrote:
> On Wed, Nov 30, 2011 at 12:24 AM, Ambrose Bonnaire-Sergeant
> wrote:
> > Byrd, Friedman, Byrd, Friedman, Byrd, Friedman :)
>
> Was their presentation actually recorded? I don't recall confreaks
> being there, but then again, I was too bu
Ahem,
considering that I regularly alternate between MySql, Postgres and Oracle
databases, I like
the idea of just calling a pop menu like "Create table (full)" and let Aqua
spit out the DDL in an adjacent window
while having a database explorer pane on the left :)
Memory becomes a pricey real
Even though I've written only one toy web framework in Clojure[1], (I
think) I know the difference.
Because there is documentation for use and ns, I'll add my own only :)
I interpret "(use 'ns)" as "Use 'ns namespace within *current* namespace -
from your example, 'user'. Usually for REPL.
(ns
This has been heavily discussed, and some work is underway to mitigate
it.
See http://dev.clojure.org/display/design/Loading%2C+Compiling%2C+and+Namespaces
-S
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to cloju
This should now be fixed in version 1.0.6.
-Matt
On Nov 29, 12:03 am, Luc Prefontaine
wrote:
> Hi Matt,
>
> working with this stuff... pretty sure I can make rake obsolete pretty soon :)
>
> However I am struggling with the auto increment column attribute...
>
> (create-table
> :meta-entities
Thank you,
Luc
On Wed, 30 Nov 2011 07:18:56 -0800 (PST)
Matt wrote:
> This should now be fixed in version 1.0.6.
>
> -Matt
>
> On Nov 29, 12:03 am, Luc Prefontaine
> wrote:
> > Hi Matt,
> >
> > working with this stuff... pretty sure I can make rake obsolete
> > pretty soon :)
> >
> > However
Awesome, so it looks like there will be enough people to make this happen.
I've been in touch with beehive about using their space. I'm considering
whether or not to use meetup.com to organize everything, but I think for
now I'll put together a simple wordpress/google-groups thing and follow-u
I'm also interested. I just started to go to beehive occasionally and
I was recently discussing with someone how it would be nice to have a
FP group. I live in Federal Hill.
On Nov 30, 11:09 am, Gary Trakhman wrote:
> Awesome, so it looks like there will be enough people to make this happen.
>
On Tue, Nov 29, 2011 at 6:13 PM, Matt wrote:
> 1.4.2 is out now and should work with both Clojure 1.2.1 and 1.3.0.
> However, Leiningen currently doesn't work with Clojure 1.3.0.
>
> At work, I actually have a project.clj with Clojure 1.3.0 in the
> dependencies, and a Clojure 1.2.1 in the dev-dep
On Wed, Nov 30, 2011 at 2:39 AM, Linus Ericsson
wrote:
> In Clojure in Action (still in MEAP i think) there's a chapter about
CiA was officially released at the Conj. Everyone who bought the MEAP
should have had a notification by now about downloading the final
version (my final CiA eBook is date
I've been working with core.match some this week and finding it pretty
nice. However, I have a common case (for me) that is not well handled
right now via core.match: matching symbols. Say that I wrote a match
like this:
;; translate (+ x (+ y z)) to (+ x y z)
(let [e '(+ 1 (+ 2 3))]
(match [e]
(quote foo) should be interpreted as a literal match. I thought this was
addressed by a previous user submitted patch but it doesn't look like
that's true.
We currently use seqs as a marker of custom syntax, we dispatch either on
the first or second element of the seq. For example this is how we h
I just released v0.1.0 of my new Github API library, tentacles.
Tentacles is the successor of my old v2 API library, clj-github. I went
ahead and rewrote the whole thing because clj-github was a bit of a mess
and the v3 API is different enough from the v2 API to warrant a new
library. Also, thi
now I'm in a similar trouble...I'm trying resolve the problem 31 from
4clojure ...It says:
Write a function which packs consecutive duplicates into sub-lists.
[image: test not run]
(= (__ [1 1 2 1 1 1 3 3]) '((1 1) (2) (1 1 1) (3 3)))
I know than I can use identity and others clojure functions b
Hello all,
I try to get the cdt debugger running and fail. I've build the cdt
with leiningen and have this jar file in my classpath. A simple (use
'cdt.break) work. But if I want to use com.georgesjahad.cdt I get the
following error message:
=> (use 'com.georgesjahad.cdt)
#
But a
=> (use 'cdt.ui
Try as I might, I can't purge these anachronisms; so here are `car' to
`cr' in all their glory:
http://clojars.org/cadr
This implementation uses a Kleene-closure around the alphabet {a, d}
to generate the names; and a macro to define them:
https://github.com/klutometis/cadr/blob/master/s
Hi,
you could do it in a way counterclockwise does. You can implement a
repl that listening at an arbitrary port like doing this:
(ns de.svenali.education.inES.tools.repl
(:require clojure.main)
(:import (java.io InputStreamReader PrintWriter)
(java.net ServerSocket Socket)
Hi everybody,
I'd like to create a lazy sequence which has first element x and all
the rest from another lazy sequence. I couldn't find a suitable
function in the docs. Can somebody give a hint?
Best regards
PŁ
--
You received this message because you are subscribed to the Google
Groups "Clojur
Hello,
I'm trying to intercept each call to a recursive function in order to
insert logging. It works on the first invocation but not on others. What am
I missing?
(defn fact [n]
(if (< n 2)
1
(* n (fact (dec n)
; Given function f, returns another function that
; does the same as f
(recur (rest lista) ...)
here: ^^^
lista is always the same thing. You probably meant (recur (rest rst) ...).
- Chris
--
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 p
On Nov 30, 2011, at 3:04 PM, David Nolen wrote:
> (quote foo) should be interpreted as a literal match. I thought this was
> addressed by a previous user submitted patch but it doesn't look like that's
> true.
I wrote a patch that treated quoted keywords as literals so that ':when could
be us
yep..that is an error but (recur (rest rst) I think wouln't work...maybe
something like
(defn packing [lista]
(loop [[fst snd :as all] listamem []tmp '(fst)]
(print "all is "all "\n\n") ;;something is wrong...all always is
a empty list
(if (seq? all)
(if (= fst snd
yep..that is an error but (recur (rest rst) I think wouln't work...maybe
something like
(defn packing [lista]
(loop [[fst snd :as all] listamem []tmp '(fst)]
(print "all is "all "\n\n") ;;something is wrong...all always is
a empty list
(if (seq? all)
(if
Is conf what you're looking for?
http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/cons
~Kasper
On 11/30/11 2:27 PM, Paweł Łoziński wrote:
Hi everybody,
I'd like to create a lazy sequence which has first element x and all
the rest from another lazy sequence. I couldn't find
Have you guys taken a look at Cascalog? (
https://github.com/nathanmarz/cascalog) It's a datalog implementation in
Clojure that compiles down to MapReduce jobs. Cascalog's host, Cascading,
allows you to pull information from a wide range of datasources (mySQL,
HDFS, ElasticSearch, etc) and might fi
On Wed, Nov 30, 2011 at 4:29 PM, Steve Miner wrote:
>
> On Nov 30, 2011, at 3:04 PM, David Nolen wrote:
>
> (quote foo) should be interpreted as a literal match. I thought this was
> addressed by a previous user submitted patch but it doesn't look like
> that's true.
>
>
> I wrote a patch that tr
On Wed, Nov 30, 2011 at 4:38 PM, Sam Ritchie wrote:
> Have you guys taken a look at Cascalog? (
> https://github.com/nathanmarz/cascalog) It's a datalog implementation in
> Clojure that compiles down to MapReduce jobs. Cascalog's host, Cascading,
> allows you to pull information from a wide range
Thanks all...
I'm not actually complaining that symbols are taken for bind
variables. I think in most common match uses that's very natural.
Your suggested change wouldn't actually help me - this was just a
dummy example; in the actual case for me the symbol starts with an
alpha.
If I *were* goi
On Wed, Nov 30, 2011 at 5:06 PM, Alex Miller wrote:
> ;; plus is a symbol to match, _x, _y are variables
> (let [e '(plus 2 3)]
> (match [e]
> [([plus _x _y] :seq)] (+ _x _y)))
>
> To me, that gives them a "placeholder" feel and plays well with the
> use of _. This would break all existin
I filed the bug and attached a patch. The check for duplicate wildcards now
ignores anything that's quoted. I'm in a rush so it might be good for others
to try it out.
http://dev.clojure.org/jira/browse/MATCH-42
Steve Miner
stevemi...@gmail.com
--
You received this message because you are
(seq? ()) is true. You want (seq all), not (seq? all). There may be
other problems, but that one jumps out at me.
On Nov 30, 1:53 pm, coco wrote:
> yep..that is an error but (recur (rest rst) I think wouln't work...maybe
> something like
>
> (defn packing [lista]
> (loop [[fst snd :as all] list
I have Clojure code which makes HTTP requests to a server. Depending
on the context, I want to swap out the underlying HTTP library code.
For example, I use an instrumented library in a testing context and a
different library in a REPL context where the instrumented library
will not work. These are
That's ok by me.
On Nov 30, 4:16 pm, David Nolen wrote:
>
> So you want to use match for matching forms without having to quote
> everything?
>
> (let [e '(plus 2 3)]
> (match e
> ['plus x y] (+ x y)))
>
> To me the above would be ideal. Then it would be trivial for you to write
> macro ove
Ha, I wrote the identical patch locally and it seemed good to me. So
it gets my ok!
On Nov 30, 5:00 pm, Steve Miner wrote:
> I filed the bug and attached a patch. The check for duplicate wildcards now
> ignores anything that's quoted. I'm in a rush so it might be good for others
> to try it
Looks good patch applied.
On Wed, Nov 30, 2011 at 7:24 PM, Alex Miller wrote:
> Ha, I wrote the identical patch locally and it seemed good to me. So
> it gets my ok!
>
> On Nov 30, 5:00 pm, Steve Miner wrote:
> > I filed the bug and attached a patch. The check for duplicate wildcards
> now ig
what about just re-defing the function inside the tests to the
instrumented version?
something like:
(ns one.http)
(defn get [] ...)
(ns one.http-instrumented)
(defn get [] ...)
(ns one.test.blah)
(with-redefs [one.http/get one.http-instrumented/get]
...)
guess you could put the redefs into
I think you should look at the binding function -
http://clojuredocs.org/clojure_core/clojure.core/binding
In my tests, I am using this to run the same tests using two different
functions, which are supposed to do the same thing (using two different
methods, internally).
In your case though, y
> I think you should look at the binding function -
> http://clojuredocs.org/clojure_core/clojure.core/binding
>
> In my tests, I am using this to run the same tests using two different
> functions, which are supposed to do the same thing (using two different
> methods, internally).
>
> In your cas
Peter Danenberg writes:
Hi Peter,
> Try as I might, I can't purge these anachronisms; so here are `car' to
> `cr' in all their glory:
>
> http://clojars.org/cadr
Nice. :-)
> This implementation uses a Kleene-closure around the alphabet {a, d}
> to generate the names; and a macro to defin
44 matches
Mail list logo