Thank you.
On Sunday, December 11, 2016 at 6:32:50 AM UTC-5, Matching Socks wrote:
>
> An answer from "noisesmith" here
>
> http://stackoverflow.com/questions/32288195/why-lein-uberjar-evaluates-variables-defined-with-def
> says, "In order to compile your namespace for the uberjar (if you have AO
An answer from "noisesmith" here
http://stackoverflow.com/questions/32288195/why-lein-uberjar-evaluates-variables-defined-with-def
says, "In order to compile your namespace for the uberjar (if you have AOT
turned on), the clojure compiler must load your namespace. This will always
invoke all top-
December 10, 2016 at 11:37:44 PM UTC-5, larry google groups
wrote:
>
> I had a small app that was compelling, and then I added in a java class,
> and now when I run "lein uberjar" I get java.lang.OutOfMemoryError.
>
> I'm working on my MacBook Pro, 16 gigs of memory
>
I had a small app that was compelling, and then I added in a java class,
and now when I run "lein uberjar" I get java.lang.OutOfMemoryError.
I'm working on my MacBook Pro, 16 gigs of memory
Dependencies were:
:dependencies [
[org.clojure
that will hopefully help here.
>
> Regarding the exception:
>
> Caused by: java.lang.OutOfMemoryError: PermGen space,
> compiling:(cljs/core/async/impl/ioc_macros.clj:348:1)
>
> that line of ioc_macros.clj uses a defrecord. That'd make sense that that
> would tr
:
Caused by: java.lang.OutOfMemoryError: PermGen space,
compiling:(cljs/core/async/impl/ioc_macros.clj:348:1)
that line of ioc_macros.clj uses a defrecord. That'd make sense that that
would trigger the OutOfMemory as that would generate classes to go into
PermGen.
Now, the problem in analyzing
ello,
>
> I'm getting the following error while working on a Clojure(Script) REPL
> on a middle-sized project after some time. None of my colleagues seem to
> be able to reproduce it. I'm not able to reproduce it on other projects
> either.
>
> Caused by: java.lang.
Clojure(Script) REPL
> on a middle-sized project after some time. None of my colleagues seem to
> be able to reproduce it. I'm not able to reproduce it on other projects
> either.
>
> Caused by: java.lang.OutOfMemoryError: PermGen space,
> compiling:(cljs/core/asy
Hello,
I'm getting the following error while working on a Clojure(Script) REPL
on a middle-sized project after some time. None of my colleagues seem to
be able to reproduce it. I'm not able to reproduce it on other projects
either.
Caused by: java.lang.OutOfMemoryError: Per
Thank you very much, that worked splendidly.
On Friday, April 5, 2013 5:14:30 PM UTC+2, Alex Nixon wrote:
>
> Java substrings prevent the original string from being garbage collected;
> perhaps this also happens with regex matches?
>
> You can test the theory by surrounding the values in your ma
Alex Nixon managed to figure it out (further down)
offtopic: I live in the same city as you and I'm also interested in
clojure, email me if you want to have a coffee
Adrian
On Friday, April 5, 2013 5:08:04 PM UTC+2, Laurent PETIT wrote:
>
> You should show us the calling code, I guess ...
>
>
Java substrings prevent the original string from being garbage collected;
perhaps this also happens with regex matches?
You can test the theory by surrounding the values in your map with (String.
) and seeing if the problem goes away.
On 5 April 2013 15:57, Adrian Muresan wrote:
> Hello everyo
Slurp reads the entire file into memory. Maybe it is a combination of a)
the program taking up more of the heap in other parts as it runs and then
b) a particularly large file?
Is there a reason you can't process the files as a line-seq so you don't
have to load the entire thing into memory all at
You should show us the calling code, I guess ...
2013/4/5 Adrian Muresan :
> Hello everyone,
>
> I'm trying to parse a large number of small reports for some data and I'm
> doing this by repeatedly calling the following function (with a for) on each
> of the files:
>
> (defn get-rep [file]
> (
Hello everyone,
I'm trying to parse a large number of small reports for some data and I'm
doing this by repeatedly calling the following function (with a for) on
each of the files:
(defn get-rep [file]
(let [report (with-open [rdr (io/reader file)](*slurp rdr*))
reg #";\s+(\d+\.\d
Thanks Meikel, sounds like the vimclojure group is a good forum and
I'll ask there.
On Dec 19, 1:20 am, Meikel Brandmeyer wrote:
> Hi,
>
> this likely a more involved topic. Repls from stock Vim are difficult. That's
> the reason VimClojure currently rolls its own. I doubt that the ClojureScript
Hi,
this likely a more involved topic. Repls from stock Vim are difficult. That's
the reason VimClojure currently rolls its own. I doubt that the ClojureScript
repl will work out of the box.
Since I'm not especially bought into ClojureScript at the moment, I can't help
much here. If someone wi
following error:
E605: Exception not caught: Error executing Nail!
(131)^@java.lang.OutOfMemoryError: Java heap space^@^Iat
java.lang.StringCoding$String
Decoder.decode(StringCoding.java:133)^@^Iat
java.lang.StringCoding.decode(StringCoding.java:173)^@^Iat
java.lang.String.(String.j
Limiting *print-length* keeps the OutOfMemoryError away, but I guess
it would leave me - when testing more complicated and obscure
functions - insecure whether the returned sequence really is a lazy
one or will blow up the memory instead. But good to know anyway ...
I guess the println function is
ming Clojure". There he defines the whole numbers as fn:
>
> (defn whole-numbers [] (iterate inc 1))
>
> If I use it like this at the REPL
>
> (take (whole-numbers))
>
> I get:
> Java heap space [Thrown class java.lang.OutOfMemoryError]
>
> This unexp
Ben writes:
> (defn whole-numbers [] (iterate inc 1))
>
> If I use it like this at the REPL
>
> (take (whole-numbers))
>
> I get:
> Java heap space [Thrown class java.lang.OutOfMemoryError]
>
> This unexpectedly is the same result that I expectedly get whe
When I do that, the REPL starts printing the sequence, filling screens
after screens with numbers.
By doing that, it realizes the printed part of the sequence, which
will eventually lead to an OOM error, since it probably holds on to
the reference to the start of the sequence.
Doing (set! clojure.
ers [] (iterate inc 1))
If I use it like this at the REPL
(take (whole-numbers))
I get:
Java heap space [Thrown class java.lang.OutOfMemoryError]
This unexpectedly is the same result that I expectedly get when
binding whole-numbers to a top-level var and use a huge portion of
that. Sinc
ught that my function might
> produce a lazy sequence that would be more manageable. However I
> typically get:
>
> twitter.core> (nth (json-seq dir-name) 5)
> "{createdAt=Fri etc. GOOD
>
> twitter.core> (nth (json-seq dir-name) 5000)
>
> Java hea
>> the entire sequence being in memory. However, if you retain the head
>> of the sequence elsewhere, you will see the same effect.
>
> I don't think my function retains the head? Please correct me if I am
> wrong.
Not that I can see but I don't have the full context. I tried
reproducing just now
out-files)))
>
> > Now there are forty files and five thousand statuses per file, which
> > sounds like a lot, and I don't suppose I can hope to hold them all in
> > memory at the same time. But I had thought that my function might
> > produce a lazy sequence that woul
Thanks! This is still driving me mad 'though.
On Jul 27, 5:11 pm, Peter Schuller
wrote:
> The observations that the data structures are non-lazy still apply,
> even if you could postpone the problem by increasing the heap size.
Yes I can see that the sequence returned from str/split is not laz
> I am getting a lot further now, but still running into OutOfMemory
> errors sometimes. And it is still the case that once I have suffered
> an OutOfMemoryError, they keep coming. It does feel as if there must
> be some large memory leak in the emacs/lein swank repl. Is this a
> recognised iss
, which
> > sounds like a lot, and I don't suppose I can hope to hold them all in
> > memory at the same time. But I had thought that my function might
> > produce a lazy sequence that would be more manageable. However I
> > typically get:
>
> > twitter.core> (
Thanks! but not entirely convinced. At my REPL:
user> (repeatedly 10 #(do (print "f") [(rand-int 10)]))
(ff[0] f[8] f[5] f[7] f[1] f[6] f[7] f[3] f[3] [0])
user> (take 5 (apply concat (repeatedly 10 #(do (print "f") [(rand-int
10)]
(7 1 f6 f5 8)
Only six "f"s... so doesn't that mean th
>> Here is my function:
>> (defn json-seq []
>> (apply concat
>> (map #(do (print "f") (str/split (slurp %) #"\nStatusJSONImpl"))
>> out-files)))
>
> Try removing the "apply concat" at the front, I'm pretty sure that's
> making your sequence non-lazy.
Correct me if I'm wrong
On Mon, Jul 26, 2010 at 9:53 AM, atucker wrote:
> Here is my function:
> (defn json-seq []
> (apply concat
> (map #(do (print "f") (str/split (slurp %) #"\nStatusJSONImpl"))
> out-files)))
Try removing the "apply concat" at the front, I'm pretty sure that's
making your seque
tter.core> (nth (json-seq dir-name) 5)
> "{createdAt=Fri etc. GOOD
>
> twitter.core> (nth (json-seq dir-name) 5000)
>
> Java heap space
> [Thrown class java.lang.OutOfMemoryError] BAD
>
> And at this point my REPL is done for. Any further instruction will
> re
> Here is my function:
>
> (defn json-seq []
> (apply concat
> (map #(do (print "f") (str/split (slurp %) #"\nStatusJSONImpl"))
> out-files)))
Assuming the str namespace is clojure.contrib.string, (str/split ..)
won't be lazy. Currently it's implemented as:
(defn split
"Sp
ought that my function might
> produce a lazy sequence that would be more manageable. However I
> typically get:
>
> twitter.core> (nth (json-seq dir-name) 5)
> "{createdAt=Fri etc. GOOD
>
> twitter.core> (nth (json-seq dir-name) 5000)
>
> Java heap
hat would be more manageable. However I
typically get:
twitter.core> (nth (json-seq dir-name) 5)
"{createdAt=Fri etc. GOOD
twitter.core> (nth (json-seq dir-name) 5000)
Java heap space
[Thrown class java.lang.OutOfMemoryError] BAD
And at this point my REPL is done f
tain exist).
> >
> > >> Trying to solve Problem 14 (some spoilers might be ahead, for those
> > >> wanting to solve it in the future).
> >
> > >> The problem and my code are inhttps://pastee.org/hj3sh
> >
> > >> here is the probl
> >> The problem and my code are inhttps://pastee.org/hj3sh
>
> >> here is the problem:
> >> I am trying to produce a map of one O(million) key-value pairs using a
> >> recursive function.
>
> >> I can produce a map of the first 10 numbers in ~1300 ms
>
> >>> Trying to solve Problem 14 (some spoilers might be ahead, for those
> >>> wanting to solve it in the future).
>
> >>> The problem and my code are inhttps://pastee.org/hj3sh
>
> >>> here is the problem:
> >>> I am trying t
ing to solve Problem 14 (some spoilers might be ahead, for those
>>>> wanting to solve it in the future).
>>>>
>>>> The problem and my code are in https://pastee.org/hj3sh
>>>>
>>>> here is the problem:
>>>> I am trying to produ
lers might be ahead, for those
>>> wanting to solve it in the future).
>>>
>>> The problem and my code are in https://pastee.org/hj3sh
>>>
>>> here is the problem:
>>> I am trying to produce a map of one O(million) key-value pairs using a
>>&g
https://pastee.org/hj3sh
>
> here is the problem:
> I am trying to produce a map of one O(million) key-value pairs using a
> recursive function.
>
> I can produce a map of the first 10 numbers in ~1300 msecs, with
> 217211 keys.
> However, for 15 and up, I get java.lang
oblem and my code are inhttps://pastee.org/hj3sh
>
> >> here is the problem:
> >> I am trying to produce a map of one O(million) key-value pairs using a
> >> recursive function.
>
> >> I can produce a map of the first 10 numbers in ~1300 msecs, with
>
(million) key-value pairs using a
>> recursive function.
>>
>> I can produce a map of the first 10 numbers in ~1300 msecs, with
>> 217211 keys.
>> However, for 15 and up, I get java.lang.OutOfMemoryError: Java
>> heap space.
>>
>> so, I assume
I am trying to produce a map of one O(million) key-value pairs using a
> recursive function.
>
> I can produce a map of the first 10 numbers in ~1300 msecs, with
> 217211 keys.
> However, for 15 and up, I get java.lang.OutOfMemoryError: Java
> heap space.
>
> so, I as
cs, with
217211 keys.
However, for 15 and up, I get java.lang.OutOfMemoryError: Java
heap space.
so, I assume my code is ok on efficiency, but the recursion is too
deep.
am I right? can anyone suggest a way to overcome this problem?
any additional tips and thoughts on the code would be of great
Francis Lavoie writes:
> (filter even? (range 10))
>
> What's puzzle me is that past at certain number (10 millions), clojure
> chocks and throw a «java.lang.OutOfMemoryError: Java heap space»,
> 1. Why does it happen?
The JVM puts a limit on the amount of memory that c
What's puzzle me is that past at certain number (10 millions), clojure
chocks and throw a «java.lang.OutOfMemoryError: Java heap space»,
continue for a while and stop before completing the sequence.
The JVM puts a limit on the amount of memory that will be allocated.
Try adding -Xmx51
chocks and throw a «java.lang.OutOfMemoryError: Java heap space»,
continue for a while and stop before completing the sequence. It is
also 10x slower compared to python, that manage to complete it
successfully. On the other hand, clojure(java) don't take more than
160mo, while python grows to 640m
On Jul 4, 8:04 am, arasoft wrote:
> Using a fairly recent 1.1 snapshot, I get an OutOfMemoryError for
> this:
>
> (defn fib-seq []
> ((fn more [a b]
> (lazy-seq (cons a (more b (+ a b)
> 0 1)
> )
>
> (nth (fib-seq) 20)
>
> However, this works fine:
>
> (defn xth [coll i
Hi,
Am 04.07.2009 um 17:11 schrieb Lennart Staflin:
I don't think this explains it. It is a OutOfMemoryError not a stack
overflow. It is not a recursion problem. I think it is that nth hangs
on to the head of the lazy fib sequence, and therefor all the elements
including the big integers can no
On Jul 4, 4:37 pm, Daniel Lyons wrote:
> On Jul 4, 2009, at 6:04 AM, arasoft wrote:
> > Using a fairly recent 1.1 snapshot, I get an OutOfMemoryError for
> > this:
>
> > (defn fib-seq []
> > ((fn more [a b]
> > (lazy-seq (cons a (more b (+ a b)
> > 0 1)
> > )
>
> > (nth (fib-s
On Jul 4, 2009, at 6:04 AM, arasoft wrote:
>
> Using a fairly recent 1.1 snapshot, I get an OutOfMemoryError for
> this:
>
> (defn fib-seq []
>((fn more [a b]
>(lazy-seq (cons a (more b (+ a b)
> 0 1)
> )
>
> (nth (fib-seq) 20)
>
> However, this works fine:
>
> (defn xth
Using a fairly recent 1.1 snapshot, I get an OutOfMemoryError for
this:
(defn fib-seq []
((fn more [a b]
(lazy-seq (cons a (more b (+ a b)
0 1)
)
(nth (fib-seq) 20)
However, this works fine:
(defn xth [coll i]
(if (zero? i) (first coll) (recur (rest coll) (dec i
>I might look at the JEdit plugin though - JEdit is nice, for simple
>editing, which might be good enough for me for now.
I similarly haven't had time to relearn emacs and have used jedit quite
sucessfully with jedit-mode. I keep one or more terminal window tabs open
each with a REPL launched wit
>
>
> Incidentally, if you want a language with an editor built in, why not
> look at Smalltalk? I vaguely recall that was a big part of the
> original language concept. I haven't ever played with it myself, but
> the most popular current flavour seems to be Squeak:
> http://www.squeak.org/
>
Sm
I have had similar problems with enclojure. But having gone through
similar IDE pain working in Ruby on Rails, the Netbeans support ended
up being way ahead of most IDEs, so I have hopes that enclojure will
get there in time. (My biggest annoyance? The fact that you can't
open existing code as
great. will do.
On Jan 11, 9:14 am, lpetit wrote:
> Hello,
>
> If you like eclipse and would like to see where clojuredev (eclipse
> plugin) is right now, you can give a quick look at the current state
> of clojuredev by trying to immediately install it via the update site
> link :
>
> http://c
Hello,
If you like eclipse and would like to see where clojuredev (eclipse
plugin) is right now, you can give a quick look at the current state
of clojuredev by trying to immediately install it via the update site
link :
http://clojure-dev.googlecode.com/svn/updatesite/
Still not ready for publ
seems like enclosjure addresses a bunch of my problems/questions. It
also seems to work like we wanted SLIME to work, more or
less . . .where you attach to the vm that's used for execution . . .
only you attach to the REPL, I think, which still accomplishes the
goal of keeping the editor separate
If I'm not mistaken, this is fairly close to how SLIME works, when
connected to a remote VM. The remote VM is running some server code
which allows it to communicate with SLIME, which is running inside of
emacs.
On Jan 10, 2:15 pm, e wrote:
> exactly. . . .but I bet a lot of people would just re
exactly. . . .but I bet a lot of people would just reply that this is
not possible to address since the REPL is the one and only vm.
Disclaimer, I'm only guessing at that, too. I don't understand any of
this, yet. But if that's the case, fix that. Have the REPL send
messages to the vm that's ru
thanks for the encouragement.
As for eclipse, I just don't get the same feeling. I love the cntl-
space and cntl-\ things that stub out your code (not just for dot
completion). . . complete with cells for variables that repeat in the
template (yeah they probably took this from emacs, but I can a
Yeah, I'm not really sure how I think the problem would be ideally
solved. It would just be nice for an interactive programming
environment to be able to recover from all exceptions that happen at a
higher level than the VM itself.
On Jan 10, 12:20 pm, "Christian Vest Hansen"
wrote:
> I don't th
Try this:
http://github.com/djspiewak/jedit-modes/tree/master/clojure.xml
I work with Eclipse on a daily basis because of the java code base I
have to deal with but it was
asking my computer to carry an elephant until... I got my hands on a
quad-core with 6 Gig of RAM
and I had loaded in RAM at b
i wondered about this when I was asking about eclipse analogies. The
vm that runs a program that you are writing should have nothing to do
with the vm your editor is using. Maybe there should be some way for
the actual running program to be in one VM, and then the REPL
communicates to it via RMI
I don't think it is possible to define a way to deal with heap
saturation that is general enough to cover all programs written in
Clojure, and therefor I don't think this is something that the Clojure
runtime should deal with at all.
Personally, I only know of two ways to handle OutOfMemoryErrors
After talking to Jeffrey Chu, it seems like what is actually happening
is possibly fairly obvious (in retrospect) - the java process runs out
of heap space, and there's not even enough memory to keep swank-
clojure working properly. Jeffrey tried some examples with just a
plain REPL (without SLIME
I was playing around earlier while following Mark Engelberg's blog
post, and I found that to my surprise, when I exhaust the heap
(java.lang.OutOfMemoryError), it basically fails to pop up the window
that gives me the exception (where you can normally abort or throw the
cause), and the
69 matches
Mail list logo