freenode/#lisp - IRC Chatlog
Search
18:49:53
mfiano
Anyone know a good way to go about downloading large files to disk with drakma or dexador without an intermediate octet vector in memory?
18:59:23
krwq
I mean not entire stream in the vector just buffer to forward it to another stream. haven't used dexador much - I had some issues with it in the past so came back to using drakma
19:00:43
krwq
mfiano: i recall having some issues with dexador - i think it was proxy servers but can't remember
19:01:28
mfiano
I've had issues with both, due to usocket bugs, but my use this time doesn't affect my choice
19:23:11
borodust
bodge-ui-window (yet another gui dependent on foreign powers) now should work alright on retina displays too, any help with running example (https://github.com/borodust/bodge-ui-window#install) on macos with retina display is much appreciated
20:59:41
saturn2
is there some code that will list the memory used by each global variable in a lisp image? or otherwise help track down gradual memory growth
21:08:52
edgar-rft
saturn2: AFAIK the only memory inspection tool mentioned in the CL standard is ROOM. Since low-level memory allocation is implementation-dependent there might be more or better tools provided by the respective CL implementation.
21:11:36
aeth
e.g. in SBCL, (sb-profile:profile foo) and then just periodically check on it to see how its measured consing climbs over time
21:19:22
saturn2
lots of functions do consing... i don't think sb-profile tracks how much of that consing sticks around for a given length of time
21:22:57
saturn2
it's trivial to iterate over all symbols and check if they're boundp, the tricky part is calculating the size of lists, arrays, hash tables, clos objects, etc
21:24:39
rdh
hey, i am trying to get list of values quoted but i want it as arguments to a function, currently: (OR (NIL NIL NIL NIL T T NIL NIL)) ... but i need it to print (or (nil) (nil)...
21:28:25
rdh
which adds extra quotes and trys to eval the first argument as a function... which is not what I want... is there a good web page that has good thorough example to read?
21:29:47
pjb
No, there's no web page explaining in details how you should write your specific program.
21:30:06
saturn2
(room t) on sbcl gives enough info to tell me i'm leaking simple-vectors, but it doesn't tell me where they're ending up
22:05:31
jgkamat
does anyone know if it's possible to attach some data to a function somehow? Like a marker or something, on the function itself.
22:08:29
krwq
jgkamat: I think people usually use hash-table and define a macro which auto-adds something there
22:10:39
jgkamat
in python, you can do it. Basically function.data = "foo" and "foo" == funciton.data. Maybe something like (getf #'my-function 'data)
22:15:58
saturn2
jgkamat: there are funcallable-instances http://metamodular.com/CLOS-MOP/funcallable-instances.html
22:17:50
krwq
you can define two functions in the same closure and call one of them and use other one to retrieve data
22:20:47
Jachy
jgkamat: Property lists? (defun fun-foo () ...) (setf (get 'fun-foo 'data) "foo") (get 'fun-foo 'data) ;-> "foo"
22:25:12
jgkamat
hmm, actually, is there a way to pass the function instead of a symbol in to get the data
22:49:59
Jachy
jgkamat: Maybe the other way around, see what defun/function/symbol-function are doing ;) I suppose you could add a wrapper that asserted that the given symbol was fboundp if you wanted to make sure you can also associate a function from the symbol.
5:26:22
gjvc
I am using emacs and slime. (merge-pathnames "myfile-.xml" *compile-truename*) is returning something in /tmp not in my source directory
5:44:15
loke`
gjvc: I recommend you do create an ASD file and then load the project through Quicklisp