freenode/#lisp - IRC Chatlog
Search
20:29:48
MichaelRaskin
And I guess if my mess of throwing together «escape browser dump web to text editor» is ever worth a release, I keep the package name thoughtful-theridion (theridia is the taxon of cobweb spiders)
20:34:35
dim
can I (open "..." :direction :probe :if-exists :rename) and expect the rename to happen?
20:40:31
dim
it seems not, so I'm using with-open-file and a dummy instruction to avoid the warning about the variable being unused
22:26:14
stylewarning
On SBCL, I have a function F which allocates lots of memory, but doesn't maintain the references. (loop (f)) causes a heap exhaustion, while (loop (gc :full t) (f)) does not. Any hints on why this could be?
22:31:52
didi`
stylewarning: One thing that I observed is that it consumes memory before freeing memory.
22:34:18
stylewarning
I wonder if SBCL tries to do a full GC. It looks like all of my objects are in gen1 or 2, and SBCL is just ignoring those.
23:25:45
pierpa
the hash tables that the function F creates are pretty big, so even a small percentage of them being kept because of false positives could explain the phenomenon.
23:26:34
stylewarning
pierpa: It would have to be holding on to a few of the large tables from a previous call to F
23:26:46
pierpa
this theory agrees with the forst two of your starred points, while I don't understand the third one
23:27:00
Bike
if it was conservatism, how would calling gc manually fix it? it's not any less conservative just because it's forced
23:28:27
stylewarning
I'm trying to figure out in the SBCL source where GC gets called upon a failed allocation
23:57:23
stylewarning
Looks like all the interesting stuff about GC triggering on allocation starts here: https://github.com/sbcl/sbcl/blob/master/src/runtime/gencgc.c#L3739
0:05:54
didi`
In my case, usually I have some percentage of the heap allocated, say 80%, then the GC is triggered and the heap is exhausted.
0:08:31
stylewarning
didi`: That variable seems like the wrong one to tune for a bug like this, no? IIUC, the default is 5% of the heap size, and that means when 5% of the heap is used, a GC of some sort will be attempted.
0:10:16
didi`
stylewarning: Oh, I don't know how to fix it. My workaround has been trying to use less and less programs during my work and aggressively cut my memory usage inside my program.
0:14:29
didi`
stylewarning: Another "fix" I employ is calling the GC from time to time inside the REPL.
0:14:57
stylewarning
didi`: this bug is unfortunately being trigged in the depths of a complicated compiler pass
0:42:42
stylewarning
makes me think there's something awry with collecting large objects, which I know are allocated specially
0:49:29
pierpa
as, in the previous case you needed a RANDOM integer to trigger it. In this case, uninitialized arrays. So, vectors containing random fixnums would seem to play a part in this.
0:51:16
stylewarning
pierpa: the random integer bit was because i needed different objects for EQUALP
0:51:37
stylewarning
but I changed that to EQ so all objects, even with the same contents, are basically different
1:04:36
aeth
I'm guessing that other threads (e.g. SLIME+Swank?) would trigger GC even in a non-allocating workload, but running it in a separate process entirely and seeing if the GC is triggered could be yet another test for consing.
1:05:25
aeth
Doesn't help with your problem (unless I wasn't reading it carefully), but it would be an interesting test to run on some things
1:12:10
aeth
stylewarning: Does SBCL have built in file logging or is it done as part of the *after-gc-hooks* that's mentioned in the manual?
4:59:58
mfiano
I have a stupid question perhaps, but I'm toying with compiler macros for the first time in all my years of Lisp use. Anyway, is there anyway to prevent the original function from being called in the REPL? It seems to work in a compiled file, but obviously not in the REPL.
6:10:24
jackdaniel
mfiano: or, if your implementation doesn't compie repl expressions by itself, then: (funcall (compile nil '(lambda () (foo 2))))
7:53:27
MichaelRaskin
beach: I guess the core I have can be trivially wrapped to suppotr file-agnostic code debugger; not sure what is a good way to add location support, maybe a reader that saves a hashtable of «Form object -> storage location»
7:55:46
beach
It can return a concrete syntax tree, but one of the protocol functions on that returns the underlying expression.
8:15:18
flip214
beach: mail incoming - in case you don't read the u-b.fr mails regularly. Have a nice weekend!!
8:23:24
MichaelRaskin
beach: I guess I should declare that recovery-after-macroexpand in eclector should work well enough with what I do not to think about it right now