What are url-encode and url-decode doing wrong? They look like they
should work (e.g.
https://github.com/ring-clojure/ring-codec/blob/master/test/ring/util/test/codec.clj#L21).
On 25 February 2014 07:14, David Toomey dbtoo...@gmail.com wrote:
I'm building a site and I would like to allow users
hi JW,
First thank you for your reply.
my origin question is somethine about redis.here i refer
https://github.com/ptaoussanis/carmine
I follow this two line
(def server1-conn {:pool {opts} :spec {opts}}) ; See `wcar` docstring
for opts
(defmacro wcar* [ body] `(car/wcar server1-conn ~@body))
I managed to get Postal delivery working with Mandrill, still use of
templates with formatting v helpful. Mailer and Postal have a slight
problem on recognizing the meta info for smtp auth.
So with some fiddling figured out how to merge Clostache into Postal for
html templates with dynamic
2014-02-25 14:08 GMT+04:00 The Dude (Abides) exel...@gmail.com:
(postal/send-message
^{:host smtp.mandrillapp.com
:user your mandrill acct email address
:pass your mandrill api key
:port 587}
{:type text/html
:from from email address
:to to email
You could just write it as a function and leave out wcar*.
(defn batchly-redis [cmd params]
(doseq [params]
(apply cmd params)))
Then to execute:
(wcar* (batchly-redis cat/set parameters))
As far as I can tell, wcar is just a container macro, like with-open, in
that it initiates the
I recently did a benchmark (admittedly in hindsight not a particularly good
one) that involved comparison of an implementation of the same small
program in
Javahttps://github.com/logicchains/ArrayAccessBench/blob/master/Java3.javaand
in
Let me know whenever its updated, dynamic email and img resize v heavy use
cases.
You guys are doing an amazing job with all the libs, most of them higher end
stuff. I've never done msg queuing or used a graph db, so looking forward to
expanding. Its a polygot reality hereon.
P.
On Feb 25,
Hi James,
I really appreciate your code,it really help me much.
just a little modification:
(defn batchly-redis [cmd params]
(doseq [p params]
(apply cmd p)))
doseq requires an even number of args
在 2014年2月25日星期二UTC+8下午6时33分48秒,James Reeves写道:
You could just write it as a function and
I've just pushed v0.3.0 of Chord, a library to make a WebSockets appear as
a bi-directional core.async channels.
More info on GitHub https://github.com/james-henderson/chord.
New since 0.2.2:
- Messages over the channel treated as EDN by default (although option
to fall back to previous
Hi, I'm trying to use Image Resizer and am goofing up on the syntax
somewhere:
(defn update-profile [firstname lastname email file]
(let [member-id (session/get :member-id)
redirecturl (str /member/ member-id)
original-file-path(str (img-path) /
Just from the looks of the exception, you might need to pass an
input-stream or reader instead of a path.
The Dude (Abides) writes:
Hi, I'm trying to use Image Resizer and am goofing up on the syntax
somewhere:
(defn update-profile [firstname lastname email file]
(let [member-id
2014-02-25 16:46 GMT+04:00 Moritz Ulrich mor...@tarn-vedra.de:
Just from the looks of the exception, you might need to pass an
input-stream or reader instead of a path.
which can be instantiated with
http://clojuredocs.org/clojure_core/clojure.java.io/input-stream
and
It looks like an improvement in clojure.lang.BigInt over
java.math.BigInteger - BigInt's add() method seems to do a long + long
add if it doesn't overflow
(https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/BigInt.java#L142)
and only fall back to BigInteger's add method (which has
You can use the default Java classes which are available:
= (- (java.net.URI. http www.mysite /some user nil) .toURL
.toString)
http://www.mysite/some%20user;
=
ring-codec is easy too:
(https://github.com/ring-clojure/ring-codec)
= (str www.mysite/ (ring.util.codec/url-encode some user))
Hi Jonathan,
I provided the Clojure pull request btw. I think Rob's explanation is
correct.
Alex
On Tuesday, February 25, 2014 7:20:46 AM UTC-6, Rob Day wrote:
It looks like an improvement in clojure.lang.BigInt over
java.math.BigInteger - BigInt's add() method seems to do a long + long
I do like this:
#lein new compojure-app guestbook
#cd guestbook
#lein ring server
The server runs on port 3000 by default.
But how to override the default port?
Such as runs on port 80?
thinks
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post
new to clojure, in the process of unlearning years of OO. sorry for the
long post.
struggling with a design/impl and hoping to get some outside opinions so I
can understand my options (clojure better)
basic concepts are straightforward and in a nutshell I'm modeling entities
and
Hello, all,
There were a number of questions about how to participate in Clojure's
Google Summer of Code effort in my last GSoC post, enough that I felt it
warranted its own thread. There is a section on the wiki about getting
involved [1], but I'll make a few suggestions here.
Everyone
Try this.
*lein ring server-headless pick-your-port ;; port 80 usually requires
root permissions*
Tim Washington
Interruptsoftware.com http://interruptsoftware.com
On Tue, Feb 25, 2014 at 9:21 AM, action actioncao2...@gmail.com wrote:
I do like this:
#lein new compojure-app guestbook
Hi Moritz and Michael, thanks for the pointer in the right direction.
Almost there except for 1 point I think. The whole operation is made of 2
functions, one to upload/resize/save and the other to provide a unique
filename by original filename + timestamp.
(defn add-timestamp [filename]
(let
Hi Moritz and Michael, thanks for the pointer in the right direction.
Almost there except for 1 point I think. The whole operation is made of 2
functions, one to upload/resize/save and the other to provide a unique
filename by original filename + timestamp.
(defn add-timestamp [filename]
(let
The lein-ring plugin accepts a port number as an argument:
lein ring server 8080
Note, that in order to bind to port 80, you will need elevated (root)
privileges.
On Tue, Feb 25, 2014 at 9:21 AM, action actioncao2...@gmail.com wrote:
I do like this:
#lein new compojure-app guestbook
#cd
you can also change this line on your project.clj
:ring {:handler myproject.handler/app :port 8080}
Josh
On Tue, Feb 25, 2014 at 5:23 PM, Jason Stewart jstew...@fusionary.comwrote:
The lein-ring plugin accepts a port number as an argument:
lein ring server 8080
Note, that in order to
Is there no way to simply structure the maps inside your main atom in
such a way that you can look up your entities?
{lhs-uuid1 {rhs-uuid1 [values] rhs-uuid2 [values]}}
(get-in @myatom [lhs-uuid1 rhs-uuid2])
You can wrap this in a function that does some other work to look it up
if need be, if
I am using the latest CIDER 0.6.0alpha (package: 20140224.735) (Clojure
1.5.1, nREPL 0.2.1) on Windows.
I noticed suddenly my repl started to miss some println messages in my code.
A simple test like this shows:
(do (println hello) (println there))
hello
It won't print the second message for
David,
thanks for the reply. I started down that path.
RHS is an entity itself. Its state changes over time, with Identity
independent of its relationships, it can be related to many entities (LHS).
So its state has to live in one place or employ synchronization (complex
watchers?). I
If you do want to use port 80, it's generally safer to use a reverse
proxy like nginx to listen on port 80 and forward to port 3000 - that
way your code doesn't need root privileges and is less of a security
headache.
On 25 February 2014 14:59, Josh Kamau joshnet2...@gmail.com wrote:
you can
No, my question isn't is there a way to do this. I'm sure there are a
dozen ways to do it. My question is about a specific way of doing it. In
particular, if your solution does not involve calling (identical? ..), then
it's not what I'm asking about.
In om core there's a call to identical?
I don't really have anything to add to this thread but I will say that Om's
use of identical? is an implementation detail that's likely to change. =
already does an identical? check, ideally Om could use not= in the future
instead of (not (identical? ...)).
David
On Tue, Feb 25, 2014 at 12:54
The Climate Corporation has open-sourced the library
claypoolehttps://github.com/TheClimateCorporation/claypoole/,
which is a set of threadpool tools for Clojure's parallel functions. For
instance, you can start futures in a specific threadpool, pmap on a
threadpool, or even use a parallel for
On Sunday, February 23, 2014 4:32:54 PM UTC-5, Matej Fröbe wrote:
Hello Clojure users!
I have a problem with running
*$lein repl*
After some time I get: *REPL server launch timed out.*
*$lein run myproject* works fine
Leiningen and Java versions are:
*$lein versionLeiningen 2.3.4 on
hey guys. i am struggling to understand how to avoid reflection when
calling a clojure method from java. i tried type hinting this in the
function definition, and that works assuming a version of the class exists
already, but if I do a clean compilation I get a
Hi John,
Thank you for your answer. I have tried this already, but it doesn't help.
Any other suggestions, how to find the cause of the problem?
Matej
Am Dienstag, 25. Februar 2014 19:51:51 UTC+1 schrieb John Gabriele:
On Sunday, February 23, 2014 4:32:54 PM UTC-5, Matej Fröbe wrote:
Hi everyone. I'm Rohan Prinja, a third year Computer Science undergrad at IIT
Bombay http://iitb.ac.in. I love programming in Lisp-family languages and
although I have only recently begun to use Clojure, I'm already quite
familiar with Racket and Common Lisp. I also have a basic knowledge of
Matej, does this happen to you when you run lein repl outside of a
project? If so, can you show us what your project.clj file looks like? I
know for a fact that if you have :eval-in :trampoline in it, the repl
will fail with that error.
On Tuesday, February 25, 2014 2:56:04 PM UTC-5, Matej
On Feb 16, 2014, at 5:07 PM, Karsten Schmidt wrote:
Yer welcome please do let me know how this works out for you! I've
updated the gist[1] to delay more parts of the whole computation and
replace most occurrences of `reduce` with `loop` - altogether leading
to an almost 2x faster result for
Hi,
On Tue, Feb 25, 2014 at 8:59 PM, Rohan Prinja rohan.pri...@gmail.com wrote:
Hi everyone. I'm Rohan Prinja, a third year Computer Science undergrad at
IIT Bombay. I love programming in Lisp-family languages and although I have
only recently begun to use Clojure, I'm already quite familiar
Hah! What a classic mistake (not yours)! The bug fix is a single
letter change in the last call to `check-faces-b`. The reference point
to check against should be the 2nd point in tetra `q`. It currently
uses the 1st point `qa`, whereas it should be `qb`. Thanks for
testing! Also just updated the
Hi all,
I've been looking at DNS caching recently, and based on that, have
made some improvements on top of the TTLCache in core.cache which I
think I'm ready to release - they're at
https://github.com/rkday/ttlcache and
https://clojars.org/uk.me.rkd.ttlcache.
The main improvements are that you
Meltdown [1] is a Clojure interface to Reactor [2], an asynchronous
programming
toolkit for the JVM.
beta5 is a development release that primarily focuses on updating Reactor
to 1.1.0.M1 and fixing issues.
Release notes:
Hi All,
I have been reading clojure for sometime now. I am at a point where I
want to learn a web framework. I see many options available for clojure
where few are built upon others. So if I am to learn one, which framework
does the community recommend?
Thanks
Aravindh.S
--
You received
Maybe you could try compojure.
On Wed, Feb 26, 2014 at 9:13 AM, Aravindh S aravi...@theintrospect.inwrote:
Hi All,
I have been reading clojure for sometime now. I am at a point where I
want to learn a web framework. I see many options available for clojure
where few are built upon
Luminus is a batteries-included leiningen project template that includes
compojure and other things to get started.
http://www.luminusweb.net/
On Tue, Feb 25, 2014 at 8:18 PM, haosdent haosd...@gmail.com wrote:
Maybe you could try compojure.
On Wed, Feb 26, 2014 at 9:13 AM, Aravindh S
You are saying a zipper may be a solution--so do you have a tree or
graph structure?
If your RHS value is something that changes over time but has an
identity independent of its relationship to other nodes, then retrieving
or constructing its value could simply be a function or set of
On 02/26/2014 09:13 AM, Aravindh S wrote:
Hi All,
I have been reading clojure for sometime now. I am at a point where I
want to learn a web framework. I see many options available for clojure
where few are built upon others. So if I am to learn one, which framework
does the community
On Tuesday, January 21, 2014 11:05:13 PM UTC-5, Michael Gardner wrote:
Try (sh “bash” “-c” “ls *.txt”).
Sorry for the belated reply, Michael. Thanks so much for the help; works!
-- John
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to
I got the file naming fixed with:
(upload-file (img-path) (assoc-in file [:filename] new-file-name))
The last part is reading in the uploaded file so it can be resized with
Image Resizer. I wrote the code as:
(with-open [rdr (clojure.java.io/reader (str (img-path) /
new-file-name))])
As a
I would also recommend Luminus as a user friendly start you can generate a
new project with Selmer for views (Django style), authentication,
migrations and db persistence out the gate with either mysql, postgres,
mongo (or H2 as default if you select neither) and Korma as db dsl.
It will give
Ah, that explanation makes sense, thank you. I imagine it would be quite
cumbersome to do the same thing in Java, due to the lack of dynamic typing.
On Tuesday, 25 February 2014 21:20:46 UTC+8, Rob Day wrote:
It looks like an improvement in clojure.lang.BigInt over
java.math.BigInteger -
Very helpful advice. Thank you very much.
On Tue, Feb 25, 2014 at 10:25 PM, Daniel Solano Gómez d...@sattvik.comwrote:
Hello, all,
There were a number of questions about how to participate in Clojure's
Google Summer of Code effort in my last GSoC post, enough that I felt it
warranted its
It depends also on your requirements. For example if you want your app to
work in many
deployment scenarios (standalone Jetty or Tomcat, J2EE web containers...)
and you may
have to use servlet 3.0 API asynchronous features, nothing beats pedestal
currently.
The concept of interceptors is
51 matches
Mail list logo