if you take a few moments to think about it, swap! shouldn't return an
> atom etc., but I think it becomes clearer with force).
>
> On Mon, Jun 15, 2020 at 10:34 AM Ernesto Garcia
> wrote:
> >
> > Hi, it's a long time that this question was posted, but I have fo
I have discovered that, in the case of an agent action exception, the
behavior of agent await depends on timing:
- If your await happens to execute after the action is completed, it will
happily throw an exception that the agent is in a failed state.
- If your await happens to execute before the
Hey, thanks for the suggestions. ClojureVerse seems to be the most active
forum?
On Thursday, June 11, 2020 at 5:52:29 AM UTC+2, Sam Griffith wrote:
>
> You may want to ask this on ClojureVerse or on the official Q/A site at
> https://ask.clojure.org/index.php/
--
You received this message bec
ent action; why does it say "from this thread or
agent" then?
Am I misinterpreting something?
Thanks,
Ernesto
--
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
st practices are still a topic of research. Clojure has
taken the pragmatic approach of making purely functional code easy to
write, but it doesn't reject the use of state, rather it provides
well-behaved primitives like vars, atoms, agents, etc.
Ernesto
--
You received this message becau
of vars as global thread-local storage,
by restricting their use to dynamic binding only.
What is so bad about global thread-locals? It can't be the fact that they
are global, as refs are typically made global. They also have a good
thread-safe behavior.
Thanks,
Ernesto
--
You re
Hi Alex, thanks for your thorough response.
It seems to me that Clojure vars are just not intended to be used as
thread-locals in general. They happen to use thread-local storage in order
to implement dynamic scoping, which is the original intent.
That is why vars are either global (interned in
ny other way to achieve this?
Wouldn't it be better if ILookup were a protocol?
Thanks,
Ernesto
--
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 mem
On Tuesday, February 28, 2017 at 9:40:12 PM UTC+1, Alex Miller wrote:
>
> If it follows Java bean semantics, you can use the `bean` function to view
> it as a map with properties as keys.
>
The class is not actually a bean. It contains a map, with a
.getPropertyValue method, but it doesn't impl
On Wednesday, March 1, 2017 at 3:21:51 AM UTC+1, Mikera wrote:
>
> You might want to try implementing a small wrapper class that implements
> ILookup.
>
> Then you can do something like:
>
> (:keyword (MyWrapper. my-obj))
>
Yeah, but to be more convenient, it would need to return a wrapper in cas
On Thursday, March 2, 2017 at 3:36:53 AM UTC+1, William la Forge wrote:
>
> Alternative implementations for clojure maps are hard. You tend to use AOT
> a lot, which is non-idiomatic. But a number of people have done this,
> including myself. In retrospect, it isn't worth it. At least not most of
On Sunday, February 26, 2017 at 6:23:28 AM UTC+1, Didier wrote:
>
> Dynamic scoping and Java ThreadLocals gives you equal functionality, so
> I'd use them equally. This is because Clojure supports thread bound dynamic
> scope.
>
I wouldn't say that. While dynamically scoped Vars are meant to be
cross-processor synchronization
primitive. Doesn't this hit performance? Or is access to vars not
considered to happen frequently?
Ernesto
On Saturday, March 4, 2017 at 10:59:12 PM UTC+1, Didier wrote:
> Hum, you're having me question myself.
>
> See, I don't think dynamically
Thank you Alex!
--
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.
To unsubscribe from this group, sen
Thanks for your response Didier.
On Friday, March 10, 2017 at 7:05:19 PM UTC+1, Didier wrote:
>
> But just to clarify, Java's ThreadLocal is an implementation of dynamic
> scoping.
>
This is how I see it:
A ThreadLocal is an object instance. It ensures a different object for each
different thr
create, if possible.
Regression: The reason that I brought up this discussion is that I didn't
understand why clojure.tools.logging uses a dynamic var for enforcing the
use of a specific *logger-factory*. Does anybody have an explanation for
that?
Thanks,
Ernesto
>
--
You received
, so only channels at the
boundaries would require to be bound?
Channel limits are also much dependent on the particular process and
environment. How would we write generic code that creates channels, if
those need to be bound to limits unknown?
Thanks,
Ernesto
--
You received this message
ng)
>
> On Wednesday, July 3, 2019 at 7:14:46 AM UTC-4, Ernesto Garcia wrote:
>>
>> You can create a unbound channel with (chan), but not if you use a
>> transducer; (chan nil (filter odd?)) will raise an error that no buffer
>> is provided. Why is this the case?
>>
On Thursday, July 4, 2019 at 4:24:33 PM UTC+2, Matching Socks wrote:
>
> Ernesto, you may be interested in the informative response to this
> enhancement request, https://clojure.atlassian.net/browse/ASYNC-23
> <https://www.google.com/url?q=https%3A%2F%2Fclojure.atlassian.net%2Fbr
I see. Bufferless channels are meant to be used within the core.async
threading architecture, where there will be a limited number of blocked
puts and takes. At the boundaries, channels with dropping or sliding
windows can be used for limiting work.
So, my original question actually turns into:
Thanks Alex!
Correct, the channel implementation takes care that "transduced" channels
always pass elements through the transducer and the buffer. Also, a
FixedBuffer allows running out of limit for those cases, see this example
with a FixedBuffer of size 1 making space for 4 elements:
(def c
In my humble opinion, main benefits of Clojure:
- Development cycle: modifying and experimenting on a running program.
- Treating data as maps. Direct and efficient immutability.
- Macros: Though used very scarcely, it's good to know that you'll be able
to extend the language from within if you
You might want to check the FAQ at freenode.net. They even give you hints
for setting up your client so that you don't have to manually register every
time you log in.
On Tue, Aug 10, 2010 at 10:44 AM, Laurent PETIT wrote:
> You need to register with NickServ, e.g.
> /msg NickServ identify
>
> I
23 matches
Mail list logo