e any
views on what the best approach would be?
Thanks in advance
Saul
--
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 pa
leiningen plugins to depend on
each other or has this behaviour been omitted by design?
Saul
--
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
On Dec 30, 8:46 pm, Rob Wolfe wrote:
> Saul writes:
> > Many thanks. This works for me and I find it useful. However, in a
> > perfect world:
>
> > lein compile
>
> > would also compile my java source code or call compile-java before
> > performing a compi
other leiningen users solved this?
>
Have you looked at http://clojars.org ? It seems to have solved the
"libraries available in maven repos" problem.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send
/leiningen-war "0.0.1"]]
It meets my needs so far but I'm happy to changes -- however radical
they are.
Saul
--
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
s a more conventional way of templating HTML (which still has
some nice clojure features) and may suit such groups of people.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.co
o avail.
I don't know if it matches your needs but http://gist.github.com/
supports clojure.
Saul
--
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 m
to standardise on Clojure.
This will change with time of course, so it may be that starting a
Clojure specific incubator at this early stage is a wise move in the
long term. However, it may be advisable not to over-promise in the
early stages.
Saul
--
You received this message because you are subscr
ll work. I also have a small bit of code using
ant/ivy and that would build fine too in a leingingen only world.
Saul
--
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
r as I can
see, the statement handle is unavailable to the users of
clojure.contrib.sql. Has anyone else had this problem?
Saul Hazledine
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@google
On Apr 20, 8:51 pm, Remco van 't Veer wrote:
> I am doing the following after an insert for a Derby database:
>
> (sql/with-query-results res
> ["VALUES IDENTITY_VAL_LOCAL()"]
> (first (vals (first res
>
> For MySQL it would be something like:
>
> (sql/with-query-results res
>
en a full web framework may be
more appropriate.
Saul
--
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 patient with your
happier if
Scala goes mainstream and Clojure doesn't.
The really cool thing though, is that with the JVM, Clojure and Scala
can interoperate.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojur
'd recommend the sample project file as a good place to look for
various settings:
http://github.com/technomancy/leiningen/blob/master/sample.project.clj
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send
cache-dot-clj Clojure library that caches the results of impure
functions.
It is almost entirely based on the memoize functions described here:
http://kotka.de/blog/2010/03/memoize_done_right.html
I have found this useful for caching the results of database calls and
for holding HTML snippets.
is
> a good strategy for object for which identity is equality.)
>
If you have the code in a working state I'd be happy try to add the
google/JDK methods as algorithms to the library. Alternatively feel
free to fork the code and add them yourself and I'll incorporate your
changes.
Saul
-
On Jul 7, 5:24 pm, Laurent PETIT wrote:
> if you intend to share the library, then use the classical prefix notation:
>
> * either of the form net.reeves.james.foo ( or any reversed tld you "own" )
> * either of the form com.yourcorp.foo
>
com.read.to.easy.that.not.its.but
--
You received
Also, to add my opinion on the original question that started this
thread, I prefer 'foo.api' to 'foo.core' as it gives a clearer idea of
which namespace should be pulled in by the user.
Saul
--
You received this message because you are subscribed to the Google
Groups &qu
ester.compojure
clj.acme-corp.dynamite
This separates the clojure namespace from the java one, doesn't tie to
a TLD and reduces the chances of collisions at the library level.
Also, somebody mentioned dropping api/core from the core namespace in
a library. Personally, I'd be happy with
rite it.
> 7. Any other advice or thoughts you have about this?
>
I wouldn't worry too much about scaling. Making an application
scalable is a lot of work (unless you're using something like Google
appengine). Computers are much faster than they used to be. A single
machine running J
ption (either in project.clj or on
the command line)
3. write an alternative plugin (e.g lein-webxml) that uses the hooks
feature of leiningen to produce a web.xml when lein war is called.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" gro
s
that I'll contact the author about) I'm keen to include them.
Saul
--
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 - pl
Form-dot-clj is library for handling the display and validation of
forms. It Supports HTML5 forms, javascript validation and plain HTML.
It should work with most methods of generating HTML.
http://github.com/alienscience/form-dot-clj
In the last 10 minutes I have also found a library called "pour
rc/main/clojure/clojure/contrib/sql/internal.clj#L144
I don't know if this is an ideal thing to do but my own modest, not
mission critical, use of it has not run into any problems.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To pos
On Aug 16, 8:31 am, Alan wrote:
> (defn apply-keys [f ks]
> (zipmap ks (map f ks)))
>
> Does this seem useful to anyone else?
It seems very similar to memoize in that you're mapping function
arguments to their results.
Saul
--
You received this message because you are
:dev-dependencies [[swank-clojure "1.2.0"]])
You're doing everything right - its just Clojure 1.2 hasn't been
released yet. I'm currently using RC3 within Leiningen without any
problems:
[org.clojure/clojure "1.2.0-RC3"]
[org.clojure/clojure-contrib "1.2.0
though was to go one step further and start a Clojure
web development group so that other developers of small libraries and
users of them could go to one place for support and discussion. Would
this be uncool or would it be useful?
Saul
--
You received this message because you are subscribed to
elp and time.
I used a Mac in the past and I understand your frustration with
MacPorts. I've not used Clojure on OSX but if you're bored you could
try Homebrew which is an alternative to MacPorts.
http://mxcl.github.com/homebrew/
Then: brew install clojure
Hopefully you'll get a mo
ress the broken dependency
problem by reducing the number of dependencies (so problems propogate
less) and to make fixing dependencies more democratic by using git.
But my opinion is pretty worthless because I don't use a Mac and I've
never used Homebrew :-)
Saul
--
You received th
On Aug 17, 8:21 pm, Brian Carper wrote:
> On Aug 17, 7:15 am, Saul Hazledine wrote:
>
> > One idea I had though was to go one step further and start a Clojure
> > web development group so that other developers of small libraries and
> > users of them could go to o
here is any Java (or
> Clojure?) FSM library that works well with Clojure.
>
> Thanks.
I've not used it state machines in Clojure but I just found this
thread while searching for something else:
http://groups.google.com/group/clojure/browse_thread/thread/ec529d99e1c37de1/19e750580d2
ay and the error message
changed to a FileNotFoundException after the package was used once.
Sorry I can't be more helpful.
Saul
--
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 post
et all the functionality you listed only with nice twists and
features. The downside is the learning curve.
A good tutorial can be found at:
http://github.com/swannodette/enlive-tutorial
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To pos
is an all Clojure solution that
seems to follow the approach you are most comfortable with:
http://github.com/Flamefork/fleet
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.c
On Sep 4, 5:45 am, HB wrote:
> Hey,
> Since Relevance is heavily investing in Clojure, do you think they are
> working on a Clojure web framework?
> Personally, I wish.
Its also worth looking at Conjure if you're interested in a web
framework:
http://github.com/macourtney/Conju
ngo style user management or admin
screens can be done by libraries.
Frameworks are also very good for rapid prototyping. You usually pay
for such power with inflexibility but Rails and Django seem to hit a
sweet spot where you can develop a website fast and still run a
business on them.
Saul
--
You
he application. This hasn't been
> done yet because I don't think many people would find it useful.
>
This would be really cool. Especially if, after playing around at the
repl, you could call something like:
(create-war "example.war")
and it would produce a deployable
I
guess you're trying to memoize something much slower.
Would JDBC suit your needs as a storage medium? You could use H2,
HSQLDB or Derby by adding a dependency in your build tool of choice.
If this is of interest I'll add it.
Also, if you come up with a solution sooner, I'd be ea
erplate necessary to
> deploy an App Engine application. It also enables interactive
> development through the REPL.
>
> http://github.com/gcv/appengine-magic
>
It took me days to get a working app-engine development environment
setup. This is very welcome indeed.
Saul
--
You re
install:
http://groups.google.com/group/leiningen/browse_thread/thread/d889549e445e3711
This would save having to make a lein project, edit project.clj and
delete a file.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this gro
orcache-dot-cljmight be a good solution.
>
I've released cache-dot-clj version 0.0.3 and have added an ehcache
based plugin.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googl
e system such as H2, HSQLDB or Apache Derby and run an in
memory database.
Incanter (a R like platform for clojure) supports select and group-by
on its datasets. With Incanter you can also plot pretty graphs etc.
Saul
--
You received this message because you are subscribed to the Google
Groups &qu
actually meant (objects belong to
> sets) with implementation (integers/keywords mapping to groups of
> objects, and objects mapping to integers).
>
3. Only the mapping, object => set, is needed and, as you say, this is
an implementation detail that should be hidden. So memoize s
On Mar 15, 11:14 am, Paul Dorman wrote:
> Hi Saul,
>
> I'm happy to wait until Friday, but check your request queue before
> you make the change yourself as I may submit one. I've made the change
> on my own fork, but I've only changed the function definition from
On Mar 16, 9:30 am, Ray Miller wrote:
> On 15 March 2011 08:46, Saul Hazledine wrote:
>
> > On Mar 15, 1:30 am, Paul Dorman wrote:
> > One thought though is that it may be quicker simply do a lookup on the
> > directory server, obtain the password and then do a
ntangled, in most web
applications. I feel you would get more early feedback on your
approach if you documented the API. Personally, I struggle to get an
overview of a library from the unittests.
Good luck.
Saul
--
You received this message because you are subscribed to the Google
Groups "Cloj
g a separate text templating system such as:
clojure.contrib.strint [1]
Velocity [2]
StringTemplate [3]
That way you write the Java as Java but replace occasional things with
markup e.g $varname$ and then pump data from Clojure into the
template.
Incidently, I've also used a similar
hem.
I haven't done this within Clojure but below is small example of a C++
Cheetah template:
https://gist.github.com/892415
Although it looks a bit of a mess the general structure of the C++ is
clear and the templating code is not too intrusive.
Saul
--
You received this message be
; (formal-params cfg) ") {\n"
> (statement-list
> (for [f fields]
> [" this." f " = " f ]))
> " }\n"])
>
Then becomes:
(eval-string "
public Example(#(format-params cfg)#)
{
#(foreach [f fields]#
this.#f#
Hello George,
You can use the bind? function in this fork of clj-ldap:
https://github.com/pauldorman/clj-ldap
Saul
On Nov 4, 2:03 am, gtasso wrote:
> I am very new in Clojure. I'd like someone to how an example code on
> how we can authenticate users on a windows server usi
ought it best
to check since I couldn't see a notice of this anywhere.
Saul
--
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 - pl
ckage won't be picked up by mistake by people who want the
official package.
Saul
--
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 - p
On Oct 13, 1:21 pm, lprefonta...@softaddicts.ca wrote:
> Good to know... is this written somewhere ? I looked at Clojars yesterday
> but did not find anything...
>
Its mentioned near the end of the tutorial:
http://github.com/ato/clojars-web/wiki/tutorial
Saul
--
You received thi
Otherwise, as Shanatu says, a github project of your own would be
welcome and is sure to be used by others.
Saul
--
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 pos
/d8334759f10f3f45
https://www.assembla.com/spaces/clojure-contrib/tickets/88-clojure-contrib-sql-runs-out-of-memory-on-very-large-datasets
I have no idea when this will get released though.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure"
e.com/group/clj-sql
Feature requests, changes or new code are very welcome.
Saul
--
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 - pl
side of the Atlantic? I wanted to go but costs and time
prevented me.
Many thanks
Saul
--
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
y on contrib
changes:
[org.clojure.contrib/standalone "1.3.0-alpha2"]
Has anyone hit this problem? What is the best way of dealing with it?
Thanks in advance for any help.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To p
b.sql
creates them behind the scenes when you do things such as insert
records.
Saul
--
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 - pl
problem. The map format doesn't fit this but, because you use
protocols in the implementation, a list format for the DSL would allow
genetic programming.
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.100.4432
Obviously though, their DSL is nowhere as clear and clean as yours.
Saul
.0
http://maven.apache.org/xsd/settings-1.0.0.xsd";>
com.theoryinpractise
Its probably worth a try before someone skilled in the art of Maven
comes up with a better suggestion.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure"
.
>
> Enjoy,
> --
> Miki
I'm going to restart app-engine development soon and this will be
really useful. Many thanks.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@go
ybody know of a good TCP/IP connection pool library that works with
Clojure?
Thanks in advance for any help.
Saul
--
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 f
g a H2 driver to TEST a library that I may want to
use. If I can play with the library and I like it, its then no problem
at all to write some small workarounds for the non-standard behaviour
of the database I'm using.
Ideally though, it would be nice if workarounds for various databases
were
on scales without changing the Clojure API. I take
your point and will go with redis support first though.
Saul
--
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 fr
cutes a
given function, f, on a sequence of output lines. It handles restarts
if the command gets killed by a log rotation.
For the actual tail command I'd recommend looking at a recent version
of GNU tail or install inotail - a filewatching API which makes these
commands much more efficien
on-lisps, you can compile the result and use it. This
makes :
> 7. minimizing non-linear functions
much easier.
Saul
--
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 t
nce most remote work is done
using RPC, web services or SQL. Then at the end of the presentation
they show that they have layers to handle this and I was very
impressed. The batch statement should be relatively easy to make using
macros. Cool.
Saul
--
You received this message because you are s
r instance:
http://docs.python.org/library/optparse.html
Saul
--
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 patient w
ps.google.com/group/clojure/browse_thread/thread/604b48a520aa0253/5e3f5d3d1d870557?lnk=gst&q=cross+referencing+objects#5e3f5d3d1d870557
The answer from David Nolen mentioned some little used functions of
the Clojure language that may be useful for you.
Saul
--
You received this message beca
that includes useful
development libraries from contrib such as the repl utils, namespace
utils and trace. I could put this on clojars but I was wondering if it
would be better in contrib in the same was as clojure.contrib/
complete?
Saul
--
You received this message because you are subscribed t
ials linked at
http://richhickey.github.com/clojure-contrib/monads-api.html
which have been very useful but any extra help would be appreciated.
Thanks in advance
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to cloj
On Jan 13, 9:18 am, Saul Hazledine wrote:
> Hello,
> I've never used monads but I have a problem that feels like it could
> be solved elegantly with them.
>
> I have a sequence of functions of arbitary size and an input sequence
> s. Each function is given a sequence
gt;
> (reduce #(if %1 (mapcat %2 %1)) s seq-of-fns)
>
That seems to work nicely thanks. I hadn't thought of using reduce to
produce a sequence before.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group,
I know encryption requires
BigInteger but I have yet to see a native clojure encryption library.
It would help people like me understand the debate if some mainstream
examples of applications requiring (seamless) BigInteger support could
be identified.
Saul
--
You received this message because you are
available:
http://www.unboundid.com/products/ldapsdk/
Has anyone done this already?
Saul
--
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 - pl
a nice example of AOP
behaviour using functions. For a general purpose library you may find
Robert Hooke useful:
https://github.com/technomancy/robert-hooke
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this
nextpanel
> (JButton. "Exit")))
>
I haven't done any Swing programming in Clojure yet but this looks
really cool. It looks much nicer than the standard Java API I
struggled with a few years ago.
Saul
--
You received this message because you are subscribed to the G
":
https://github.com/alienscience/cache-dot-clj
Saul
--
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 patient wit
the
operations get, add, delete, modify and search. It also supports
spooling search results to reduce memory usage.
TODO:
Better documentation of Exceptions and error codes.
Support for the increment operation in modify
Support for LDAP controls
Github project: https://github.com/alienscience/clj-ldap
r an ldap/get.
I've fixed the problem with dn, added attribute selection to ldap/get,
improved the README slightly and released this as version 0.0.2 which
is now on clojars.org.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To
nction is anonymous and is it possible to
find the arity?
Thanks in advance for any help.
Saul
--
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
Very sorry. I should have searched before I wrote.
http://groups.google.com/group/clojure/msg/fb9930ba2a25d2dd
On Feb 15, 11:00 am, Saul Hazledine wrote:
> Hello,
> Apologies if this there is an obvious documented answer to this
> question. If I write a function:
>
>
nodes).
I would say an electrical circuit is a type of datastructure and you
already have those built in to the language. There's no need to set up
a type hierarchy to express it. My first approach would be to build a
datastructure that can describe an electrical circuit.
Saul
--
You receiv
mpatible you must return a supported type or extend the
> Renderable protocol.
>
Do you have more details of this - it sounds interesting...
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure
#x27;d do it this way:
(defn explode-to-digits [number]
(seq (str number)))
Saul
--
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 -
rry, my first answer was careless and stupid - this time with
numbers:
(defn explode-to-digits [number]
(map #(Character/digit % 10) (str number)))
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to
her all the components required for fault tolerant distributed
systems:
https://github.com/antoniogarrote/jobim
Although, like most people, I would love the convenience of a complete
Java implementation of ZeroMQ.
Saul
--
You received this message because you are subscribed to the Google
Grou
l for me.
However, the key to well tested libraries is having people give
feedback if a library breaks or is badly documented or doesn't meet
their needs.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send em
s busy and a timeout has occured.
Saul
--
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 patient with your
first post.
On Feb 23, 9:54 pm, clj123 wrote:
> I'm getting the following exception trying to insert large batch data
> in the database.
I'd try to write less data at one time to the database. Start with,
say, 20 rows at a time.
Saul
--
You received this message because you are subscrib
the processing of the rows (or the gui?)
is calling Thread.interrupt().
Sorry these aren't very good suggestions.
Saul
--
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
ng and it has extra features. It is my hope was that all new users
start with lein-ring.
I'll change the README in leiningen-war to make it clearer.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send emai
On Mar 10, 7:48 pm, Damien Lepage wrote:
> Sorry for the dumb questions, I'll try no to be too noisy on this list.
>
I found this thread useful. Please keep asking questions.
Saul
--
You received this message because you are subscribed to the Google
Groups "Clojure" g
overhead shouldn't be too high. The
use of an application would reduce the need for an editor.
Saul
--
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
On Mar 15, 1:30 am, Paul Dorman wrote:
> Hi Saul,
>
> I would like to implement a LDAP authentication in Clojure, based
> around clj-ldap. Do you think it is necessary for the bind-request
> function to be private? In LDAP v3 bind requests can be sent at any
> time during a co
e "1.2.1"]
[org.apache.directory.server/apacheds-all
"1.5.5"]
[org.slf4j/slf4j-simple "1.5.6"]
[clj-file-utils "0.2.1"]]
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.e
97 matches
Mail list logo