Hi Everyone,
So how come two agents can't contain one another? The following code causes
a StackOverflowError. In the real world things can't contain other things
cyclically so I suspect that's why, but if someone could explain this
better to me I'd appreciate it. :) - Greg
(defn test-agents
I can understand why something like a clojure.lang.Volatile can be useful
for some optimizations in the functions of standard library, but do they
really need to become part of the public core API? Clojure is such a nice
language because of the way state is handled at a higher level. Whenever I
FYI transients no longer enforce thread locality, and you may now call
them from any thread [1]. More options for handling mutable state is
not a bad thing (as Clojure is a practical language), though more
discipline will be needed.
Jozef
[1] CLJ-1498
On Thu, Sep 11, 2014 at 9:41 AM, Arnout
Hey Greg,
On Thu, Sep 11, 2014 at 12:30:11AM -0700, Greg MacDonald wrote:
So how come two agents can't contain one another? The following code causes
a StackOverflowError. In the real world things can't contain other things
cyclically so I suspect that's why, but if someone could explain
Using my timings macro:
https://gist.github.com/fsodomka/5890711
I am getting that:
- creation derefing is 60% faster
- swapping is 25% faster
- resetting is about the same
;; volatile vs. atom ;;
(report
(timings 1e7
(deref (volatile! 42))
(deref (atom 42
; |
Oh that makes sense. Thanks a lot!
On Thu, Sep 11, 2014 at 1:36 AM, Carlo Zancanaro carlozancan...@gmail.com
wrote:
Hey Greg,
On Thu, Sep 11, 2014 at 12:30:11AM -0700, Greg MacDonald wrote:
So how come two agents can't contain one another? The following code
causes
a StackOverflowError.
And just creation is about 3x faster:
(report
(timings 1e7
(do (volatile! 42) nil)
(do (atom 42) nil)))
; | :expr | :time | :ratio | :perc |
; |-+---++---|
; | (do (volatile! 42) nil) | 22.849963 |1.0 | 31.63 |
; |
The volatile construct seems very useful in some particular cases! I have
been missing ugly-mutable variables for things such as certain types of
heaps/queues or write-intensive, slightly probabilistic stuff where one
missed write doesn't matter that much.
For people who don't have a Java
May be the LongAdder in Java8 can beat AtomicLong :D
http://blog.palominolabs.com/2014/02/10/java-8-performance-improvements-longadder-vs-atomiclong/
2014-09-11 17:30 GMT+08:00 Linus Ericsson oscarlinuserics...@gmail.com:
The volatile construct seems very useful in some particular cases! I
Check out Sente. It meets all your requirements. EDN is used as a transport
mechanism, with experimental support for Transit -- but these are really
implementation details. Values sent from the client shows up in tact on the
server, and vice versa.
https://github.com/ptaoussanis/sente
*
I thought for sure I saw this feature, but I can't find it.
Isn't there a way to scan for possible updates to dependencies in a project?
--
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
https://github.com/xsc/lein-ancient
On 11 September 2014 14:41, Jonathon McKitrick jmckitr...@gmail.com wrote:
I thought for sure I saw this feature, but I can't find it.
Isn't there a way to scan for possible updates to dependencies in a project?
--
You received this message because you
Hi,
I am looking for the slides of this talk because one can't see them in the
video:
http://vimeo.com/100518968
Thanks,
Leon.
--
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
lein-ancient plug in
Luc P.
I thought for sure I saw this feature, but I can't find it.
Isn't there a way to scan for possible updates to dependencies in a project?
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send
Hello,
here is my use case
(defn replay [history] (go (doseq [millis history]
(! (timeout millis))
(prn millis
history is a vector of duration: [1000 2000 4000]
Now I would like to pause this doseq. One
Hi, when I use (.getPath (clojure.java.io/resource readme.txt)) I get the
file path to the correct file in the resources folder (or nil if it doesn't
exist).
However if I pass in an empty string it returns the path to the 'test'
folder rather then 'resources'. I have tried setting setting the
clojure.java.io/resource isn't specific to the resources folder. It just
scans the classpath. Your classpath probably looks like
test:src:resources or something so test wins. If there was a
test/readme.txt file you'd also get that rather than resources/readme.txt.
Cheers,
Dave
On Thu, Sep 11,
Usually Rich doesn't release his slides as he prefers for them to be
consumed in the context of the talk.
On Thursday, September 11, 2014 8:44:47 AM UTC-5, Leon Grapenthin wrote:
Hi,
I am looking for the slides of this talk because one can't see them in
the video:
For instance you can use schejulure [1] or at-at [2] and make sure the
scheduled function calls put an item (event) on the channel and then made
the scheduler do the pausing work.
All the listeners attached to the channel will receive the events at the
time the scheduler releases them, and you
You should never block a go loop other than by using a parking channel op
(like !, !, etc).
You probably instead want a control channel where you can send it a pause
message telling it to block on the control channel until a resume message
arrives.
On Thursday, September 11, 2014 6:52:48 AM
Yeah, dt/Record1 is not a thing that is referenceable.
dt/-Record1 is a constructor function
defrecord_example1.datatypes.Record1 is a class
You can't use the ns alias dt to shorten the name of the class (those are
different naming contexts).
On Wednesday, September 10, 2014 8:44:18 PM
Is there an easy way to get the same compact layout but without the colour
control codes?
On Friday, 5 September 2014 07:50:10 UTC+10, Vladimir Bokov wrote:
Hi folks, I got just tired to gazing into big amount of data and scroll
3-4 screens of my 13' laptop to grasp the structure,
so I used
On Thursday, September 11, 2014 2:41:44 AM UTC-5, Arnout Roemers wrote:
I can understand why something like a clojure.lang.Volatile can be useful
for some optimizations in the functions of standard library, but do they
really need to become part of the public core API?
From my own
Yes. I use clansi:
(clansi.core/without-ansi (aprint issues))
Thanks for feedback, I updated README too
четверг, 11 сентября 2014 г., 21:58:57 UTC+7 пользователь Dave Sann написал:
Is there an easy way to get the same compact layout but without the colour
control codes?
On Friday, 5
Dear list,
I'd like to announce a pre-release of a clojure client/wrapper for vowpal
wabbit, see engagor/clj-vw https://github.com/engagor/clj-vw and clj-vw
1.0.0-RC2 - Clojars https://clojars.org/engagor/clj-vw.
All feedback/help welcome!
Joachim.
--
You received this message because
Yes when I write block I meant park.
My first idea was to use a control channel which have pause and resume
input but then my question is
! control-channel would park until a value is available, what if I want to
continue is there is nothing ?
On Thursday, September 11, 2014 4:39:51 PM UTC+2,
Unfortunately the guys had a problem with the recording of the screen at
euroClojure, so only the speakers' head-and-shoulder shots are in those
videos. I made the video of my talk at home from the one originally
recorded, by re-running the slides while listening to the audio and saving
the
ClojureBridge is a one-day workshop run by Girl Geek Scotland aimed at
introducing women to the Clojure language and functional programming. The
event will be held at CodeBase in Edinburgh on September 27th (with
installfest the night before), and is now open for booking!
@Alex Miller: It would be great if an exception could be made. Again: The
slides are not in the video.
Consuming them in context of the talk is my intention by opening two
windows (one with the video, one with the slides).
Thanks, Leon.
On Thursday, September 11, 2014 4:33:41 PM UTC+2, Alex
+1. I also was unable to follow the video without the slides.
On Thu, Sep 11, 2014 at 12:36 PM, Leon Grapenthin grapenthinl...@gmail.com
wrote:
@Alex Miller: It would be great if an exception could be made. Again: The
slides are not in the video.
Consuming them in context of the talk is my
The slides are now available
at http://cdn.cognitect.com/presentations/2014/insidechannels.pdf.
On Thursday, September 11, 2014 2:57:30 PM UTC-5, puzzler wrote:
+1. I also was unable to follow the video without the slides.
On Thu, Sep 11, 2014 at 12:36 PM, Leon Grapenthin
I'm new to Clojure, but I'm teaching a course on it this year to
undergrads. I'm having a little trouble with terminology, partly because
Clojure departs from other languages (such as Scheme) on some terms (such
as atom).
I want to say something like this:
A word is considered a var unless it
I'm having some trouble fleshing out the surrounding context, but I'll take
a stab at this:
I don't think word is the correct term to use. Do I mean symbol?
Token, perhaps?
Do I mean symbol instead of var?
Yes. It may not be a var, after all.
Is list better called a form or an s-expression?
Hi ,
I am trying to compile a simple clj file which does nothing apart from
requiring the pigpen name-space and it fails to compile with the following
error. Can anybody help?
Attempting to call unbound fn: #'instaparse.combinators-source/cat
the full stack trace is here.
Thank you for the help.
What is the difference between a form and an s-expression? The Clojure
Glossary
https://github.com/clojuredocs/guides/blob/master/articles/language/glossary.md
defines
form as a valid s-expression. What is an example of an invalid
s-expression?
I'm not sure token is
You're probably using Clojure 1.7.0 alpha 2, which introduced a new
function called cat into the core namespace, which overlaps with a
function in instaparse.
A couple nights ago, I updated instaparse to version 1.3.4, with an update
to deal with this change in alpha 2, but pigpen has not yet
That's a weird one :)
Couple of questions...
What version of pigpen are you using?
What are you using to compile produce that output? It doesn't look like
lein or gradle output.
What OS are you using?
Do you have a full sample project to repro?
Does your project have any other references?
Just saw this response - disregard the questions I asked you on the pigpen
support DL.
I'll pull in the new instaparse get a new PigPen build out soonish (within a
day or two).
-Matt
On Thursday, September 11, 2014 at 6:28 PM, Mark Engelberg wrote:
You're probably using Clojure 1.7.0
On Thursday, September 11, 2014 2:49:43 PM UTC-5, jvanderhyde wrote:
I'm new to Clojure, but I'm teaching a course on it this year to
undergrads. I'm having a little trouble with terminology, partly because
Clojure departs from other languages (such as Scheme) on some terms (such
as
This whole discussion makes me think you're trying to teach Clojure in a
Scheme-like way, which maybe isn't the best approach.
In Clojure, it is rare to need quoted lists and symbols.
Instead of 'hello, you would use :hello.
Instead of '(1 2 3), you would use [1 2 3].
So the whole notion of
Hi,
For you guys that are working node-webkit and Clojurescript like I'm, I
created this build tool that's similar in functionality with
grunt-node-webkit-build.
The library still very young and missing some features that maybe very
important for some people (like being able to do a more precise
Thanks Mark for the response. That was very quick. Let me see if moving to
clojure 1.6.0 fixes the issues.
Sunil.
On Fri, Sep 12, 2014 at 6:58 AM, Mark Engelberg mark.engelb...@gmail.com
wrote:
You're probably using Clojure 1.7.0 alpha 2, which introduced a new
function called cat into the
Thanks Mark and Matt, changing the version back to clojure version 1.6.0
fixed it.
Sunil
On Fri, Sep 12, 2014 at 7:05 AM, 'Matt Bossenbroek' via Clojure
clojure@googlegroups.com wrote:
Just saw this response - disregard the questions I asked you on the
pigpen support DL.
I'll pull in the
Thanks a lot , Alex.
So in order to working with defrecords , we have to use fully qualified
name , or we can import them.
But the :require is needed before I can import the 'defrecord' classes..
[... :refer :all] will not import the classes..
On Thursday, September 11, 2014 10:46:17 PM
Fantastic! Thank you very much.
On Thursday, September 11, 2014 10:26:17 PM UTC+2, Alex Miller wrote:
The slides are now available at
http://cdn.cognitect.com/presentations/2014/insidechannels.pdf.
On Thursday, September 11, 2014 2:57:30 PM UTC-5, puzzler wrote:
+1. I also was unable to
45 matches
Mail list logo