On Friday, July 31, 2015 at 12:52:23 PM UTC-5, David Nolen wrote:
ClojureScript, the Clojure compiler that emits JavaScript source code.
README and source code: https://github.com/clojure/clojurescript
Leiningen dependency information:
[org.clojure/clojurescript 1.7.28]
Cut paste from my own code base:
(def ^:dynamic *db-conn*)
(defmacro with-db-connection [ body]
`(jdbc/with-db-connection [con# (get-db-conn)]
(binding [*db-conn* con#]
~@body)))
A few points. Do not give any value to the dynamic var, make it unbound and
make it fail early for
We're focusing on defects right now for 1.8 but eventually we'll roll back
around to enhancements too.
On Fri, Jul 31, 2015 at 5:04 AM, Marc O'Morain m...@circleci.com wrote:
This caught us out at Circle when preparing the code-base for Clojure 1.7
– which reminds me of
On Friday, 31 July 2015 11:48:54 UTC+1, Colin Yates wrote:
I am away from the code at the moment, but is there any reason why the
dynamic connection can’t be private? This goes some way to providing safety.
No, I don't think there's a problem with it being private, I just didn't
think of
Hi all,
This is my first post here so please be compassionate :)
I'm evaluating clojure for some of my purposes and I've stuck on task that
I don't know to handle.
I have applicatin that is receiving a lot of data and writing some results
to a file.
However once per hour this output file must
On Friday, July 31, 2015 at 8:21:18 AM UTC+2, Raymond Huang wrote:
I'd like to use `add-watch` on an atom which writes the data to a
core.async channel. So far, I've come up with this, but it seems bad
because I create a new go-routine everytime something happens.
Makes me think, one
finagle-clojure is a thin wrapper around Finagle[1] for Clojure.
Finagle is a Scala library for building highly concurrent RPC services
on the JVM.
https://github.com/finagle/finagle-clojure/
Notable Changes:
* algo.monad support
* upgraded to the latest Finagle version
* support for new
Sorry for my noobness but is there any tutorial on how to use
counterclockwise?
I'm a java developer and I'm super curious about Clojure.
I'm still learning the very basics of the language and I'd like to keep
using eclipse for now since I'm very familiar with it.
Thanks for any help you guys
with-open https://clojuredocs.org/clojure.core/with-open and spit
http://clojuredocs.org/clojure.core/spit might be useful. You could also
rebind *out*. That may be enough to point you in the right direction, but
this
page http://clojure-doc.org/articles/cookbooks/files_and_directories.html
On 31 July 2015 at 09:54, J. Pablo Fernández pup...@pupeno.com wrote:
For me, the thing is, I have a traditional relational database here, this
is already far from pure. For example, calling (db/create-user
pup...@pupeno.com) twice will not only not return the same thing the
second time,
One gotcha is that atoms add-watches do not always guarantee order
semantics. So if you have a watch put [old-val new-val] on a channel, and
your atom operation is something like (swap! a inc), you may see values in
your channel like this:
[0 1]
[2 3]
[1 2]
[3 4]
[6 7]
[4 5]
This is because the
Mars0i,
I've tried spit but it looks like there is no caching under the hood and
it's using syscalls open, write, close every time it is called, and this
spikes system resources.
with-open - we will see :)
W dniu piątek, 31 lipca 2015 16:41:19 UTC+2 użytkownik Mars0i napisał:
with-open
The way I'd do it is to write a function that caches the output writer or
stream. When the cache expires, the function closes the old writer and
opens a new one to the new file.
In the example below, I'm assuming you have a function that returns the
same name for the same hour.
(let [cache
James,
Some reading is required to understand your code (never used volatile!) but
thanks for direction.
I will try this way.
W dniu piątek, 31 lipca 2015 17:39:50 UTC+2 użytkownik James Reeves napisał:
The way I'd do it is to write a function that caches the output writer or
stream. When
On 31 July 2015 at 17:18, Marcin Jurczuk mjurc...@gmail.com wrote:
Some reading is required to understand your code (never used volatile!)
but thanks for direction.
I will try this way.
Volatiles were introduced in Clojure 1.7.0, and trade thread-safety for
better performance. I could have
On Friday, 31 July 2015 19:41:45 UTC+5:30, fasfsfgs wrote:
Sorry for my noobness but is there any tutorial on how to use
counterclockwise?
I'm a java developer and I'm super curious about Clojure.
I'm still learning the very basics of the language and I'd like to keep
using eclipse
Thanks everyone for the suggestions, I'll try it out later today
@leon Thanks. I wish this were documented in the API for how to write
Clojure/Script compatible code. Just saw your answer on stackoverflow
If it were me, I'd put something like:
(def add-link* [my_id fname surname day2 month2 year2 hour2 min2 zone2])
inside the function that handles the route, hit the endpoint as you would,
and check that add-link* is receiving the arguments you expect.
On Saturday, August 1, 2015 at 3:46:47 AM
On 31/07/2015 19:08, David Nolen wrote:
Some more words demos here
http://swannodette.github.io/2015/07/29/clojurescript-17/
Cheers,
David
Amazing work, David. Clojure[script] really is THE fountain of
innovation. Whilst Clojurescript may not be as mainstream as React,
Angular etc.
ClojureScript, the Clojure compiler that emits JavaScript source code.
README and source code: https://github.com/clojure/clojurescript
Leiningen dependency information:
[org.clojure/clojurescript 1.7.28]
ClojureScript now has a proper version number. This version number is
designed to
This is such an awesome time to be slinging parens! Thank you to everyone
who made this possible!
On Fri, Jul 31, 2015 at 11:22 AM, gvim gvi...@gmail.com wrote:
On 31/07/2015 19:08, David Nolen wrote:
Some more words demos here
http://swannodette.github.io/2015/07/29/clojurescript-17/
I have a route in my Luminus project:
(POST /add_link [my_id fname surname day2 month2 year2 hour2 min2
zone2]
(let [link (add-user-planets-aspects! [fname
surname nil nil nil
(Integer/parseInt day2) (Integer/parseInt month2) (Integer/parseInt year2)
Some more words demos here
http://swannodette.github.io/2015/07/29/clojurescript-17/
Cheers,
David
--
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
Happy to announce that Planck 1.0 is available:
http://planck.fikesfarm.com http://planck.fikesfarm.com/
--
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
On Thu, Jul 30, 2015 at 6:05 AM, benedek fazekas
benedek.faze...@gmail.com wrote:
But it doesn't look like it has the same graph analysis to understand
cyclic references, etc,
you are right it does not. Wondering if you were interested in adding an API
to sniper and publish it on clojars...
Awesome. Starts almost instantly!
Btw, in order to get a command-line editor at the repl, I run:
rlwrap -m \ planck
Not sure if there's some other way, but that works fine. rlwrap has a lot
of nice features, esp. multi-line edit in your editor of choice.
M.
On Friday, July 31, 2015 at
On Fri, Jul 31, 2015 at 1:57 PM, Eduardo Aquiles Affonso Radanovitsck
eduardoaquiles...@gmail.com wrote:
Not sure if this is expected or not:
(map (fn [v] {:k v}) #{1 2 3})
= ({:k 1} {:k 3} {:k 2})
(map #({:k %}) #{1 2 3})
ArityException Wrong number of args (0) passed to:
I'd like to use `add-watch` on an atom which writes the data to a
core.async channel. So far, I've come up with this, but it seems bad
because I create a new go-routine everytime something happens.
(add-watch ref watch-id #(go (a/! user-changes %)))
This seems like a bad idea to me because I
Hi Carlo,
This is an awesome lib. Thanks for sharing.
README mentions the queue example and goes directly into details. I would
inline the queue example and maybe move the Specifications section into a
different file.
On Fri, Jul 31, 2015 at 7:05 AM, Carlo Zancanaro carlozancan...@gmail.com
My day job is teaching Python, but in a school that teaches much else
besides. We're small and I'd say prototypical given how quickly the
technology is evolving.
The description in the blog post below is science fiction from my angle,
but I'm aiming for a lot of realism:
Not sure if this is expected or not:
(map (fn [v] {:k v}) #{1 2 3})
= ({:k 1} {:k 3} {:k 2})
(map #({:k %}) #{1 2 3})
ArityException Wrong number of args (0) passed to: PersistentArrayMap
clojure.lang.AFn.throwArity (AFn.java:429)
*--*
*Eduardo Aquiles Radanovitsck*
On Wed, Jul 29, 2015 at
Hello James,
Thanks for your answer. I do understand your point. Pure functions are
easier to reason about and my use of dynamic here breaks that purity. I'm
not doing it lightly. It already happened to me, that one of those
functions that was running inside the transaction, was not passed the
Use put!
On Friday, July 31, 2015 at 8:21:18 AM UTC+2, Raymond Huang wrote:
I'd like to use `add-watch` on an atom which writes the data to a
core.async channel. So far, I've come up with this, but it seems bad
because I create a new go-routine everytime something happens.
(add-watch ref
This caught us out at Circle when preparing the code-base for Clojure 1.7 –
which reminds me of http://dev.clojure.org/jira/browse/CLJ-1752
It would be very nice if `reliased?` returned true for values that are not
instances of IPending
On 31 July 2015 at 03:51, Mars0i marsh...@logical.net
This is always tricky - the other dimension is that the transaction can span
multiple components which should all be ignorant of each other, so a collecting
fn (like James’ ‘do-things*’) isn’t feasible.
For me, I have the service create a tx and then either I pass in the tx instead
of the db
35 matches
Mail list logo