If you require a namespace that requires another namespace, this will all
be resolved and loaded automatically as long as all the namespace files can
be found on the classpath.
I suspect that what you showed here is not the full error output, it seems
to be missing the information we would need
a nitpick on point 1 - I would assume you can't expect hotspot to improve
anything in the timescale of a program startup
am I missing something here?
On Fri, Jan 26, 2018 at 10:32 AM Alex Miller wrote:
> With a few custom patches (which are pending in jira) + AOT + direct
-> is just a list transform performed after reading your code into a list
data structure containing symbols, and before compiling to byte code - it
doesn't do anything directly.
On Fri, Feb 2, 2018 at 3:55 PM Jacek Grzebyta
wrote:
> OK I found what makes the memory leak.
l spawn threads on a bounded thread pool, I
>>> believe.
>>>
>>> On Jan 31, 2018 8:32 PM, "Justin Smith" <noisesm...@gmail.com> wrote:
>>>
>>>> Doing all the actions via one agent means that the actions are
>>>> serialized thou
As a shot in the dark, a common problem with memory usage and futures that
I have seen is the antipattern of launching a future for each piece of data
in a collection. The problem that occurs is that the code works for small
input collections and a small load of running tasks / requests, but for a
re
> call and see if that works (unless you're trying to do something else).
>
> John
>
> On Wed, Jan 31, 2018 at 7:31 PM, Jacek Grzebyta <grzebyta@gmail.com>
> wrote:
>
>> Thanks a lot. I will check it tomorrow.
>>
>> J
>>
>> On
this is exactly the kind of problem code I was describing - there's no
backpressure on existing future tasks to hold up the launching of more
futures - the work done by the agent calling conj is negligible. You need
to control the size of the pool of threads used, and you need to impose
I've long thought implementing something like TCL expect in Clojure would
be a fun project, as far as I know it hasn't been tried (though the google
results are drowned out by the Expectations testing library so who
knows...).
If I were doing this from scratch I'd start with the Process and
One approach to this sort of parallel development is having each developer
code against the interface of other modules, while implementing the
interface of their own module, so that their code can use stubs of
interfaces before the production versions are available.
Perhaps in Clojure this could
ata should be structured, then write code that knows how to handle that
data.
On Sat, Feb 10, 2018 at 10:06 AM Justin Smith <noisesm...@gmail.com> wrote:
> One approach to this sort of parallel development is having each developer
> code against the interface of other modules, while implem
To elaborate on Nicola's correct answer, when -main is run from outside its
namespace, the binding of mx comes from the current environment (which
doesn't see a macro, and likely has no binding for mx). If you use ` in
-main, the currently visible binding is properly namespace qualified so
that it
another false example above fixed:
user=> (into '(1) '(2 3))
(3 2 1)
On Fri, Jul 20, 2018 at 9:13 AM Christian Seberino
wrote:
> Wow thanks. That was pretty thorough.
>
> cs
>
>
> On Friday, July 20, 2018 at 10:51:48 AM UTC-5, Gary Johnson wrote:
>>
>> Hi Christian,
>>
>> You are looking for
the type function in clojure.core lets you override the nominal class of an
object with the :type metadata
user=> (type {})
clojure.lang.PersistentArrayMap
user=> (type ^{:type :foo} {})
:foo
On Wed, Oct 24, 2018 at 9:41 AM alex wrote:
> Looks like pre defrecord stuff used in early days to
Just a hunch, but many cluster / distribution tools expect that a given
Class name will refer to the same Class on each peer. You cannot ensure
this with reify- the name is auto-generated. The solution might be using
deftype or gen-class so that the class name would be deterministic and
shared on
A ScheduledThreadPool doesn't parallelize or partition your work, it
schedules tasks and keeps a pool of Thread objects it can reuse for that
purpose. If you need a job to be broken into smaller pieces, executed on a
schedule, you'll need to implement some sort of coordination. There's some
prior
This isn't a clojure issue.
A reference to "process filter" indicates this is an emacs problem. Its
regex syntax matcher tends to blow up on long lines.
On Mon, Dec 24, 2018, 14:57 Andy Fingerhut wrote:
> I would recommend trying to temporarily rename ~/.lein/profiles.clj to a
> different
You don't need to use re-matcher in that example - the output of re-find
with the regex and the string is identical. If you are using the matcher to
collect a series of matches in one string, you can also uses re-seq which
returns a lazy-seq of the matches of your regex in the string.
On Tue, Dec
I'll add that I knew this, but it took me longer than I expected to
actually find the documentation to point to. I don't know how a new user of
the library would be expected to discover what that symbol means.
On Tue, Nov 20, 2018 at 12:43 PM Justin Smith wrote:
> :> is a valid Clojure k
:> is a valid Clojure keyword, but has no special meaning on its own.
In Reagent's version of the Hiccup DSL, :> introduces a Reagent component
defined from a React component
also do note that clojure.core/run! is designed for two-arg map when
it's only run for side effects, and clojure.core/doseq is designed for
nested side-effecting iteration
On Thu, Feb 7, 2019 at 3:33 AM Pierpaolo Tofani
wrote:
>
> Thanks ! Your diagnosis is correct. With two dorun works fine.
>
you are misusing the :: alias resolution operator, user is not an alias
Clojure 1.9.0
(ins)user=> (ns foo)
nil
(ins)foo=> ::user/a
RuntimeException Invalid token: ::user/a
clojure.lang.Util.runtimeException (Util.java:221)
(ins)foo=> :user/a
:user/a
On Tue, Jan 29, 2019 at 2:52 PM Philip
I might be missing something here, but when it is mentioned that
something blocks, it's implicit in all cases that there's some
condition that allows it to proceed (even immediately) if satisfied.
If there's no buffer space it blocks, until that value is consumed.
Just because we can construct a
minor nitpick to the answer Sean provided: #{:age} as a function returns
:age for an argument equal to :age and nil for all other inputs, including
a hash map containing that key.
On Sun, May 5, 2019, 22:22 wrote:
> Thanks. What a newbie question.
>
> 在 2019年5月6日星期一
>
> Thanks again...
>
> Kind regards,
> Dimitris
>
> ps: this repo is WIP
>
>
> On 21 Nov 2019, at 23:43, Justin Smith wrote:
>
> on rereading I've clearly misunderstood you, I think we need to see
> actual code reproducing this error in order to know what fa
it might be helpful to consider that in the jvm methods are not data,
and the proto function makes the method into concrete data belongs to
the namespace that owns the protocol
On Thu, Nov 21, 2019 at 2:58 PM Justin Smith wrote:
>
> if you define proto method x, it belongs to the pr
if you define proto method x, it belongs to the protocol namespace no
matter where it is called, and calling it as if it belonged to the
namespace defining the object extending the protocol will and should
fail
On Thu, Nov 21, 2019 at 1:57 PM Dimitrios Jim Piliouras
wrote:
>
> Hi folks,
>
> This
ottom
> out in the ns the protocol was defined in. It's just that the middle step
> could come from 3 different namespaces all containing protocol extensions.
>
> On Thu, 21 Nov 2019, 23:03 Justin Smith, wrote:
>>
>> it might be helpful to consider that in the jvm me
on rereading I've clearly misunderstood you, I think we need to see
actual code reproducing this error in order to know what failed here
On Thu, Nov 21, 2019 at 3:42 PM Justin Smith wrote:
>
> there is no foo/x unless you defined one - the protocol function is
> created by de
I think it's also important here that Clojure methods are actual Java
methods - Clojure likes to stay close to the host functionality. A map
with a function isn't a class with a method because the JVM bytecode
doesn't let you invoke it that way directly. A Clojure function is not
a method because
not only does clojure.edn accept invalid input, but the clojure reader
also accepts invalid input for the same reason (prioritizing speed of
implementation over validation)
user=> (name 'a/b/c)
"b/c"
On Sat, Oct 17, 2020 at 5:14 PM William la Forge wrote:
>
> My understanding is that run-time
I don't think this is true, or if true is incidental to the real problem
% cljs
ClojureScript 1.10.758
cljs.user=> (defrecord Attr [has-default default])
cljs.user/Attr
cljs.user=> (get (->Attr true 1) :default)
1
cljs.user=> (:default (->Attr true 1))
nil
cljs.user=>
On Tue, Aug 4, 2020 at
The usage of delay here is clever. I suggest as an addition, using
`force` instead of `deref` to disambiguate delay vs. atom (of course
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
a small suggestion: you don't need to nest let inside let, a clause
can use previous clauses:
(defn get-latest-build
[pipeline]
(let [response (fetch-pipeline pipeline)
json (parse-string (:body response) true)
[pipeline] (:pipelines json)]
(:counter pipeline
also
> The next step might be to investigate why infinite lazy seqs don't print as
> clojure.lang.LazySeq, like the finite ones.
that printing of "clojure.lang.LazySeq@c5d38b66" relies on completely
realizing the input, as it relies on the hash, which relies on the
fully realized value
On Mon, Nov
HashEq
java.util.Collection clojure.lang.IObj clojure.lang.Sequential
clojure.lang.Seqable clojure.lang.IPersistentCollection
clojure.lang.ASeq clojure.lang.IReduce java.lang.Object
clojure.lang.ISeq clojure.lang.IMeta clojure.lang.IReduceInit}
On Mon, Nov 2, 2020 at 12:36 PM Justin Smith wrote:
>
> > The
By the time the exception is caught, you are already outside the context of
the Thread which the repl client is interacting with. The default exception
handler has no information tying the executing thread to the repl process
(not to mention the dynamic variables clojure is using to associate
to be clear, in my second example you see the error from the future without
using deref
good luck finding your solution
On Sat, Jan 2, 2021 at 12:50 PM Austin Haas wrote:
> Thank you very much for the explanation, Justin.
>
> I don't see how I can use futures, though, without blocking on the
(sorry, hit reply too soon)
On Thu, Jun 24, 2021 at 9:42 AM Justin Smith wrote:
> > Clojure vars under the IFn interface. In other words, you can only
> import Clojure functions, not Clojure values, through that API.
>
> On Fri, Jun 18, 2021 at 12:29 PM ru wrote:
>
> Clojure vars under the IFn interface. In other words, you can only
import Clojure functions, not Clojure values, through that API.
On Fri, Jun 18, 2021 at 12:29 PM ru wrote:
> Thank you, Gary, for the comprehensive answer. I have a control over
> Clojure side, so I decide to add special
)
On Thu, Jun 24, 2021 at 9:43 AM Justin Smith wrote:
> (sorry, hit reply too soon)
>
> On Thu, Jun 24, 2021 at 9:42 AM Justin Smith wrote:
>
>> > Clojure vars under the IFn interface. In other words, you can only
>> import Clojure functions, not Clojure values, thr
unless this is an exercise in learning clojure, why not use an existing
calculator parser? eg.
https://inst.eecs.berkeley.edu/~cs164/sp05/ta/calculator/Parser.java for a
random example found with a quick google
On Sat, May 15, 2021 at 3:23 PM Blake Watson
wrote:
> Hello,
>
> I've got a
there's a handy trick for pulling in the standard repl aliases / refers:
(cmd)user=> clojure.main/repl-requires
[[clojure.repl :refer (source apropos dir pst doc find-doc)]
[clojure.java.javadoc :refer (javadoc)] [clojure.pprint :refer (pp pprint)]]
(ins)user=> (ns foo.bar)
nil
(ins)foo.bar=>
101 - 142 of 142 matches
Mail list logo